Sat Apr 26 20:38:49 2008 UTC ()
Use full path to sysctl(8), an unprivileged user may not have /sbin in $PATH


(tnn)
diff -r1.7 -r1.8 pkgsrc/graphics/Mesa/Makefile.lib

cvs diff -r1.7 -r1.8 pkgsrc/graphics/Mesa/Attic/Makefile.lib (switch to unified diff)

--- pkgsrc/graphics/Mesa/Attic/Makefile.lib 2008/04/24 07:40:23 1.7
+++ pkgsrc/graphics/Mesa/Attic/Makefile.lib 2008/04/26 20:38:49 1.8
@@ -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
9DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX} 9DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX}
10DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX} 10DISTFILES+= MesaGLUT-${MESA_VERSION}${EXTRACT_SUFX}
11DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX} 11DISTFILES+= MesaDemos-${MESA_VERSION}${EXTRACT_SUFX}
12 12
13PKG_INSTALLATION_TYPES= overwrite pkgviews 13PKG_INSTALLATION_TYPES= overwrite pkgviews
14 14
15USE_LANGUAGES= c c++ 15USE_LANGUAGES= c c++
16USE_LIBTOOL= yes 16USE_LIBTOOL= yes
17USE_TOOLS+= gmake makedepend pkg-config 17USE_TOOLS+= gmake makedepend pkg-config
18 18
19PATCHDIR= ${.CURDIR}/../MesaLib/patches 19PATCHDIR= ${.CURDIR}/../MesaLib/patches
20DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo 20DISTINFO_FILE= ${.CURDIR}/../MesaLib/distinfo
21 21
22COPTS?= # empty 22COPTS?= # empty
23COPTS+= -prefer-pic # Make sure to build PIC libraries. 23COPTS+= -prefer-pic # Make sure to build PIC libraries.
24 24
25MAKE_ENV+= MAKE=${GMAKE:Q} 25MAKE_ENV+= MAKE=${GMAKE:Q}
26MAKE_ENV+= COPTS=${COPTS:M*:Q} 26MAKE_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=*)
36MAKE_ENV+= USE_XCB=no 36MAKE_ENV+= USE_XCB=no
37#.endif 37#.endif
38 38
39.include "../../mk/compiler.mk" 39.include "../../mk/compiler.mk"
40 40
41MESA_HZ?= 100 41MESA_HZ?= 100
42MAKE_ENV+= MESA_HZ=${MESA_HZ:Q} 42MAKE_ENV+= MESA_HZ=${MESA_HZ:Q}
43.if ${OPSYS} == "NetBSD" && exists(/sbin/sysctl) 43.if ${OPSYS} == "NetBSD" && exists(/sbin/sysctl)
44tmphz=\ 44tmphz=\
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)
48MESA_HZ= ${tmphz} 48MESA_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)
57BUILD_TARGET= sunos5 57BUILD_TARGET= sunos5
58. else 58. else
59BUILD_TARGET= sunos5-gcc 59BUILD_TARGET= sunos5-gcc
60. endif 60. endif
61. else 61. else
62BUILD_TARGET?= pkgsrc 62BUILD_TARGET?= pkgsrc
63. endif 63. endif
64.elif ${OPSYS} == "Interix" 64.elif ${OPSYS} == "Interix"
65BUILD_TARGET= interix3 65BUILD_TARGET= interix3
66.else 66.else
67BUILD_TARGET?= pkgsrc 67BUILD_TARGET?= pkgsrc
68.endif 68.endif
69 69
70RM_PATCH_BACKUP_DIRS= docs src/mesa src/glut/glx \ 70RM_PATCH_BACKUP_DIRS= docs src/mesa src/glut/glx \
71 progs/demos progs/xdemos progs/glsl 71 progs/demos progs/xdemos progs/glsl
72pre-patch: 72pre-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
77post-patch: 77post-patch:
78 ${CP} ${.CURDIR}/../MesaLib/files/configs/[a-z]* ${WRKSRC}/configs 78 ${CP} ${.CURDIR}/../MesaLib/files/configs/[a-z]* ${WRKSRC}/configs
79 79
80post-install: install-headers 80post-install: install-headers
81 81
82.PHONY: install-headers 82.PHONY: install-headers
83install-headers: 83install-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
92SUBST_CLASSES+= fix-paths 92SUBST_CLASSES+= fix-paths
93SUBST_STAGE.fix-paths= pre-configure 93SUBST_STAGE.fix-paths= pre-configure
94SUBST_MESSAGE.fix-paths= Fixing absolute paths. 94SUBST_MESSAGE.fix-paths= Fixing absolute paths.
95SUBST_FILES.fix-paths= src/*.c 95SUBST_FILES.fix-paths= src/*.c
96SUBST_FILES.fix-paths+= scripts/*.sh 96SUBST_FILES.fix-paths+= scripts/*.sh
97SUBST_SED.fix-paths= -e 's,"/usr/local,"${PREFIX},g' 97SUBST_SED.fix-paths= -e 's,"/usr/local,"${PREFIX},g'
98SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g' 98SUBST_SED.fix-paths+= -e 's,"/var/log,"${VARBASE}/log,g'