| @@ -1,98 +1,98 @@ | | | @@ -1,98 +1,98 @@ |
1 | # $NetBSD: Makefile.lib,v 1.7 2008/04/24 07:40:23 bjs Exp $ | | 1 | # $NetBSD: Makefile.lib,v 1.8 2008/04/26 20:38:49 tnn Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is included by all packages that build libraries | | 3 | # This Makefile fragment is included by all packages that build libraries |
4 | # from the Mesa sources. | | 4 | # from the Mesa sources. |
5 | # | | 5 | # |
6 | | | 6 | |
7 | .include "../../graphics/Mesa/Makefile.common" | | 7 | .include "../../graphics/Mesa/Makefile.common" |
8 | | | 8 | |
9 | DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX} | | 9 | DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX} |
10 | DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX} | | 10 | DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX} |
11 | DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX} | | 11 | DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX} |
12 | | | 12 | |
13 | PKG_INSTALLATION_TYPES= overwrite pkgviews | | 13 | PKG_INSTALLATION_TYPES= overwrite pkgviews |
14 | | | 14 | |
15 | USE_LANGUAGES= c c++ | | 15 | USE_LANGUAGES= c c++ |
16 | USE_LIBTOOL= yes | | 16 | USE_LIBTOOL= yes |
17 | USE_TOOLS+= gmake makedepend pkg-config | | 17 | USE_TOOLS+= gmake makedepend pkg-config |
18 | | | 18 | |
19 | PATCHDIR= ${.CURDIR}/../MesaLib/patches | | 19 | PATCHDIR= ${.CURDIR}/../MesaLib/patches |
20 | DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo | | 20 | DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo |
21 | | | 21 | |
22 | COPTS?= # empty | | 22 | COPTS?= # empty |
23 | COPTS+= -prefer-pic # Make sure to build PIC libraries. | | 23 | COPTS+= -prefer-pic # Make sure to build PIC libraries. |
24 | | | 24 | |
25 | MAKE_ENV+= MAKE=${GMAKE:Q} | | 25 | MAKE_ENV+= MAKE=${GMAKE:Q} |
26 | MAKE_ENV+= COPTS=${COPTS:M*:Q} | | 26 | MAKE_ENV+= COPTS=${COPTS:M*:Q} |
27 | | | 27 | |
28 | #.if ${X11_TYPE} == "modular" | | 28 | #.if ${X11_TYPE} == "modular" |
29 | #. if defined(PKG_BUILD_OPTIONS.libX11) && \ | | 29 | #. if defined(PKG_BUILD_OPTIONS.libX11) && \ |
30 | # !empty(PKG_BUILD_OPTIONS.libX11:Mxcb) | | 30 | # !empty(PKG_BUILD_OPTIONS.libX11:Mxcb) |
31 | #MAKE_ENV+= USE_XCB=yes | | 31 | #MAKE_ENV+= USE_XCB=yes |
32 | #. endif | | 32 | #. endif |
33 | #.endif | | 33 | #.endif |
34 | | | 34 | |
35 | #.if empty(MAKE_ENV:MUSE_XCB=*) | | 35 | #.if empty(MAKE_ENV:MUSE_XCB=*) |
36 | MAKE_ENV+= USE_XCB=no | | 36 | MAKE_ENV+= USE_XCB=no |
37 | #.endif | | 37 | #.endif |
38 | | | 38 | |
39 | .include "../../mk/compiler.mk" | | 39 | .include "../../mk/compiler.mk" |
40 | | | 40 | |
41 | MESA_HZ?= 100 | | 41 | MESA_HZ?= 100 |
42 | MAKE_ENV+= MESA_HZ=${MESA_HZ:Q} | | 42 | MAKE_ENV+= MESA_HZ=${MESA_HZ:Q} |
43 | .if ${OPSYS} == "NetBSD" && exists(/sbin/sysctl) | | 43 | .if ${OPSYS} == "NetBSD" && exists(/sbin/sysctl) |
44 | tmphz=\ | | 44 | tmphz=\ |
45 | ${sysctl kern.clockrate || ${TRUE}\ | | 45 | ${/sbin/sysctl kern.clockrate || ${TRUE}\ |
46 | :L:sh:ts,:S/,//gW:C/([^[0-9]]*)(=|[^ hz])*([^[0-9])//g:M[0-9]*} | | 46 | :L:sh:ts,:S/,//gW:C/([^[0-9]]*)(=|[^ hz])*([^[0-9])//g:M[0-9]*} |
47 | . if !empty(tmphz) && (${tmphz} > 50) && (${tmphz} < 2001) | | 47 | . if !empty(tmphz) && (${tmphz} > 50) && (${tmphz} < 2001) |
48 | MESA_HZ= ${tmphz} | | 48 | MESA_HZ= ${tmphz} |
49 | . endif | | 49 | . endif |
50 | .endif | | 50 | .endif |
51 | ### | | 51 | ### |
52 | ### XXX do we still want this? | | 52 | ### XXX do we still want this? |
53 | ### | | 53 | ### |
54 | .if ${OPSYS} == "SunOS" | | 54 | .if ${OPSYS} == "SunOS" |
55 | . if ${MACHINE_ARCH} == "sparc" | | 55 | . if ${MACHINE_ARCH} == "sparc" |
56 | . if !empty(PKGSRC_COMPILER:Msunpro) | | 56 | . if !empty(PKGSRC_COMPILER:Msunpro) |
57 | BUILD_TARGET= sunos5 | | 57 | BUILD_TARGET= sunos5 |
58 | . else | | 58 | . else |
59 | BUILD_TARGET= sunos5-gcc | | 59 | BUILD_TARGET= sunos5-gcc |
60 | . endif | | 60 | . endif |
61 | . else | | 61 | . else |
62 | BUILD_TARGET?= pkgsrc | | 62 | BUILD_TARGET?= pkgsrc |
63 | . endif | | 63 | . endif |
64 | .elif ${OPSYS} == "Interix" | | 64 | .elif ${OPSYS} == "Interix" |
65 | BUILD_TARGET= interix3 | | 65 | BUILD_TARGET= interix3 |
66 | .else | | 66 | .else |
67 | BUILD_TARGET?= pkgsrc | | 67 | BUILD_TARGET?= pkgsrc |
68 | .endif | | 68 | .endif |
69 | | | 69 | |
70 | RM_PATCH_BACKUP_DIRS= docs src/mesa src/glut/glx \ | | 70 | RM_PATCH_BACKUP_DIRS= docs src/mesa src/glut/glx \ |
71 | progs/demos progs/xdemos progs/glsl | | 71 | progs/demos progs/xdemos progs/glsl |
72 | pre-patch: | | 72 | pre-patch: |
73 | @ for fn in ${RM_PATCH_BACKUP_DIRS}; do \ | | 73 | @ for fn in ${RM_PATCH_BACKUP_DIRS}; do \ |
74 | ${RM} -f ${WRKSRC}/$${fn}/*.orig; \ | | 74 | ${RM} -f ${WRKSRC}/$${fn}/*.orig; \ |
75 | done | | 75 | done |
76 | | | 76 | |
77 | post-patch: | | 77 | post-patch: |
78 | ${CP} ${.CURDIR}/../MesaLib/files/configs/[a-z]* ${WRKSRC}/configs | | 78 | ${CP} ${.CURDIR}/../MesaLib/files/configs/[a-z]* ${WRKSRC}/configs |
79 | | | 79 | |
80 | post-install: install-headers | | 80 | post-install: install-headers |
81 | | | 81 | |
82 | .PHONY: install-headers | | 82 | .PHONY: install-headers |
83 | install-headers: | | 83 | install-headers: |
84 | ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL | | 84 | ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/GL |
85 | .for hdr in ${MESA_HEADERS} | | 85 | .for hdr in ${MESA_HEADERS} |
86 | if [ -f ${WRKSRC}/include/GL/${hdr:Q} ]; then \ | | 86 | if [ -f ${WRKSRC}/include/GL/${hdr:Q} ]; then \ |
87 | ${INSTALL_DATA} ${WRKSRC}/include/GL/${hdr:Q} \ | | 87 | ${INSTALL_DATA} ${WRKSRC}/include/GL/${hdr:Q} \ |
88 | ${DESTDIR}${PREFIX}/include/GL; \ | | 88 | ${DESTDIR}${PREFIX}/include/GL; \ |
89 | fi; | | 89 | fi; |
90 | .endfor | | 90 | .endfor |
91 | | | 91 | |
92 | SUBST_CLASSES+= fix-paths | | 92 | SUBST_CLASSES+= fix-paths |
93 | SUBST_STAGE.fix-paths= pre-configure | | 93 | SUBST_STAGE.fix-paths= pre-configure |
94 | SUBST_MESSAGE.fix-paths= Fixing absolute paths. | | 94 | SUBST_MESSAGE.fix-paths= Fixing absolute paths. |
95 | SUBST_FILES.fix-paths= src/*.c | | 95 | SUBST_FILES.fix-paths= src/*.c |
96 | SUBST_FILES.fix-paths+= scripts/*.sh | | 96 | SUBST_FILES.fix-paths+= scripts/*.sh |
97 | SUBST_SED.fix-paths= -e 's,"/usr/local,"${PREFIX},g' | | 97 | SUBST_SED.fix-paths= -e 's,"/usr/local,"${PREFIX},g' |
98 | SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g' | | 98 | SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g' |