| @@ -1,729 +1,729 @@ | | | @@ -1,729 +1,729 @@ |
1 | # $NetBSD: bsd.prefs.mk,v 1.312 2011/01/23 19:07:25 agc Exp $ | | 1 | # $NetBSD: bsd.prefs.mk,v 1.313 2011/01/31 08:18:44 sbd Exp $ |
2 | # | | 2 | # |
3 | # This file includes the mk.conf file, which contains the user settings. | | 3 | # This file includes the mk.conf file, which contains the user settings. |
4 | # | | 4 | # |
5 | # Packages should include this file before any of the .if directives, as | | 5 | # Packages should include this file before any of the .if directives, as |
6 | # well as before modifying variables like CFLAGS, LDFLAGS, and so on. | | 6 | # well as before modifying variables like CFLAGS, LDFLAGS, and so on. |
7 | # Otherwise the behavior may be unexpected. | | 7 | # Otherwise the behavior may be unexpected. |
8 | # | | 8 | # |
9 | # When mk.conf is included by this file, the following variables are | | 9 | # When mk.conf is included by this file, the following variables are |
10 | # defined: | | 10 | # defined: |
11 | # | | 11 | # |
12 | # ACCEPTABLE_LICENSES | | 12 | # ACCEPTABLE_LICENSES |
13 | # This variable is set to the list of Open Source licenses. See | | 13 | # This variable is set to the list of Open Source licenses. See |
14 | # mk/license.mk for details. | | 14 | # mk/license.mk for details. |
15 | # | | 15 | # |
16 | # MACHINE_PLATFORM | | 16 | # MACHINE_PLATFORM |
17 | # The platform for which the packages are built. It has the form | | 17 | # The platform for which the packages are built. It has the form |
18 | # ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}. | | 18 | # ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}. |
19 | # | | 19 | # |
20 | # NATIVE_MACHINE_PLATFORM | | 20 | # NATIVE_MACHINE_PLATFORM |
21 | # The platform on which the packages are built. This is usually | | 21 | # The platform on which the packages are built. This is usually |
22 | # the same as ${MACHINE_PLATFORM}, but can be different when | | 22 | # the same as ${MACHINE_PLATFORM}, but can be different when |
23 | # cross-building packages. | | 23 | # cross-building packages. |
24 | # | | 24 | # |
25 | # PKGPATH | | 25 | # PKGPATH |
26 | # The path of the package, relative to the pkgsrc top-level | | 26 | # The path of the package, relative to the pkgsrc top-level |
27 | # directory. Typical values look like editors/emacs or | | 27 | # directory. Typical values look like editors/emacs or |
28 | # misc/openoffice-bin. | | 28 | # misc/openoffice-bin. |
29 | # | | 29 | # |
30 | # Keywords: mk.conf user | | 30 | # Keywords: mk.conf user |
31 | # | | 31 | # |
32 | | | 32 | |
33 | .if !defined(BSD_PKG_MK) | | 33 | .if !defined(BSD_PKG_MK) |
34 | | | 34 | |
35 | # Let mk.conf know that this is pkgsrc. | | 35 | # Let mk.conf know that this is pkgsrc. |
36 | BSD_PKG_MK=1 | | 36 | BSD_PKG_MK=1 |
37 | __PREFIX_SET__:=${PREFIX} | | 37 | __PREFIX_SET__:=${PREFIX} |
38 | | | 38 | |
39 | # Set PATH if not already set | | 39 | # Set PATH if not already set |
40 | .if !defined(PATH) | | 40 | .if !defined(PATH) |
41 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | | 41 | PATH=/bin:/usr/bin:/sbin:/usr/sbin |
42 | .endif | | 42 | .endif |
43 | | | 43 | |
44 | # Expand MAKE to a full path. | | 44 | # Expand MAKE to a full path. |
45 | .if !defined(_MAKE) | | 45 | .if !defined(_MAKE) |
46 | _MAKE:= ${MAKE} | | 46 | _MAKE:= ${MAKE} |
47 | # allow for MAKE=./make and similar. | | 47 | # allow for MAKE=./make and similar. |
48 | . if empty(_MAKE:M/*) && !empty(_MAKE:M*/*) && defined(PWD) && exists(${PWD}/${MAKE}) | | 48 | . if empty(_MAKE:M/*) && !empty(_MAKE:M*/*) && defined(PWD) && exists(${PWD}/${MAKE}) |
49 | _MAKE:= ${PWD}/${MAKE} | | 49 | _MAKE:= ${PWD}/${MAKE} |
50 | . endif | | 50 | . endif |
51 | . for _dir_ in ${PATH:C/\:/ /g} | | 51 | . for _dir_ in ${PATH:C/\:/ /g} |
52 | . if empty(_MAKE:M/*) | | 52 | . if empty(_MAKE:M/*) |
53 | . if exists(${_dir_}/${MAKE}) | | 53 | . if exists(${_dir_}/${MAKE}) |
54 | _MAKE:= ${_dir_}/${MAKE} | | 54 | _MAKE:= ${_dir_}/${MAKE} |
55 | . endif | | 55 | . endif |
56 | . endif | | 56 | . endif |
57 | . endfor | | 57 | . endfor |
58 | . if !empty(_MAKE:M/*) | | 58 | . if !empty(_MAKE:M/*) |
59 | MAKEFLAGS+= _MAKE=${_MAKE:Q} | | 59 | MAKEFLAGS+= _MAKE=${_MAKE:Q} |
60 | . endif | | 60 | . endif |
61 | .endif | | 61 | .endif |
62 | MAKE:= ${_MAKE} | | 62 | MAKE:= ${_MAKE} |
63 | | | 63 | |
64 | .if exists(/usr/bin/uname) | | 64 | .if exists(/usr/bin/uname) |
65 | UNAME=/usr/bin/uname | | 65 | UNAME=/usr/bin/uname |
66 | .elif exists(/bin/uname) | | 66 | .elif exists(/bin/uname) |
67 | UNAME=/bin/uname | | 67 | UNAME=/bin/uname |
68 | .else | | 68 | .else |
69 | UNAME=echo Unknown | | 69 | UNAME=echo Unknown |
70 | .endif | | 70 | .endif |
71 | | | 71 | |
72 | .if !defined(OPSYS) | | 72 | .if !defined(OPSYS) |
73 | OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g} | | 73 | OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g} |
74 | MAKEFLAGS+= OPSYS=${OPSYS:Q} | | 74 | MAKEFLAGS+= OPSYS=${OPSYS:Q} |
75 | .endif | | 75 | .endif |
76 | | | 76 | |
77 | # The _CMD indirection allows code below to modify these values | | 77 | # The _CMD indirection allows code below to modify these values |
78 | # without executing the commands at all. Later, recursed make | | 78 | # without executing the commands at all. Later, recursed make |
79 | # invocations will skip these blocks entirely thanks to MAKEFLAGS. | | 79 | # invocations will skip these blocks entirely thanks to MAKEFLAGS. |
80 | .if !defined(OS_VERSION) | | 80 | .if !defined(OS_VERSION) |
81 | _OS_VERSION_CMD= ${UNAME} -r | | 81 | _OS_VERSION_CMD= ${UNAME} -r |
82 | OS_VERSION= ${_OS_VERSION_CMD:sh} | | 82 | OS_VERSION= ${_OS_VERSION_CMD:sh} |
83 | MAKEFLAGS+= OS_VERSION=${OS_VERSION:Q} | | 83 | MAKEFLAGS+= OS_VERSION=${OS_VERSION:Q} |
84 | .endif | | 84 | .endif |
85 | | | 85 | |
86 | # Preload these for architectures not in all variations of bsd.own.mk, | | 86 | # Preload these for architectures not in all variations of bsd.own.mk, |
87 | # which do not match their GNU names exactly. | | 87 | # which do not match their GNU names exactly. |
88 | GNU_ARCH.arm26?= arm | | 88 | GNU_ARCH.arm26?= arm |
89 | GNU_ARCH.arm32?= arm | | 89 | GNU_ARCH.arm32?= arm |
90 | GNU_ARCH.i486?= i386 | | 90 | GNU_ARCH.i486?= i386 |
91 | GNU_ARCH.i586?= i386 | | 91 | GNU_ARCH.i586?= i386 |
92 | GNU_ARCH.i686?= i386 | | 92 | GNU_ARCH.i686?= i386 |
93 | GNU_ARCH.m68000?= m68010 | | 93 | GNU_ARCH.m68000?= m68010 |
94 | GNU_ARCH.mips?= mipsel | | 94 | GNU_ARCH.mips?= mipsel |
95 | GNU_ARCH.sh3eb?= sh | | 95 | GNU_ARCH.sh3eb?= sh |
96 | GNU_ARCH.sh3el?= shle | | 96 | GNU_ARCH.sh3el?= shle |
97 | NATIVE_MACHINE_GNU_ARCH?= ${GNU_ARCH.${NATIVE_MACHINE_ARCH}:U${NATIVE_MACHINE_ARCH}} | | 97 | NATIVE_MACHINE_GNU_ARCH?= ${GNU_ARCH.${NATIVE_MACHINE_ARCH}:U${NATIVE_MACHINE_ARCH}} |
98 | MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} | | 98 | MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} |
99 | | | 99 | |
100 | ## If changes are made to how OS_VERSION is set below please keep | | 100 | ## If changes are made to how OS_VERSION is set below please keep |
101 | ## "pkgsrc/pkgtools/osabi/INSTALL" in-sync. | | 101 | ## "pkgsrc/pkgtools/osabi/INSTALL" in-sync. |
102 | .if ${OPSYS} == "NetBSD" | | 102 | .if ${OPSYS} == "NetBSD" |
103 | LOWER_OPSYS?= netbsd | | 103 | LOWER_OPSYS?= netbsd |
104 | | | 104 | |
105 | .elif ${OPSYS} == "AIX" | | 105 | .elif ${OPSYS} == "AIX" |
106 | LOWER_ARCH!= _cpuid=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $$1 }'`; \ | | 106 | LOWER_ARCH!= _cpuid=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $$1 }'`; \ |
107 | if /usr/sbin/lsattr -El $$_cpuid | grep ' POWER' >/dev/null 2>&1; then \ | | 107 | if /usr/sbin/lsattr -El $$_cpuid | grep ' POWER' >/dev/null 2>&1; then \ |
108 | echo rs6000; \ | | 108 | echo rs6000; \ |
109 | else \ | | 109 | else \ |
110 | echo powerpc; \ | | 110 | echo powerpc; \ |
111 | fi | | 111 | fi |
112 | MACHINE_ARCH?= ${LOWER_ARCH} | | 112 | MACHINE_ARCH?= ${LOWER_ARCH} |
113 | . if exists(/usr/bin/oslevel) | | 113 | . if exists(/usr/bin/oslevel) |
114 | _OS_VERSION!= /usr/bin/oslevel | | 114 | _OS_VERSION!= /usr/bin/oslevel |
115 | . else | | 115 | . else |
116 | _OS_VERSION!= echo `${UNAME} -v`.`${UNAME} -r` | | 116 | _OS_VERSION!= echo `${UNAME} -v`.`${UNAME} -r` |
117 | . endif | | 117 | . endif |
118 | OS_VERSION= ${_OS_VERSION:C/\([0-9]*\.[0-9]*\).*/\1/} | | 118 | OS_VERSION= ${_OS_VERSION:C/([0-9]*\.[0-9]*).*/\1/} |
119 | LOWER_OPSYS_VERSUFFIX= ${_OS_VERSION} | | 119 | LOWER_OPSYS_VERSUFFIX= ${_OS_VERSION} |
120 | LOWER_OPSYS?= aix | | 120 | LOWER_OPSYS?= aix |
121 | LOWER_VENDOR?= ibm | | 121 | LOWER_VENDOR?= ibm |
122 | | | 122 | |
123 | .elif ${OPSYS} == "BSDOS" | | 123 | .elif ${OPSYS} == "BSDOS" |
124 | LOWER_OPSYS?= bsdi | | 124 | LOWER_OPSYS?= bsdi |
125 | | | 125 | |
126 | .elif ${OPSYS} == "Darwin" | | 126 | .elif ${OPSYS} == "Darwin" |
127 | LOWER_OPSYS?= darwin | | 127 | LOWER_OPSYS?= darwin |
128 | .if empty(OS_VERSION:M[1-9].*.*) | | 128 | .if empty(OS_VERSION:M[1-9].*.*) |
129 | # Automatically select the ABI under Mac OS X Snow Leopard. We don't | | 129 | # Automatically select the ABI under Mac OS X Snow Leopard. We don't |
130 | # use this at the moment because too many third party programs don't | | 130 | # use this at the moment because too many third party programs don't |
131 | # work with it. | | 131 | # work with it. |
132 | # | | 132 | # |
133 | # _SYSCTL_HW_OPTIONAL_X86_64!= /usr/sbin/sysctl -n hw.optional.x86_64 | | 133 | # _SYSCTL_HW_OPTIONAL_X86_64!= /usr/sbin/sysctl -n hw.optional.x86_64 |
134 | # . if ${_SYSCTL_HW_OPTIONAL_X86_64} == "1" | | 134 | # . if ${_SYSCTL_HW_OPTIONAL_X86_64} == "1" |
135 | # ABI= 64 | | 135 | # ABI= 64 |
136 | # .else | | 136 | # .else |
137 | # ABI= 32 | | 137 | # ABI= 32 |
138 | #. endif | | 138 | #. endif |
139 | ABI= 32 | | 139 | ABI= 32 |
140 | LOWER_ARCH.32= i386 | | 140 | LOWER_ARCH.32= i386 |
141 | LOWER_ARCH.64= x86_64 | | 141 | LOWER_ARCH.64= x86_64 |
142 | LOWER_ARCH= ${LOWER_ARCH.${ABI}} | | 142 | LOWER_ARCH= ${LOWER_ARCH.${ABI}} |
143 | .else | | 143 | .else |
144 | LOWER_ARCH!= ${UNAME} -p | | 144 | LOWER_ARCH!= ${UNAME} -p |
145 | .endif | | 145 | .endif |
146 | MACHINE_ARCH= ${LOWER_ARCH} | | 146 | MACHINE_ARCH= ${LOWER_ARCH} |
147 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} | | 147 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} |
148 | LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} | | 148 | LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} |
149 | LOWER_VENDOR?= apple | | 149 | LOWER_VENDOR?= apple |
150 | | | 150 | |
151 | .elif ${OPSYS} == "DragonFly" | | 151 | .elif ${OPSYS} == "DragonFly" |
152 | OS_VERSION:= ${OS_VERSION:C/-.*$//} | | 152 | OS_VERSION:= ${OS_VERSION:C/-.*$//} |
153 | LOWER_OPSYS?= dragonfly | | 153 | LOWER_OPSYS?= dragonfly |
154 | LOWER_ARCH!= ${UNAME} -p | | 154 | LOWER_ARCH!= ${UNAME} -p |
155 | . if ${LOWER_ARCH} == "amd64" | | 155 | . if ${LOWER_ARCH} == "amd64" |
156 | MACHINE_ARCH= x86_64 | | 156 | MACHINE_ARCH= x86_64 |
157 | . else | | 157 | . else |
158 | MACHINE_ARCH= ${LOWER_ARCH} | | 158 | MACHINE_ARCH= ${LOWER_ARCH} |
159 | . endif | | 159 | . endif |
160 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} | | 160 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} |
161 | LOWER_VENDOR?= pc | | 161 | LOWER_VENDOR?= pc |
162 | | | 162 | |
163 | .elif ${OPSYS} == "FreeBSD" | | 163 | .elif ${OPSYS} == "FreeBSD" |
164 | OS_VERSION:= ${OS_VERSION:C/-.*$//} | | 164 | OS_VERSION:= ${OS_VERSION:C/-.*$//} |
165 | LOWER_OPSYS?= freebsd | | 165 | LOWER_OPSYS?= freebsd |
166 | LOWER_ARCH!= ${UNAME} -p | | 166 | LOWER_ARCH!= ${UNAME} -p |
167 | . if ${LOWER_ARCH} == "amd64" | | 167 | . if ${LOWER_ARCH} == "amd64" |
168 | MACHINE_ARCH= x86_64 | | 168 | MACHINE_ARCH= x86_64 |
169 | . else | | 169 | . else |
170 | MACHINE_ARCH= ${LOWER_ARCH} | | 170 | MACHINE_ARCH= ${LOWER_ARCH} |
171 | . endif | | 171 | . endif |
172 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} | | 172 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} |
173 | LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} | | 173 | LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} |
174 | . if ${LOWER_ARCH} == "i386" | | 174 | . if ${LOWER_ARCH} == "i386" |
175 | LOWER_VENDOR?= pc | | 175 | LOWER_VENDOR?= pc |
176 | . endif | | 176 | . endif |
177 | LOWER_VENDOR?= unknown | | 177 | LOWER_VENDOR?= unknown |
178 | | | 178 | |
179 | .elif ${OPSYS} == "Haiku" | | 179 | .elif ${OPSYS} == "Haiku" |
180 | LOWER_OPSYS?= haiku | | 180 | LOWER_OPSYS?= haiku |
181 | . if ${MACHINE_ARCH} == "i386" | | 181 | . if ${MACHINE_ARCH} == "i386" |
182 | LOWER_VENDOR?= pc | | 182 | LOWER_VENDOR?= pc |
183 | . endif | | 183 | . endif |
184 | | | 184 | |
185 | .elif ${OPSYS} == "Interix" | | 185 | .elif ${OPSYS} == "Interix" |
186 | LOWER_OPSYS?= interix | | 186 | LOWER_OPSYS?= interix |
187 | LOWER_VENDOR?= pc | | 187 | LOWER_VENDOR?= pc |
188 | . if exists(/usr/lib/libc.so.5.2) || exists(/usr/lib/x86/libc.so.5.2) | | 188 | . if exists(/usr/lib/libc.so.5.2) || exists(/usr/lib/x86/libc.so.5.2) |
189 | LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} | | 189 | LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} |
190 | . else | | 190 | . else |
191 | LOWER_OPSYS_VERSUFFIX?= 3 | | 191 | LOWER_OPSYS_VERSUFFIX?= 3 |
192 | . if exists(/usr/lib/libc.so.3.5) | | 192 | . if exists(/usr/lib/libc.so.3.5) |
193 | OS_VERSION= 3.5 | | 193 | OS_VERSION= 3.5 |
194 | . elif exists(/usr/lib/libc.so.3.1) | | 194 | . elif exists(/usr/lib/libc.so.3.1) |
195 | OS_VERSION= 3.1 | | 195 | OS_VERSION= 3.1 |
196 | . else | | 196 | . else |
197 | OS_VERSION= 3.0 | | 197 | OS_VERSION= 3.0 |
198 | . endif | | 198 | . endif |
199 | . endif | | 199 | . endif |
200 | | | 200 | |
201 | .elif ${OPSYS} == "MirBSD" | | 201 | .elif ${OPSYS} == "MirBSD" |
202 | LOWER_OPSYS?= mirbsd | | 202 | LOWER_OPSYS?= mirbsd |
203 | LOWER_OS_VERSION= ${OS_VERSION} | | 203 | LOWER_OS_VERSION= ${OS_VERSION} |
204 | LOWER_OPSYS_VERSUFFIX= ${OS_VERSION} | | 204 | LOWER_OPSYS_VERSUFFIX= ${OS_VERSION} |
205 | LOWER_ARCH!= arch -s | | 205 | LOWER_ARCH!= arch -s |
206 | LOWER_VENDOR?= unknown | | 206 | LOWER_VENDOR?= unknown |
207 | MACHINE_ARCH= ${LOWER_ARCH} | | 207 | MACHINE_ARCH= ${LOWER_ARCH} |
208 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} | | 208 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} |
209 | | | 209 | |
210 | .elif !empty(OPSYS:MIRIX*) | | 210 | .elif !empty(OPSYS:MIRIX*) |
211 | LOWER_ARCH!= ${UNAME} -p | | 211 | LOWER_ARCH!= ${UNAME} -p |
212 | LOWER_OPSYS?= irix | | 212 | LOWER_OPSYS?= irix |
213 | LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} | | 213 | LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} |
214 | LOWER_VENDOR?= sgi | | 214 | LOWER_VENDOR?= sgi |
215 | | | 215 | |
216 | .elif ${OPSYS} == "Linux" | | 216 | .elif ${OPSYS} == "Linux" |
217 | OS_VERSION:= ${OS_VERSION:C/-.*$//} | | 217 | OS_VERSION:= ${OS_VERSION:C/-.*$//} |
218 | LOWER_OPSYS?= linux | | 218 | LOWER_OPSYS?= linux |
219 | MACHINE_ARCH:= ${MACHINE_ARCH:C/i.86/i386/} | | 219 | MACHINE_ARCH:= ${MACHINE_ARCH:C/i.86/i386/} |
220 | MACHINE_ARCH:= ${MACHINE_ARCH:C/ppc/powerpc/} | | 220 | MACHINE_ARCH:= ${MACHINE_ARCH:C/ppc/powerpc/} |
221 | . if !defined(LOWER_ARCH) | | 221 | . if !defined(LOWER_ARCH) |
222 | LOWER_ARCH!= ${UNAME} -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/' | | 222 | LOWER_ARCH!= ${UNAME} -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/' |
223 | . endif # !defined(LOWER_ARCH) | | 223 | . endif # !defined(LOWER_ARCH) |
224 | . if ${LOWER_ARCH} == "x86_64" | | 224 | . if ${LOWER_ARCH} == "x86_64" |
225 | MACHINE_ARCH= x86_64 | | 225 | MACHINE_ARCH= x86_64 |
226 | . endif | | 226 | . endif |
227 | . if ${MACHINE_ARCH} == "unknown" || ${MACHINE_ARCH} == "" | | 227 | . if ${MACHINE_ARCH} == "unknown" || ${MACHINE_ARCH} == "" |
228 | MACHINE_ARCH= ${LOWER_ARCH} | | 228 | MACHINE_ARCH= ${LOWER_ARCH} |
229 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} | | 229 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} |
230 | . endif | | 230 | . endif |
231 | . if exists(/etc/debian_version) | | 231 | . if exists(/etc/debian_version) |
232 | LOWER_VENDOR?= debian | | 232 | LOWER_VENDOR?= debian |
233 | . elif exists(/etc/mandrake-release) | | 233 | . elif exists(/etc/mandrake-release) |
234 | LOWER_VENDOR?= mandrake | | 234 | LOWER_VENDOR?= mandrake |
235 | . elif exists(/etc/redhat-version) | | 235 | . elif exists(/etc/redhat-version) |
236 | LOWER_VENDOR?= redhat | | 236 | LOWER_VENDOR?= redhat |
237 | . elif exists(/etc/slackware-version) | | 237 | . elif exists(/etc/slackware-version) |
238 | LOWER_VENDOR?= slackware | | 238 | LOWER_VENDOR?= slackware |
239 | . elif exists(/etc/ssdlinux_version) | | 239 | . elif exists(/etc/ssdlinux_version) |
240 | LOWER_VENDOR?= ssd | | 240 | LOWER_VENDOR?= ssd |
241 | . elif ${LOWER_ARCH} == "i386" | | 241 | . elif ${LOWER_ARCH} == "i386" |
242 | LOWER_VENDOR?= pc | | 242 | LOWER_VENDOR?= pc |
243 | . endif | | 243 | . endif |
244 | LOWER_VENDOR?= unknown | | 244 | LOWER_VENDOR?= unknown |
245 | | | 245 | |
246 | .elif ${OPSYS} == "OSF1" | | 246 | .elif ${OPSYS} == "OSF1" |
247 | LOWER_ARCH!= ${UNAME} -p | | 247 | LOWER_ARCH!= ${UNAME} -p |
248 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} | | 248 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} |
249 | MACHINE_ARCH?= ${LOWER_ARCH} | | 249 | MACHINE_ARCH?= ${LOWER_ARCH} |
250 | OS_VERSION:= ${OS_VERSION:C/^V//} | | 250 | OS_VERSION:= ${OS_VERSION:C/^V//} |
251 | LOWER_OPSYS?= osf1 | | 251 | LOWER_OPSYS?= osf1 |
252 | LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} | | 252 | LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} |
253 | LOWER_VENDOR?= dec | | 253 | LOWER_VENDOR?= dec |
254 | | | 254 | |
255 | .elif ${OPSYS} == "HPUX" | | 255 | .elif ${OPSYS} == "HPUX" |
256 | OS_VERSION:= ${OS_VERSION:C/^B.//} | | 256 | OS_VERSION:= ${OS_VERSION:C/^B.//} |
257 | .if ${MACHINE_ARCH} == "9000" | | 257 | .if ${MACHINE_ARCH} == "9000" |
258 | MACHINE_ARCH= hppa | | 258 | MACHINE_ARCH= hppa |
259 | .endif | | 259 | .endif |
260 | LOWER_OPSYS?= hpux | | 260 | LOWER_OPSYS?= hpux |
261 | LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} | | 261 | LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} |
262 | LOWER_VENDOR?= hp | | 262 | LOWER_VENDOR?= hp |
263 | | | 263 | |
264 | .elif ${OPSYS} == "SunOS" | | 264 | .elif ${OPSYS} == "SunOS" |
265 | . if ${MACHINE_ARCH} == "sparc" | | 265 | . if ${MACHINE_ARCH} == "sparc" |
266 | SPARC_TARGET_ARCH?= sparcv7 | | 266 | SPARC_TARGET_ARCH?= sparcv7 |
267 | . elif ${MACHINE_ARCH} == "sun4" | | 267 | . elif ${MACHINE_ARCH} == "sun4" |
268 | MACHINE_ARCH= sparc | | 268 | MACHINE_ARCH= sparc |
269 | SPARC_TARGET_ARCH?= sparcv7 | | 269 | SPARC_TARGET_ARCH?= sparcv7 |
270 | . elif ${MACHINE_ARCH} == "i86pc" || ${MACHINE_ARCH} == "i86xpv" | | 270 | . elif ${MACHINE_ARCH} == "i86pc" || ${MACHINE_ARCH} == "i86xpv" |
271 | MACHINE_ARCH= i386 | | 271 | MACHINE_ARCH= i386 |
272 | . elif ${MACHINE_ARCH} == "unknown" | | 272 | . elif ${MACHINE_ARCH} == "unknown" |
273 | . if !defined(LOWER_ARCH) | | 273 | . if !defined(LOWER_ARCH) |
274 | LOWER_ARCH!= ${UNAME} -p | | 274 | LOWER_ARCH!= ${UNAME} -p |
275 | . endif # !defined(LOWER_ARCH) | | 275 | . endif # !defined(LOWER_ARCH) |
276 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} | | 276 | MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} |
277 | . endif | | 277 | . endif |
278 | LOWER_VENDOR?= sun | | 278 | LOWER_VENDOR?= sun |
279 | LOWER_OPSYS?= solaris | | 279 | LOWER_OPSYS?= solaris |
280 | LOWER_OPSYS_VERSUFFIX= 2 | | 280 | LOWER_OPSYS_VERSUFFIX= 2 |
281 | | | 281 | |
282 | .elif !defined(LOWER_OPSYS) | | 282 | .elif !defined(LOWER_OPSYS) |
283 | LOWER_OPSYS:= ${OPSYS:tl} | | 283 | LOWER_OPSYS:= ${OPSYS:tl} |
284 | .endif | | 284 | .endif |
285 | | | 285 | |
286 | # Now commit the [LOWER_]OS_VERSION values computed above, eliding the :sh | | 286 | # Now commit the [LOWER_]OS_VERSION values computed above, eliding the :sh |
287 | OS_VERSION:= ${OS_VERSION} | | 287 | OS_VERSION:= ${OS_VERSION} |
288 | LOWER_OS_VERSION:= ${OS_VERSION:tl} | | 288 | LOWER_OS_VERSION:= ${OS_VERSION:tl} |
289 | | | 289 | |
290 | MAKEFLAGS+= LOWER_OPSYS=${LOWER_OPSYS:Q} | | 290 | MAKEFLAGS+= LOWER_OPSYS=${LOWER_OPSYS:Q} |
291 | | | 291 | |
292 | LOWER_VENDOR?= # empty ("arch--opsys") | | 292 | LOWER_VENDOR?= # empty ("arch--opsys") |
293 | LOWER_ARCH?= ${MACHINE_GNU_ARCH} | | 293 | LOWER_ARCH?= ${MACHINE_GNU_ARCH} |
294 | # Expand now as MACHINE_ARCH can be overriden in mk.conf and | | 294 | # Expand now as MACHINE_ARCH can be overriden in mk.conf and |
295 | # LOWER_ARCH is typically derived from it. | | 295 | # LOWER_ARCH is typically derived from it. |
296 | NATIVE_LOWER_ARCH:= ${LOWER_ARCH} | | 296 | NATIVE_LOWER_ARCH:= ${LOWER_ARCH} |
297 | NATIVE_MACHINE_ARCH:= ${MACHINE_ARCH} | | 297 | NATIVE_MACHINE_ARCH:= ${MACHINE_ARCH} |
298 | | | 298 | |
299 | NATIVE_MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${NATIVE_MACHINE_ARCH} | | 299 | NATIVE_MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${NATIVE_MACHINE_ARCH} |
300 | MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} | | 300 | MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} |
301 | NATIVE_MACHINE_GNU_PLATFORM?= ${NATIVE_MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX} | | 301 | NATIVE_MACHINE_GNU_PLATFORM?= ${NATIVE_MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX} |
302 | MACHINE_GNU_PLATFORM?= ${MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX} | | 302 | MACHINE_GNU_PLATFORM?= ${MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX} |
303 | | | 303 | |
304 | # Needed to prevent an "install:" target from being created in bsd.own.mk. | | 304 | # Needed to prevent an "install:" target from being created in bsd.own.mk. |
305 | NEED_OWN_INSTALL_TARGET=no | | 305 | NEED_OWN_INSTALL_TARGET=no |
306 | | | 306 | |
307 | # This prevents default use of the cross-tool harness in the "src" tree, | | 307 | # This prevents default use of the cross-tool harness in the "src" tree, |
308 | # in the odd possible case of someone extracting "pkgsrc" underneath "src". | | 308 | # in the odd possible case of someone extracting "pkgsrc" underneath "src". |
309 | USETOOLS= no | | 309 | USETOOLS= no |
310 | MAKE_ENV+= USETOOLS=no | | 310 | MAKE_ENV+= USETOOLS=no |
311 | | | 311 | |
312 | # Set this before <bsd.own.mk> does, since it doesn't know about Darwin | | 312 | # Set this before <bsd.own.mk> does, since it doesn't know about Darwin |
313 | .if ${OPSYS} == "Darwin" | | 313 | .if ${OPSYS} == "Darwin" |
314 | OBJECT_FMT?= Mach-O | | 314 | OBJECT_FMT?= Mach-O |
315 | .endif | | 315 | .endif |
316 | | | 316 | |
317 | ACCEPTABLE_LICENSES?= ${DEFAULT_ACCEPTABLE_LICENSES} | | 317 | ACCEPTABLE_LICENSES?= ${DEFAULT_ACCEPTABLE_LICENSES} |
318 | | | 318 | |
319 | # Provide PKGPATH early on so that mk.conf can use it. | | 319 | # Provide PKGPATH early on so that mk.conf can use it. |
320 | PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|} | | 320 | PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|} |
321 | | | 321 | |
322 | # Load the settings from MAKECONF, which is /etc/mk.conf by default. | | 322 | # Load the settings from MAKECONF, which is /etc/mk.conf by default. |
323 | .include <bsd.own.mk> | | 323 | .include <bsd.own.mk> |
324 | | | 324 | |
325 | # /usr/share/mk/bsd.own.mk on NetBSD 1.3 does not define OBJECT_FMT | | 325 | # /usr/share/mk/bsd.own.mk on NetBSD 1.3 does not define OBJECT_FMT |
326 | .if !empty(MACHINE_PLATFORM:MNetBSD-1.3*) | | 326 | .if !empty(MACHINE_PLATFORM:MNetBSD-1.3*) |
327 | . if ${MACHINE_ARCH} == "alpha" || \ | | 327 | . if ${MACHINE_ARCH} == "alpha" || \ |
328 | ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ | | 328 | ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ |
329 | ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" | | 329 | ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" |
330 | OBJECT_FMT?= ELF | | 330 | OBJECT_FMT?= ELF |
331 | . else | | 331 | . else |
332 | OBJECT_FMT?= a.out | | 332 | OBJECT_FMT?= a.out |
333 | . endif | | 333 | . endif |
334 | # override what bootstrap-pkgsrc sets, which isn't right for NetBSD | | 334 | # override what bootstrap-pkgsrc sets, which isn't right for NetBSD |
335 | # 1.4. | | 335 | # 1.4. |
336 | # XXX other ELF platforms in 1.4 need to be added to here. | | 336 | # XXX other ELF platforms in 1.4 need to be added to here. |
337 | .elif !empty(MACHINE_PLATFORM:MNetBSD-1.4*) | | 337 | .elif !empty(MACHINE_PLATFORM:MNetBSD-1.4*) |
338 | . if ${MACHINE_ARCH} == "alpha" || \ | | 338 | . if ${MACHINE_ARCH} == "alpha" || \ |
339 | ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ | | 339 | ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ |
340 | ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" | | 340 | ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" |
341 | OBJECT_FMT= ELF | | 341 | OBJECT_FMT= ELF |
342 | . else | | 342 | . else |
343 | OBJECT_FMT= a.out | | 343 | OBJECT_FMT= a.out |
344 | . endif | | 344 | . endif |
345 | .endif | | 345 | .endif |
346 | | | 346 | |
347 | .if ${OPSYS} == "OpenBSD" | | 347 | .if ${OPSYS} == "OpenBSD" |
348 | . if defined(ELF_TOOLCHAIN) && ${ELF_TOOLCHAIN} == "yes" | | 348 | . if defined(ELF_TOOLCHAIN) && ${ELF_TOOLCHAIN} == "yes" |
349 | OBJECT_FMT?= ELF | | 349 | OBJECT_FMT?= ELF |
350 | . else | | 350 | . else |
351 | OBJECT_FMT?= a.out | | 351 | OBJECT_FMT?= a.out |
352 | . endif | | 352 | . endif |
353 | .elif ${OPSYS} == "DragonFly" | | 353 | .elif ${OPSYS} == "DragonFly" |
354 | OBJECT_FMT= ELF | | 354 | OBJECT_FMT= ELF |
355 | .elif ${OPSYS} == "MirBSD" | | 355 | .elif ${OPSYS} == "MirBSD" |
356 | OBJECT_FMT= ELF | | 356 | OBJECT_FMT= ELF |
357 | MKPROFILE= no | | 357 | MKPROFILE= no |
358 | .elif ${OPSYS} == "AIX" | | 358 | .elif ${OPSYS} == "AIX" |
359 | OBJECT_FMT= XCOFF | | 359 | OBJECT_FMT= XCOFF |
360 | .elif ${OPSYS} == "OSF1" | | 360 | .elif ${OPSYS} == "OSF1" |
361 | OBJECT_FMT= ECOFF | | 361 | OBJECT_FMT= ECOFF |
362 | .elif ${OPSYS} == "HPUX" | | 362 | .elif ${OPSYS} == "HPUX" |
363 | . if ${MACHINE_ARCH} == "ia64" || (defined(ABI) && ${ABI} == "64") | | 363 | . if ${MACHINE_ARCH} == "ia64" || (defined(ABI) && ${ABI} == "64") |
364 | OBJECT_FMT= ELF | | 364 | OBJECT_FMT= ELF |
365 | . else | | 365 | . else |
366 | OBJECT_FMT= SOM | | 366 | OBJECT_FMT= SOM |
367 | . endif | | 367 | . endif |
368 | .endif | | 368 | .endif |
369 | | | 369 | |
370 | # Calculate depth | | 370 | # Calculate depth |
371 | .if exists(${.CURDIR}/mk/bsd.pkg.mk) | | 371 | .if exists(${.CURDIR}/mk/bsd.pkg.mk) |
372 | _PKGSRC_TOPDIR= ${.CURDIR} | | 372 | _PKGSRC_TOPDIR= ${.CURDIR} |
373 | .elif exists(${.CURDIR}/../mk/bsd.pkg.mk) | | 373 | .elif exists(${.CURDIR}/../mk/bsd.pkg.mk) |
374 | _PKGSRC_TOPDIR= ${.CURDIR}/.. | | 374 | _PKGSRC_TOPDIR= ${.CURDIR}/.. |
375 | .elif exists(${.CURDIR}/../../mk/bsd.pkg.mk) | | 375 | .elif exists(${.CURDIR}/../../mk/bsd.pkg.mk) |
376 | _PKGSRC_TOPDIR= ${.CURDIR}/../.. | | 376 | _PKGSRC_TOPDIR= ${.CURDIR}/../.. |
377 | .endif | | 377 | .endif |
378 | | | 378 | |
379 | # include the defaults file | | 379 | # include the defaults file |
380 | .include "${_PKGSRC_TOPDIR}/mk/defaults/mk.conf" | | 380 | .include "${_PKGSRC_TOPDIR}/mk/defaults/mk.conf" |
381 | | | 381 | |
382 | SHAREOWN?= ${DOCOWN} | | 382 | SHAREOWN?= ${DOCOWN} |
383 | SHAREGRP?= ${DOCGRP} | | 383 | SHAREGRP?= ${DOCGRP} |
384 | SHAREMODE?= ${DOCMODE} | | 384 | SHAREMODE?= ${DOCMODE} |
385 | | | 385 | |
386 | .if defined(PREFIX) && (${PREFIX} != ${__PREFIX_SET__}) | | 386 | .if defined(PREFIX) && (${PREFIX} != ${__PREFIX_SET__}) |
387 | .BEGIN: | | 387 | .BEGIN: |
388 | @${ECHO_MSG} "You CANNOT set PREFIX manually or in mk.conf. Set LOCALBASE or X11BASE" | | 388 | @${ECHO_MSG} "You CANNOT set PREFIX manually or in mk.conf. Set LOCALBASE or X11BASE" |
389 | @${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info." | | 389 | @${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info." |
390 | @${FALSE} | | 390 | @${FALSE} |
391 | .endif | | 391 | .endif |
392 | | | 392 | |
393 | # Load the OS-specific definitions for program variables. Default to loading | | 393 | # Load the OS-specific definitions for program variables. Default to loading |
394 | # the NetBSD ones if an OS-specific file doesn't exist. | | 394 | # the NetBSD ones if an OS-specific file doesn't exist. |
395 | .if exists(${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk) | | 395 | .if exists(${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk) |
396 | . include "${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk" | | 396 | . include "${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk" |
397 | .else | | 397 | .else |
398 | . include "${_PKGSRC_TOPDIR}/mk/platform/NetBSD.mk" | | 398 | . include "${_PKGSRC_TOPDIR}/mk/platform/NetBSD.mk" |
399 | PKG_FAIL_REASON+= "missing mk/platform/${OPSYS}.mk" | | 399 | PKG_FAIL_REASON+= "missing mk/platform/${OPSYS}.mk" |
400 | .endif | | 400 | .endif |
401 | | | 401 | |
402 | PKGDIRMODE?= 755 | | 402 | PKGDIRMODE?= 755 |
403 | | | 403 | |
404 | # A meta-package is a package that does not have any files and whose | | 404 | # A meta-package is a package that does not have any files and whose |
405 | # only purpose is to depend on other packages, giving that collection | | 405 | # only purpose is to depend on other packages, giving that collection |
406 | # a simple name. | | 406 | # a simple name. |
407 | # | | 407 | # |
408 | # This variable must be set before including bsd.prefs.mk directly or | | 408 | # This variable must be set before including bsd.prefs.mk directly or |
409 | # indirectly. | | 409 | # indirectly. |
410 | # | | 410 | # |
411 | # Keywords: meta meta-package META_PACKAGE | | 411 | # Keywords: meta meta-package META_PACKAGE |
412 | # | | 412 | # |
413 | .if defined(META_PACKAGE) | | 413 | .if defined(META_PACKAGE) |
414 | PKG_DESTDIR_SUPPORT= user-destdir | | 414 | PKG_DESTDIR_SUPPORT= user-destdir |
415 | NO_CONFIGURE= yes | | 415 | NO_CONFIGURE= yes |
416 | NO_BUILD= yes | | 416 | NO_BUILD= yes |
417 | DISTFILES= # none | | 417 | DISTFILES= # none |
418 | PLIST_SRC= # none | | 418 | PLIST_SRC= # none |
419 | CHECK_PERMS= no | | 419 | CHECK_PERMS= no |
420 | USE_LANGUAGES= # empty | | 420 | USE_LANGUAGES= # empty |
421 | do-patch: | | 421 | do-patch: |
422 | @${DO_NADA} | | 422 | @${DO_NADA} |
423 | do-install: | | 423 | do-install: |
424 | @${DO_NADA} | | 424 | @${DO_NADA} |
425 | .endif | | 425 | .endif |
426 | | | 426 | |
427 | # PKG_DESTDIR_SUPPORT can only be one of "destdir" or "user-destdir". | | 427 | # PKG_DESTDIR_SUPPORT can only be one of "destdir" or "user-destdir". |
428 | .if defined(PKG_DEVELOPER) && ${PKG_DEVELOPER} != "no" | | 428 | .if defined(PKG_DEVELOPER) && ${PKG_DEVELOPER} != "no" |
429 | USE_DESTDIR?= yes | | 429 | USE_DESTDIR?= yes |
430 | .else | | 430 | .else |
431 | USE_DESTDIR?= no | | 431 | USE_DESTDIR?= no |
432 | .endif | | 432 | .endif |
433 | PKG_DESTDIR_SUPPORT?= # empty | | 433 | PKG_DESTDIR_SUPPORT?= # empty |
434 | | | 434 | |
435 | .if empty(PKG_DESTDIR_SUPPORT) || empty(USE_DESTDIR:M[Yy][Ee][Ss]) | | 435 | .if empty(PKG_DESTDIR_SUPPORT) || empty(USE_DESTDIR:M[Yy][Ee][Ss]) |
436 | . if empty(USE_DESTDIR:M[Yy][Ee][Ss]) && empty(USE_DESTDIR:M[Nn][Oo]) | | 436 | . if empty(USE_DESTDIR:M[Yy][Ee][Ss]) && empty(USE_DESTDIR:M[Nn][Oo]) |
437 | PKG_FAIL_REASON+= "USE_DESTDIR must be either \`\`yes'' or \`\`no''" | | 437 | PKG_FAIL_REASON+= "USE_DESTDIR must be either \`\`yes'' or \`\`no''" |
438 | . endif | | 438 | . endif |
439 | _USE_DESTDIR= no | | 439 | _USE_DESTDIR= no |
440 | .elif ${PKG_DESTDIR_SUPPORT} == "user-destdir" | | 440 | .elif ${PKG_DESTDIR_SUPPORT} == "user-destdir" |
441 | _USE_DESTDIR= user-destdir | | 441 | _USE_DESTDIR= user-destdir |
442 | .elif ${PKG_DESTDIR_SUPPORT} == "destdir" | | 442 | .elif ${PKG_DESTDIR_SUPPORT} == "destdir" |
443 | _USE_DESTDIR= destdir | | 443 | _USE_DESTDIR= destdir |
444 | .else | | 444 | .else |
445 | PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or \`\`user-destdir''." | | 445 | PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or \`\`user-destdir''." |
446 | .endif | | 446 | .endif |
447 | | | 447 | |
448 | .if defined(PKG_DEVELOPER) && ${PKG_DEVELOPER} != "no" && empty(PKG_DESTDIR_SUPPORT) | | 448 | .if defined(PKG_DEVELOPER) && ${PKG_DEVELOPER} != "no" && empty(PKG_DESTDIR_SUPPORT) |
449 | WARNINGS+= "[bsd.prefs.mk] The package ${PKGNAME} is missing DESTDIR support." | | 449 | WARNINGS+= "[bsd.prefs.mk] The package ${PKGNAME} is missing DESTDIR support." |
450 | .endif | | 450 | .endif |
451 | | | 451 | |
452 | # When using staged installation, everything gets installed into | | 452 | # When using staged installation, everything gets installed into |
453 | # ${DESTDIR}${PREFIX} instead of ${PREFIX} directly. | | 453 | # ${DESTDIR}${PREFIX} instead of ${PREFIX} directly. |
454 | # | | 454 | # |
455 | .if ${_USE_DESTDIR} != "no" | | 455 | .if ${_USE_DESTDIR} != "no" |
456 | DESTDIR= ${WRKDIR}/.destdir | | 456 | DESTDIR= ${WRKDIR}/.destdir |
457 | . if ${_USE_DESTDIR} == "destdir" | | 457 | . if ${_USE_DESTDIR} == "destdir" |
458 | _MAKE_PACKAGE_AS_ROOT= yes | | 458 | _MAKE_PACKAGE_AS_ROOT= yes |
459 | _MAKE_CLEAN_AS_ROOT= yes | | 459 | _MAKE_CLEAN_AS_ROOT= yes |
460 | _MAKE_INSTALL_AS_ROOT= yes | | 460 | _MAKE_INSTALL_AS_ROOT= yes |
461 | . elif ${_USE_DESTDIR} == "user-destdir" | | 461 | . elif ${_USE_DESTDIR} == "user-destdir" |
462 | _MAKE_PACKAGE_AS_ROOT= no | | 462 | _MAKE_PACKAGE_AS_ROOT= no |
463 | _MAKE_CLEAN_AS_ROOT= no | | 463 | _MAKE_CLEAN_AS_ROOT= no |
464 | _MAKE_INSTALL_AS_ROOT= no | | 464 | _MAKE_INSTALL_AS_ROOT= no |
465 | . endif | | 465 | . endif |
466 | .else | | 466 | .else |
467 | DESTDIR= | | 467 | DESTDIR= |
468 | .endif | | 468 | .endif |
469 | | | 469 | |
470 | _MAKE_CLEAN_AS_ROOT?= no | | 470 | _MAKE_CLEAN_AS_ROOT?= no |
471 | # Whether to run the clean target as root. | | 471 | # Whether to run the clean target as root. |
472 | _MAKE_INSTALL_AS_ROOT?= yes | | 472 | _MAKE_INSTALL_AS_ROOT?= yes |
473 | # Whether to run the install target as root. | | 473 | # Whether to run the install target as root. |
474 | _MAKE_PACKAGE_AS_ROOT?= yes | | 474 | _MAKE_PACKAGE_AS_ROOT?= yes |
475 | # Whether to run the package target as root. | | 475 | # Whether to run the package target as root. |
476 | | | 476 | |
477 | # When cross-compilation support is requested, the following options | | 477 | # When cross-compilation support is requested, the following options |
478 | # must be specified as well or guessable: | | 478 | # must be specified as well or guessable: |
479 | # - MACHINE_ARCH is set to TARGET_ARCH if set. | | 479 | # - MACHINE_ARCH is set to TARGET_ARCH if set. |
480 | # - CROSS_DESTDIR is guessed from MAKEOBJDIR and MACHINE_ARCH. | | 480 | # - CROSS_DESTDIR is guessed from MAKEOBJDIR and MACHINE_ARCH. |
481 | # - PKG_DBDIR is expanded and prefixed with CROSS_DESTDIR | | 481 | # - PKG_DBDIR is expanded and prefixed with CROSS_DESTDIR |
482 | # - DESTDIR support is required | | 482 | # - DESTDIR support is required |
483 | # | | 483 | # |
484 | # _CROSS_DESTDIR is set for internal use to avoid conditionalising | | 484 | # _CROSS_DESTDIR is set for internal use to avoid conditionalising |
485 | # the use. | | 485 | # the use. |
486 | | | 486 | |
487 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) | | 487 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) |
488 | . if defined(TARGET_ARCH) | | 488 | . if defined(TARGET_ARCH) |
489 | MACHINE_ARCH= ${TARGET_ARCH} | | 489 | MACHINE_ARCH= ${TARGET_ARCH} |
490 | . endif | | 490 | . endif |
491 | CROSS_DESTDIR?= ${MAKEOBJDIR}/destdir.${MACHINE_ARCH} | | 491 | CROSS_DESTDIR?= ${MAKEOBJDIR}/destdir.${MACHINE_ARCH} |
492 | . if !exists(${CROSS_DESTDIR}/usr/include/stddef.h) | | 492 | . if !exists(${CROSS_DESTDIR}/usr/include/stddef.h) |
493 | PKG_FAIL_REASON+= "The cross-compiling root ${CROSS_DESTDIR:Q} is incomplete" | | 493 | PKG_FAIL_REASON+= "The cross-compiling root ${CROSS_DESTDIR:Q} is incomplete" |
494 | . else | | 494 | . else |
495 | _CROSS_DESTDIR= ${CROSS_DESTDIR} | | 495 | _CROSS_DESTDIR= ${CROSS_DESTDIR} |
496 | . endif | | 496 | . endif |
497 | .endif | | 497 | .endif |
498 | | | 498 | |
499 | # Depends on MACHINE_ARCH override above | | 499 | # Depends on MACHINE_ARCH override above |
500 | .if ${OPSYS} == "NetBSD" | | 500 | .if ${OPSYS} == "NetBSD" |
501 | . if ${OBJECT_FMT} == "ELF" && \ | | 501 | . if ${OBJECT_FMT} == "ELF" && \ |
502 | (${MACHINE_GNU_ARCH} == "arm" || \ | | 502 | (${MACHINE_GNU_ARCH} == "arm" || \ |
503 | ${MACHINE_ARCH} == "i386" || \ | | 503 | ${MACHINE_ARCH} == "i386" || \ |
504 | ${MACHINE_ARCH} == "m68k" || \ | | 504 | ${MACHINE_ARCH} == "m68k" || \ |
505 | ${MACHINE_ARCH} == "m68000" || \ | | 505 | ${MACHINE_ARCH} == "m68000" || \ |
506 | ${MACHINE_GNU_ARCH} == "sh" || \ | | 506 | ${MACHINE_GNU_ARCH} == "sh" || \ |
507 | ${MACHINE_GNU_ARCH} == "shle" || \ | | 507 | ${MACHINE_GNU_ARCH} == "shle" || \ |
508 | ${MACHINE_ARCH} == "sparc" || \ | | 508 | ${MACHINE_ARCH} == "sparc" || \ |
509 | ${MACHINE_ARCH} == "vax") | | 509 | ${MACHINE_ARCH} == "vax") |
510 | APPEND_ELF= elf | | 510 | APPEND_ELF= elf |
511 | . endif | | 511 | . endif |
512 | .endif | | 512 | .endif |
513 | | | 513 | |
514 | PKG_INSTALLATION_TYPES?= overwrite | | 514 | PKG_INSTALLATION_TYPES?= overwrite |
515 | # This is a whitespace-separated list of installation types supported | | 515 | # This is a whitespace-separated list of installation types supported |
516 | # by the package. | | 516 | # by the package. |
517 | # | | 517 | # |
518 | # *NOTE*: This variable *must* be set in the package Makefile *before* | | 518 | # *NOTE*: This variable *must* be set in the package Makefile *before* |
519 | # the inclusion of bsd.prefs.mk. | | 519 | # the inclusion of bsd.prefs.mk. |
520 | # | | 520 | # |
521 | # Possible: any of: overwrite, pkgviews | | 521 | # Possible: any of: overwrite, pkgviews |
522 | # Default: overwrite | | 522 | # Default: overwrite |
523 | | | 523 | |
524 | # Set the style of installation to be performed for the package. The | | 524 | # Set the style of installation to be performed for the package. The |
525 | # funky make variable modifiers just select the first word of the value | | 525 | # funky make variable modifiers just select the first word of the value |
526 | # stored in the referenced variable. | | 526 | # stored in the referenced variable. |
527 | # | | 527 | # |
528 | .for _pref_ in ${PKG_INSTALLATION_PREFS} | | 528 | .for _pref_ in ${PKG_INSTALLATION_PREFS} |
529 | . if !empty(PKG_INSTALLATION_TYPES:M${_pref_}) | | 529 | . if !empty(PKG_INSTALLATION_TYPES:M${_pref_}) |
530 | PKG_INSTALLATION_TYPE?= ${PKG_INSTALLATION_TYPES:M${_pref_}:S/^/_pkginsttype_/1:M_pkginsttype_*:S/^_pkginsttype_//} | | 530 | PKG_INSTALLATION_TYPE?= ${PKG_INSTALLATION_TYPES:M${_pref_}:S/^/_pkginsttype_/1:M_pkginsttype_*:S/^_pkginsttype_//} |
531 | . endif | | 531 | . endif |
532 | .endfor | | 532 | .endfor |
533 | PKG_INSTALLATION_TYPE?= none | | 533 | PKG_INSTALLATION_TYPE?= none |
534 | | | 534 | |
535 | # if the system is IPv6-ready, compile with IPv6 support turned on. | | 535 | # if the system is IPv6-ready, compile with IPv6 support turned on. |
536 | .if empty(_OPSYS_HAS_INET6:M[nN][oO]) | | 536 | .if empty(_OPSYS_HAS_INET6:M[nN][oO]) |
537 | IPV6_READY= YES | | 537 | IPV6_READY= YES |
538 | .else | | 538 | .else |
539 | IPV6_READY= NO | | 539 | IPV6_READY= NO |
540 | .endif | | 540 | .endif |
541 | | | 541 | |
542 | LOCALBASE?= /usr/pkg | | 542 | LOCALBASE?= /usr/pkg |
543 | X11_TYPE?= native | | 543 | X11_TYPE?= native |
544 | .if !empty(X11_TYPE:Mnative) | | 544 | .if !empty(X11_TYPE:Mnative) |
545 | . if ${OPSYS} == "SunOS" | | 545 | . if ${OPSYS} == "SunOS" |
546 | # On Solaris, we default to using OpenWindows for X11. | | 546 | # On Solaris, we default to using OpenWindows for X11. |
547 | X11BASE?= /usr/openwin | | 547 | X11BASE?= /usr/openwin |
548 | . elif ${OPSYS} == "IRIX" || ${OPSYS} == "OSF1" || ${OPSYS} == "HPUX" | | 548 | . elif ${OPSYS} == "IRIX" || ${OPSYS} == "OSF1" || ${OPSYS} == "HPUX" |
549 | X11BASE?= /usr | | 549 | X11BASE?= /usr |
550 | . elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*) || \ | | 550 | . elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*) || \ |
551 | !empty(MACHINE_PLATFORM:MDarwin-??.*-*) | | 551 | !empty(MACHINE_PLATFORM:MDarwin-??.*-*) |
552 | X11BASE?= /usr/X11 | | 552 | X11BASE?= /usr/X11 |
553 | . elif exists(/usr/X11R7/lib/libX11.so) | | 553 | . elif exists(/usr/X11R7/lib/libX11.so) |
554 | X11BASE?= /usr/X11R7 | | 554 | X11BASE?= /usr/X11R7 |
555 | . else | | 555 | . else |
556 | X11BASE?= /usr/X11R6 | | 556 | X11BASE?= /usr/X11R6 |
557 | . endif | | 557 | . endif |
558 | .endif | | 558 | .endif |
559 | CROSSBASE?= ${LOCALBASE}/cross | | 559 | CROSSBASE?= ${LOCALBASE}/cross |
560 | | | 560 | |
561 | # If xpkgwedge.def is found, then clearly we're using xpkgwedge. | | 561 | # If xpkgwedge.def is found, then clearly we're using xpkgwedge. |
562 | .if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \ | | 562 | .if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \ |
563 | exists(${X11BASE}/lib/X11/config/xpkgwedge.def) | | 563 | exists(${X11BASE}/lib/X11/config/xpkgwedge.def) |
564 | USE_XPKGWEDGE= yes | | 564 | USE_XPKGWEDGE= yes |
565 | .elif ${PKG_INSTALLATION_TYPE} == "pkgviews" | | 565 | .elif ${PKG_INSTALLATION_TYPE} == "pkgviews" |
566 | USE_XPKGWEDGE= yes | | 566 | USE_XPKGWEDGE= yes |
567 | .elif ${X11_TYPE} == "modular" | | 567 | .elif ${X11_TYPE} == "modular" |
568 | USE_XPKGWEDGE= no | | 568 | USE_XPKGWEDGE= no |
569 | .else | | 569 | .else |
570 | USE_XPKGWEDGE?= yes | | 570 | USE_XPKGWEDGE?= yes |
571 | .endif | | 571 | .endif |
572 | | | 572 | |
573 | .if defined(FIX_SYSTEM_HEADERS) && ${FIX_SYSTEM_HEADERS} == "yes" && \ | | 573 | .if defined(FIX_SYSTEM_HEADERS) && ${FIX_SYSTEM_HEADERS} == "yes" && \ |
574 | !defined(BOOTSTRAP_PKG) && \ | | 574 | !defined(BOOTSTRAP_PKG) && \ |
575 | exists(../../pkgtools/compat_headers/buildlink3.mk) | | 575 | exists(../../pkgtools/compat_headers/buildlink3.mk) |
576 | . include "../../pkgtools/compat_headers/buildlink3.mk" | | 576 | . include "../../pkgtools/compat_headers/buildlink3.mk" |
577 | .endif | | 577 | .endif |
578 | | | 578 | |
579 | .if ${X11_TYPE} == "modular" | | 579 | .if ${X11_TYPE} == "modular" |
580 | X11BASE= ${LOCALBASE} | | 580 | X11BASE= ${LOCALBASE} |
581 | .endif | | 581 | .endif |
582 | | | 582 | |
583 | .if !empty(USE_XPKGWEDGE:M[Yy][Ee][Ss]) | | 583 | .if !empty(USE_XPKGWEDGE:M[Yy][Ee][Ss]) |
584 | X11PREFIX= ${LOCALBASE} | | 584 | X11PREFIX= ${LOCALBASE} |
585 | .else | | 585 | .else |
586 | X11PREFIX= ${X11BASE} | | 586 | X11PREFIX= ${X11BASE} |
587 | .endif | | 587 | .endif |
588 | | | 588 | |
589 | # Default directory for font encodings | | 589 | # Default directory for font encodings |
590 | X11_ENCODINGSDIR?= ${X11BASE}/lib/X11/fonts/encodings | | 590 | X11_ENCODINGSDIR?= ${X11BASE}/lib/X11/fonts/encodings |
591 | | | 591 | |
592 | DEPOT_SUBDIR?= packages | | 592 | DEPOT_SUBDIR?= packages |
593 | DEPOTBASE= ${LOCALBASE}/${DEPOT_SUBDIR} | | 593 | DEPOTBASE= ${LOCALBASE}/${DEPOT_SUBDIR} |
594 | | | 594 | |
595 | # LINK_RPATH_FLAG publicly exports the linker flag used to set the | | 595 | # LINK_RPATH_FLAG publicly exports the linker flag used to set the |
596 | # run-time library search path. | | 596 | # run-time library search path. |
597 | # | | 597 | # |
598 | .if defined(_OPSYS_LINKER_RPATH_FLAG) | | 598 | .if defined(_OPSYS_LINKER_RPATH_FLAG) |
599 | LINKER_RPATH_FLAG= ${_OPSYS_LINKER_RPATH_FLAG} | | 599 | LINKER_RPATH_FLAG= ${_OPSYS_LINKER_RPATH_FLAG} |
600 | .else | | 600 | .else |
601 | LINKER_RPATH_FLAG?= ${_LINKER_RPATH_FLAG} | | 601 | LINKER_RPATH_FLAG?= ${_LINKER_RPATH_FLAG} |
602 | .endif | | 602 | .endif |
603 | | | 603 | |
604 | # COMPILER_RPATH_FLAG publicly exports the compiler flag used to pass | | 604 | # COMPILER_RPATH_FLAG publicly exports the compiler flag used to pass |
605 | # run-time library search path directives to the linker. | | 605 | # run-time library search path directives to the linker. |
606 | # | | 606 | # |
607 | .if defined(_OPSYS_COMPILER_RPATH_FLAG) | | 607 | .if defined(_OPSYS_COMPILER_RPATH_FLAG) |
608 | COMPILER_RPATH_FLAG= ${_OPSYS_COMPILER_RPATH_FLAG} | | 608 | COMPILER_RPATH_FLAG= ${_OPSYS_COMPILER_RPATH_FLAG} |
609 | .else | | 609 | .else |
610 | COMPILER_RPATH_FLAG?= ${_COMPILER_RPATH_FLAG} | | 610 | COMPILER_RPATH_FLAG?= ${_COMPILER_RPATH_FLAG} |
611 | .endif | | 611 | .endif |
612 | | | 612 | |
613 | # WHOLE_ARCHIVE_FLAG and NO_WHOLE_ARCHIVE_FLAG publically export the | | 613 | # WHOLE_ARCHIVE_FLAG and NO_WHOLE_ARCHIVE_FLAG publically export the |
614 | # linker flags to extract all symbols from a static archive. | | 614 | # linker flags to extract all symbols from a static archive. |
615 | # | | 615 | # |
616 | WHOLE_ARCHIVE_FLAG?= ${_OPSYS_WHOLE_ARCHIVE_FLAG} | | 616 | WHOLE_ARCHIVE_FLAG?= ${_OPSYS_WHOLE_ARCHIVE_FLAG} |
617 | NO_WHOLE_ARCHIVE_FLAG?= ${_OPSYS_NO_WHOLE_ARCHIVE_FLAG} | | 617 | NO_WHOLE_ARCHIVE_FLAG?= ${_OPSYS_NO_WHOLE_ARCHIVE_FLAG} |
618 | | | 618 | |
619 | USE_TOOLS?= # empty | | 619 | USE_TOOLS?= # empty |
620 | | | 620 | |
621 | # Provide default values for TOOLs used by the top-level make. | | 621 | # Provide default values for TOOLs used by the top-level make. |
622 | USE_TOOLS+= [ awk dirname echo grep pwd sed test true | | 622 | USE_TOOLS+= [ awk dirname echo grep pwd sed test true |
623 | | | 623 | |
624 | # These tools are used by the top-level make only in certain packages and | | 624 | # These tools are used by the top-level make only in certain packages and |
625 | # should eventually be moved into those particular package Makefiles. | | 625 | # should eventually be moved into those particular package Makefiles. |
626 | # | | 626 | # |
627 | USE_TOOLS+= date tr | | 627 | USE_TOOLS+= date tr |
628 | | | 628 | |
629 | # These are tools used directly by bsd.prefs.mk and files included by | | 629 | # These are tools used directly by bsd.prefs.mk and files included by |
630 | # bsd.prefs.mk. | | 630 | # bsd.prefs.mk. |
631 | # | | 631 | # |
632 | USE_TOOLS+= awk:pkgsrc cut:pkgsrc echo:pkgsrc pwd:pkgsrc \ | | 632 | USE_TOOLS+= awk:pkgsrc cut:pkgsrc echo:pkgsrc pwd:pkgsrc \ |
633 | sed:pkgsrc tr:pkgsrc uname:pkgsrc | | 633 | sed:pkgsrc tr:pkgsrc uname:pkgsrc |
634 | | | 634 | |
635 | .include "${_PKGSRC_TOPDIR}/mk/tools/defaults.mk" | | 635 | .include "${_PKGSRC_TOPDIR}/mk/tools/defaults.mk" |
636 | | | 636 | |
637 | .if !defined(_PKGSRCDIR) | | 637 | .if !defined(_PKGSRCDIR) |
638 | _PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD} | | 638 | _PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD} |
639 | MAKEFLAGS+= _PKGSRCDIR=${_PKGSRCDIR:Q} | | 639 | MAKEFLAGS+= _PKGSRCDIR=${_PKGSRCDIR:Q} |
640 | .endif | | 640 | .endif |
641 | PKGSRCDIR= ${_PKGSRCDIR} | | 641 | PKGSRCDIR= ${_PKGSRCDIR} |
642 | | | 642 | |
643 | DISTDIR?= ${PKGSRCDIR}/distfiles | | 643 | DISTDIR?= ${PKGSRCDIR}/distfiles |
644 | PACKAGES?= ${PKGSRCDIR}/packages | | 644 | PACKAGES?= ${PKGSRCDIR}/packages |
645 | TEMPLATES?= ${PKGSRCDIR}/templates | | 645 | TEMPLATES?= ${PKGSRCDIR}/templates |
646 | | | 646 | |
647 | PATCHDIR?= ${.CURDIR}/patches | | 647 | PATCHDIR?= ${.CURDIR}/patches |
648 | FILESDIR?= ${.CURDIR}/files | | 648 | FILESDIR?= ${.CURDIR}/files |
649 | PKGDIR?= ${.CURDIR} | | 649 | PKGDIR?= ${.CURDIR} |
650 | | | 650 | |
651 | _PKGSRC_DEPS?= # empty | | 651 | _PKGSRC_DEPS?= # empty |
652 | _BUILTIN_PKGS?= # empty | | 652 | _BUILTIN_PKGS?= # empty |
653 | | | 653 | |
654 | # If WRKOBJDIR is set, use that tree to build | | 654 | # If WRKOBJDIR is set, use that tree to build |
655 | .if defined(WRKOBJDIR) | | 655 | .if defined(WRKOBJDIR) |
656 | BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH} | | 656 | BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH} |
657 | .else | | 657 | .else |
658 | BUILD_DIR!= cd ${.CURDIR} && ${PWD_CMD} | | 658 | BUILD_DIR!= cd ${.CURDIR} && ${PWD_CMD} |
659 | .endif | | 659 | .endif |
660 | | | 660 | |
661 | # If OBJHOSTNAME is set, use first component of hostname in directory name. | | 661 | # If OBJHOSTNAME is set, use first component of hostname in directory name. |
662 | # If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name. | | 662 | # If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name. |
663 | # | | 663 | # |
664 | .if defined(OBJHOSTNAME) | | 664 | .if defined(OBJHOSTNAME) |
665 | . if !defined(_HOSTNAME) | | 665 | . if !defined(_HOSTNAME) |
666 | _HOSTNAME!= ${UNAME} -n | | 666 | _HOSTNAME!= ${UNAME} -n |
667 | MAKEFLAGS+= _HOSTNAME=${_HOSTNAME:Q} | | 667 | MAKEFLAGS+= _HOSTNAME=${_HOSTNAME:Q} |
668 | . endif | | 668 | . endif |
669 | WRKDIR_BASENAME?= work.${_HOSTNAME:C|\..*||} | | 669 | WRKDIR_BASENAME?= work.${_HOSTNAME:C|\..*||} |
670 | MAKEFLAGS+= OBJHOSTNAME=${OBJHOSTNAME:Q} | | 670 | MAKEFLAGS+= OBJHOSTNAME=${OBJHOSTNAME:Q} |
671 | .elif defined(OBJMACHINE) | | 671 | .elif defined(OBJMACHINE) |
672 | WRKDIR_BASENAME?= work.${MACHINE_ARCH} | | 672 | WRKDIR_BASENAME?= work.${MACHINE_ARCH} |
673 | MAKEFLAGS+= OBJMACHINE=${OBJMACHINE:Q} | | 673 | MAKEFLAGS+= OBJMACHINE=${OBJMACHINE:Q} |
674 | .else | | 674 | .else |
675 | WRKDIR_BASENAME?= work | | 675 | WRKDIR_BASENAME?= work |
676 | .endif | | 676 | .endif |
677 | | | 677 | |
678 | WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME} | | 678 | WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME} |
679 | | | 679 | |
680 | # There are many uses for a common log file, so define one that may be | | 680 | # There are many uses for a common log file, so define one that may be |
681 | # picked up and used by tools.mk, bsd.buildlink3.mk, etc. | | 681 | # picked up and used by tools.mk, bsd.buildlink3.mk, etc. |
682 | # | | 682 | # |
683 | WRKLOG?= ${WRKDIR}/.work.log | | 683 | WRKLOG?= ${WRKDIR}/.work.log |
684 | | | 684 | |
685 | PKG_DEFAULT_OPTIONS?= # empty | | 685 | PKG_DEFAULT_OPTIONS?= # empty |
686 | PKG_OPTIONS?= # empty | | 686 | PKG_OPTIONS?= # empty |
687 | | | 687 | |
688 | # we want this *before* compiler.mk, so that compiler.mk paths override them | | 688 | # we want this *before* compiler.mk, so that compiler.mk paths override them |
689 | .if ${X11_TYPE} != "modular" && defined(USE_X11) | | 689 | .if ${X11_TYPE} != "modular" && defined(USE_X11) |
690 | PREPEND_PATH+= ${X11BASE}/bin | | 690 | PREPEND_PATH+= ${X11BASE}/bin |
691 | .endif | | 691 | .endif |
692 | PREPEND_PATH+= ${LOCALBASE}/bin | | 692 | PREPEND_PATH+= ${LOCALBASE}/bin |
693 | | | 693 | |
694 | # Wrapper framework definitions | | 694 | # Wrapper framework definitions |
695 | .include "wrapper/wrapper-defs.mk" | | 695 | .include "wrapper/wrapper-defs.mk" |
696 | | | 696 | |
697 | # Binary emulator framework definitions | | 697 | # Binary emulator framework definitions |
698 | .if defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS) | | 698 | .if defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS) |
699 | . include "emulator/emulator-vars.mk" | | 699 | . include "emulator/emulator-vars.mk" |
700 | .endif | | 700 | .endif |
701 | | | 701 | |
702 | # System features framework | | 702 | # System features framework |
703 | .include "features/features-vars.mk" | | 703 | .include "features/features-vars.mk" |
704 | | | 704 | |
705 | # Package system flavor definitions | | 705 | # Package system flavor definitions |
706 | .include "flavor/bsd.flavor-vars.mk" | | 706 | .include "flavor/bsd.flavor-vars.mk" |
707 | | | 707 | |
708 | # Make variable definitions cache | | 708 | # Make variable definitions cache |
709 | .include "bsd.makevars.mk" | | 709 | .include "bsd.makevars.mk" |
710 | | | 710 | |
711 | # If MAKECONF is defined, then pass it down to all recursive make | | 711 | # If MAKECONF is defined, then pass it down to all recursive make |
712 | # processes invoked by pkgsrc. | | 712 | # processes invoked by pkgsrc. |
713 | # | | 713 | # |
714 | PKGSRC_MAKE_ENV+= ${MAKECONF:DMAKECONF=${MAKECONF:Q}} | | 714 | PKGSRC_MAKE_ENV+= ${MAKECONF:DMAKECONF=${MAKECONF:Q}} |
715 | RECURSIVE_MAKE= ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE} | | 715 | RECURSIVE_MAKE= ${SETENV} ${PKGSRC_MAKE_ENV} ${MAKE} |
716 | | | 716 | |
717 | _VARGROUPS+= dirs | | 717 | _VARGROUPS+= dirs |
718 | _USER_VARS.dirs= DISTDIR LOCALBASE PACKAGES PKG_SYSCONFDIR WRKOBJDIR | | 718 | _USER_VARS.dirs= DISTDIR LOCALBASE PACKAGES PKG_SYSCONFDIR WRKOBJDIR |
719 | _PKG_VARS.dirs= WRKSRC PATCHDIR FILESDIR PKGDIR | | 719 | _PKG_VARS.dirs= WRKSRC PATCHDIR FILESDIR PKGDIR |
720 | _SYS_VARS.dirs= WRKDIR DESTDIR PKG_SYSCONFBASEDIR | | 720 | _SYS_VARS.dirs= WRKDIR DESTDIR PKG_SYSCONFBASEDIR |
721 | | | 721 | |
722 | # List of 64bit operating systems with sizeof(int) != sizeof(void *). | | 722 | # List of 64bit operating systems with sizeof(int) != sizeof(void *). |
723 | # This can be used for software that is not 64bit clean. | | 723 | # This can be used for software that is not 64bit clean. |
724 | # | | 724 | # |
725 | # Keywords: ONLY_FOR_PLATFORM NOT_FOR_PLATFORM 64bit | | 725 | # Keywords: ONLY_FOR_PLATFORM NOT_FOR_PLATFORM 64bit |
726 | # | | 726 | # |
727 | LP64PLATFORMS= *-*-alpha *-*-sparc64 *-*-x86_64 | | 727 | LP64PLATFORMS= *-*-alpha *-*-sparc64 *-*-x86_64 |
728 | | | 728 | |
729 | .endif # BSD_PKG_MK | | 729 | .endif # BSD_PKG_MK |