summaryrefslogtreecommitdiff
path: root/graphics/Mesa/Makefile
blob: f3fe7789a7bb42251a8d5c2df9a3db58257a6ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Makefile for:		Mesa
# Version required:     2.6
#
# $NetBSD: Makefile,v 1.11 1998/03/20 06:19:05 mycroft Exp $
#

DISTNAME=       MesaLib-2.6
PKGNAME=	Mesa-2.6
CATEGORIES=	graphics
MASTER_SITES= 	ftp://iris.ssec.wisc.edu/pub/Mesa/ \
		ftp://iris.ssec.wisc.edu/pub/Mesa/old-versions/
DISTFILES=	MesaLib-${MESA_VERSION}${EXTRACT_SUFX} \
		MesaDemos-${MESA_VERSION}${EXTRACT_SUFX}

MAINTAINER=	mycroft@NetBSD.ORG

WRKSRC=         ${WRKDIR}/${PKGNAME}
ALL_TARGET=	netbsd
USE_X11=	yes
MESA_LIBS=	libMesaGL libMesaGLU libMesaaux libMesatk
MESA_VERSION=	2.6
GLUT_LIBS=	libglut
GLUT_VERSION=	3.6

post-extract:
	chmod +r ${WRKSRC}/demos/*

do-install:
.for file in ${MESA_LIBS}
	${INSTALL_DATA} ${WRKSRC}/lib/${file}.a ${PREFIX}/lib
	ranlib ${PREFIX}/lib/${file}.a
	${INSTALL_DATA} ${WRKSRC}/lib/${file}.so.${MESA_VERSION} ${PREFIX}/lib
.endfor
.for file in ${GLUT_LIBS}
	${INSTALL_DATA} ${WRKSRC}/lib/${file}.a ${PREFIX}/lib
	ranlib ${PREFIX}/lib/${file}.a
	${INSTALL_DATA} ${WRKSRC}/lib/${file}.so.${GLUT_VERSION} ${PREFIX}/lib
.endfor
.for file in GL GLU
	@ln -fs ${PREFIX}/lib/libMesa${file}.a ${PREFIX}/lib/lib${file}.a
	@ln -fs ${PREFIX}/lib/libMesa${file}.so.${MESA_VERSION} ${PREFIX}/lib/lib${file}.so.${MESA_VERSION}
.endfor
	@${MKDIR} ${PREFIX}/include/GL
	${INSTALL_DATA} ${WRKSRC}/include/GL/* ${PREFIX}/include/GL
	@${MKDIR} ${PREFIX}/share/examples/Mesa
	${CP} -Rp ${WRKSRC}/samples ${PREFIX}/share/examples/Mesa
	${CP} -Rp ${WRKSRC}/demos ${PREFIX}/share/examples/Mesa
	${CP} -Rp ${WRKSRC}/book ${PREFIX}/share/examples/Mesa
	${CP} -Rp ${WRKSRC}/widgets-sgi ${PREFIX}/share/examples/Mesa
	chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/Mesa
	${LDCONFIG} || ${TRUE}

.include <bsd.port.mk>