Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 5052 lines (4655 sloc) 166.739 kb
d23c566 Found another two uses of .ifndef and .ifdef.
rillig authored
1 # $NetBSD: bsd.pkg.mk,v 1.1647 2005/05/14 02:03:00 rillig Exp $
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
2 #
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
3 # This file is in the public domain.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
4 #
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
5 # This file is derived from bsd.port.mk - 940820 Jordan K. Hubbard.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
6 #
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
7 # Please see the pkgsrc/doc/guide manual for details on the
8 # variables used in this make file template.
9 #
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
10 # Default sequence for "all" is: fetch checksum extract patch configure build
11 #
12 # Please read the comments in the targets section below, you
13 # should be able to use the pre-* or post-* targets/scripts
14 # (which are available for every stage except checksum) or
15 # override the do-* targets to do pretty much anything you want.
16
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
17 ############################################################################
18 # Include any preferences, if not already included, and common definitions
19 ############################################################################
20
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
21 .include "../../mk/bsd.prefs.mk"
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
22 .include "../../mk/bsd.hacks.mk"
425506d Prevent /etc/mk.conf from being included by BSD-style makefiles used by
jlam authored
23
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
24 .if !defined(_REV_ALL_PHASES)
25 _REV_ALL_PHASES= # empty
26 . for _phase_ in ${ALL_PHASES}
27 _REV_ALL_PHASES:= ${_phase_} ${_REV_ALL_PHASES}
28 . endfor
29 . undef _phase_
30 .endif
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
31 MAKEVARS+= _REV_ALL_PHASES
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
32
33 # Try including the .makevars.mk.* files in reverse order so that the
34 # latest file is included and no more.
35 #
36 .for _phase_ in ${_REV_ALL_PHASES}
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
37 _MAKEVARS_MK.${_phase_}= ${WRKDIR}/.${_phase_}_makevars.mk
38 ${_phase_}-vars: ${_MAKEVARS_MK.${_phase_}}
39 . if !defined(_MAKEVARS_MK)
40 . sinclude "${_MAKEVARS_MK.${_phase_}}"
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
41 . endif
42 .endfor
43 .undef _phase_
44
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
45 # This has to come first to avoid showing all BUILD_DEFS added by this
46 # Makefile, which are usually not customizable.
14b6f70 Sometimes, the dependencies installed are a function of which variables
jlam authored
47 .PHONY: pre-install-depends build-defs-message
48 pre-install-depends: build-defs-message
35bce78 oops.. reversed a test
jlam authored
49 .if empty(PKGSRC_SHOW_BUILD_DEFS:M[yY][eE][sS])
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
50 build-defs-message:
51 .elif !target(build-defs-message)
3bfdfb2 Modify the build-defs-message target so that it is only printed once,…
jmmv authored
52 build-defs-message: ${WRKDIR}
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
53 . if defined(BUILD_DEFS) && !empty(BUILD_DEFS)
54 . if !exists(${WRKDIR}/.bdm_done)
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
55 @${ECHO} "=========================================================================="
56 @${ECHO} "The following variables will affect the build process of this package,"
57 @${ECHO} "${PKGNAME}. Their current value is shown below:"
58 @${ECHO} ""
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
59 . for var in ${BUILD_DEFS:O}
60 . if !defined(${var})
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
61 @${ECHO} " * ${var} (not defined)"
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
62 . elif defined(${var}) && empty(${var})
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
63 @${ECHO} " * ${var} (defined)"
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
64 . else
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
65 @${ECHO} " * ${var} = ${${var}}"
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
66 . endif
67 . endfor
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
68 @${ECHO} ""
5fc450d wrap a long line in BUILD_DEFS output, tweak the message slightly.
grant authored
69 @${ECHO} "You may want to abort the process now with CTRL-C and change their value"
70 @${ECHO} "before continuing. Be sure to run \`${MAKE} clean' after"
71 @${ECHO} "the changes."
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
72 @${ECHO} "=========================================================================="
3bfdfb2 Modify the build-defs-message target so that it is only printed once,…
jmmv authored
73 @${TOUCH} ${WRKDIR}/.bdm_done
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
74 . endif
75 . endif
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
76 .endif
77
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
78 ############################################################################
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
79 # Transform package Makefile variables and set defaults
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
80 ############################################################################
a6fdcd0 Fail-safe check for circular dependencies.
gavan authored
81
adb5d84 - Move all CHECK_FILES_SKIP definitions to a central place in bsd.pkg…
jmmv authored
82 CHECK_FILES?= NO # run check-files after install
b145bf2 Add the check-files target: when enabled, this verifies that installed
jmmv authored
83 CHECK_FILES_STRICT?= NO # make check-files very strict on errors
f83408c * add CHECK_SHLIBS variable that can be set to "no" in emul/compat p…
hubertf authored
84 CHECK_SHLIBS?= YES # run check-shlibs after install
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
85 CLEANDEPENDS?= NO
86 DEINSTALLDEPENDS?= NO # add -R to pkg_delete
87 MKCRYPTO?= YES # build crypto packages by default
7ae11e3 Change the "update" target so it becomes more useful (and less danger…
rh authored
88 NOCLEAN?= NO # don't clean up after update
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
89 REINSTALL?= NO # reinstall upon update
90 SHLIB_HANDLING?= YES # do automatic shared lib handling
91
92 ##### Variant spellings
93
94 .if defined(LICENCE) && !defined(LICENSE)
95 LICENSE= ${LICENCE}
96 .endif
97 .if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
98 ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
99 .endif
100
101 ##### PKGBASE, PKGNAME[_NOREV], PKGVERSION
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
102
a9df889 Oops; use ?= for PKGBASE and PKGVERSION, so pkgs can derive their PKG…
mycroft authored
103 PKGBASE?= ${PKGNAME:C/-[^-]*$//}
104 PKGVERSION?= ${PKGNAME:C/^.*-//}
75f8ab7 Move definition of PKGNAME and PKGNAME_NOREV higher in the file since…
jlam authored
105 .if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
106 . if defined(PKGNAME)
107 PKGNAME_NOREV:= ${PKGNAME}
108 PKGNAME:= ${PKGNAME}nb${PKGREVISION}
109 . else
110 PKGNAME?= ${DISTNAME}nb${PKGREVISION}
111 PKGNAME_NOREV= ${DISTNAME}
112 . endif
113 .else
114 PKGNAME?= ${DISTNAME}
115 PKGNAME_NOREV= ${PKGNAME}
116 .endif
5932545 Add PKGPATH, PKGBASE, PKGVERSION and PKGWILDCARD make(1) variables, s…
mycroft authored
117
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
118 ##### PLIST
119
120 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
121 PLIST_TYPE?= dynamic
122 .endif
123 PLIST_TYPE?= static
124
125 .if !defined(PLIST_SRC)
126 . if exists(${PKGDIR}/PLIST.common)
127 PLIST_SRC+= ${PKGDIR}/PLIST.common
128 . endif
129 . if exists(${PKGDIR}/PLIST.${OPSYS})
130 PLIST_SRC+= ${PKGDIR}/PLIST.${OPSYS}
2fbfa05 Fix PLIST_SRC error introduced in rev 1.1593.
veego authored
131 . endif
132 . if exists(${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g})
db39dfb Change the files to be used for PLIST_SRC from
veego authored
133 PLIST_SRC+= ${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
2fbfa05 Fix PLIST_SRC error introduced in rev 1.1593.
veego authored
134 . endif
135 . if exists(${PKGDIR}/PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g})
db39dfb Change the files to be used for PLIST_SRC from
veego authored
136 PLIST_SRC+= ${PKGDIR}/PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
2fbfa05 Fix PLIST_SRC error introduced in rev 1.1593.
veego authored
137 . endif
138 . if exists(${PKGDIR}/PLIST)
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
139 PLIST_SRC+= ${PKGDIR}/PLIST
140 . endif
141 . if exists(${PKGDIR}/PLIST.common_end)
142 PLIST_SRC+= ${PKGDIR}/PLIST.common_end
143 . endif
144 .endif # !PLIST_SRC
145
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
146 ##### Others
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
147
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
148 _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
149 BUILD_DEPENDS?= # empty
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
150 BUILD_TARGET?= all
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
151 COMMENT?= (no description)
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
152 CONFIGURE_DIRS?= ${WRKSRC}
153 CONFIGURE_SCRIPT?= ./configure
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
154 DEPENDS?= # empty
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
155 DESCR_SRC?= ${PKGDIR}/DESCR
2b7993f As seen on tech-pkg - allow multiple digest algorithms to be used to
agc authored
156 DIGEST_ALGORITHMS?= SHA1 RMD160
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
157 DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}
158 DISTINFO_FILE?= ${PKGDIR}/distinfo
159 INSTALL_DIRS?= ${BUILD_DIRS}
160 INSTALL_MAKE_FLAGS?= ${MAKE_FLAGS}
161 INSTALL_TARGET?= install
723e0dd Deprecate IS_INTERACTIVE, and introduce a finer-grained INTERACTIVE_S…
agc authored
162 INTERACTIVE_STAGE?= none
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
163 MAINTAINER?= tech-pkg@NetBSD.org
164 MAKE_FLAGS?= # empty
165 MAKEFILE?= Makefile
2b7993f As seen on tech-pkg - allow multiple digest algorithms to be used to
agc authored
166 PATCH_DIGEST_ALGORITHM?=SHA1
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
167 PKG_SUFX?= .tgz
168 PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
169 PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
170 PKGREPOSITORYSUBDIR?= All
171 PKGWILDCARD?= ${PKGBASE}-[0-9]*
172 SVR4_PKGNAME?= ${PKGNAME}
173 USE_DIGEST?= YES
174 USE_GNU_TOOLS?= # empty
175 WRKSRC?= ${WRKDIR}/${DISTNAME}
176
9453708 Fix a gleaming illustration of why using YES/NO variables everywhere
tv authored
177 .if (defined(INSTALL_UNSTRIPPED) && !empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) || defined(DEBUG_FLAGS)
178 _INSTALL_UNSTRIPPED= # set (flag used by platform/*.mk)
179 .endif
180
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
181 ##### Non-overridable constants
182
183 # Latest versions of tools required for correct pkgsrc operation.
184 DIGEST_REQD= 20010302
185 PKGTOOLS_REQD= ${_OPSYS_PKGTOOLS_REQD:U20050204}
186
187 PKG_DB_TMPDIR= ${WRKDIR}/.pkgdb
188 DDIR= ${WRKDIR}/.DDIR
189 DESCR= ${PKG_DB_TMPDIR}/+DESC
190 DLIST= ${WRKDIR}/.DLIST
191 PLIST= ${WRKDIR}/.PLIST
192
193 # Files to create for versioning and build information
194 BUILD_VERSION_FILE= ${PKG_DB_TMPDIR}/+BUILD_VERSION
195 BUILD_INFO_FILE= ${PKG_DB_TMPDIR}/+BUILD_INFO
196
197 # Files containing size of pkg w/o and w/ all required pkgs
198 SIZE_PKG_FILE= ${PKG_DB_TMPDIR}/+SIZE_PKG
199 SIZE_ALL_FILE= ${PKG_DB_TMPDIR}/+SIZE_ALL
200
201 # File to denote "no deletion of a package"
202 PRESERVE_FILE= ${PKG_DB_TMPDIR}/+PRESERVE
203
204 ##### Transform USE_* into dependencies
205
206 .include "../../mk/bsd.pkg.use.mk"
207
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
208 ############################################################################
209 # Sanity checks
210 ############################################################################
211
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
212 # Fail-safe in the case of circular dependencies
213 .if defined(_PKGSRC_DEPS) && defined(PKGNAME) && !empty(_PKGSRC_DEPS:M${PKGNAME})
1442a6e Whitespace formatting nits.
tv authored
214 PKG_FAIL_REASON+= "Circular dependency detected"
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
215 .endif
216
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
217 # PKG_INSTALLATION_TYPE can only be one of two values: "pkgviews" or
218 # "overwrite".
219 .if (${PKG_INSTALLATION_TYPE} != "pkgviews") && \
220 (${PKG_INSTALLATION_TYPE} != "overwrite")
221 PKG_FAIL_REASON+= "PKG_INSTALLATION_TYPE must be \`\`pkgviews'' or \`\`overwrite''."
222 .endif
223
224 .if empty(PKG_INSTALLATION_TYPES:M${PKG_INSTALLATION_TYPE})
225 PKG_FAIL_REASON+= "This package doesn't support PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}."
226 .endif
227
228 .if (${PLIST_TYPE} != "dynamic") && (${PLIST_TYPE} != "static")
229 PKG_FAIL_REASON+= "PLIST_TYPE must be \`\`dynamic'' or \`\`static''."
230 .endif
231
232 .if (${PKG_INSTALLATION_TYPE} == "overwrite") && (${PLIST_TYPE} != "static")
233 PKG_FAIL_REASON+= "PLIST_TYPE must be \`\`static'' for \`\`overwrite'' packages."
234 .endif
235
236 # Check that we are using up-to-date pkg_* tools with this file.
237 .if !defined(NO_PKGTOOLS_REQD_CHECK)
238 . if ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD}
239 PKG_FAIL_REASON+='Error: The package tools installed on this system are out of date.'
240 PKG_FAIL_REASON+='The installed package tools are dated ${PKGTOOLS_VERSION:C|(....)(..)(..)|\1/\2/\3|} and you must update'
241 PKG_FAIL_REASON+='them to at least ${PKGTOOLS_REQD:C|(....)(..)(..)|\1/\2/\3|} using the following command:'
242 PKG_FAIL_REASON+=''
243 PKG_FAIL_REASON+=' cd ${PKGSRCDIR}/pkgtools/pkg_install && ${MAKE} clean && ${MAKE} install'
244 . endif
245 .endif # !NO_PKGTOOLS_REQD_CHECK
246
247 .if defined(ALL_TARGET)
248 PKG_FAIL_REASON+='ALL_TARGET is deprecated and must be replaced with BUILD_TARGET.'
249 .endif
250
251 .if defined(NO_WRKSUBDIR)
252 PKG_FAIL_REASON+='NO_WRKSUBDIR has been deprecated - please replace it with an explicit'
253 PKG_FAIL_REASON+='assignment of WRKSRC= $${WRKDIR}'
254 .endif # NO_WRKSUBDIR
255
256 # We need to make sure the buildlink-x11 package is not installed since it
257 # breaks builds that use imake.
258 .if defined(USE_IMAKE)
259 . if exists(${LOCALBASE}/lib/X11/config/buildlinkX11.def) || \
260 exists(${X11BASE}/lib/X11/config/buildlinkX11.def)
261 PKG_FAIL_REASON+= "${PKGNAME} uses imake, but the buildlink-x11 package was found." \
262 " Please deinstall it (pkg_delete buildlink-x11)."
263 . endif
264 .endif # USE_IMAKE
265
266 .if !defined(CATEGORIES) || !defined(DISTNAME)
267 PKG_FAIL_REASON+='CATEGORIES and DISTNAME are mandatory.'
268 .endif
269
270 .if defined(LIB_DEPENDS)
271 PKG_FAIL_REASON+='LIB_DEPENDS is deprecated and must be replaced with DEPENDS.'
272 .endif
273
274 .if defined(PKG_PATH)
275 PKG_FAIL_REASON+='Please unset PKG_PATH before doing pkgsrc work!'
276 .endif
277
278 .if defined(MASTER_SITE_SUBDIR)
279 PKG_FAIL_REASON+='MASTER_SITE_SUBDIR is deprecated and must be replaced with MASTER_SITES.'
280 .endif
281
282 .if defined(PATCH_SITE_SUBDIR)
283 PKG_FAIL_REASON+='PATCH_SITE_SUBDIR is deprecated and must be replaced with PATCH_SITES.'
284 .endif
285
286 .if defined(ONLY_FOR_ARCHS) || defined(NOT_FOR_ARCHS) \
287 || defined(ONLY_FOR_OPSYS) || defined(NOT_FOR_OPSYS)
288 PKG_FAIL_REASON+='ONLY/NOT_FOR_ARCHS/OPSYS are deprecated and must be replaced with ONLY/NOT_FOR_PLATFORM.'
289 .endif
290
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
291 # Allow variables to be set on a per-OS basis
292 OPSYSVARS+= CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS
293 .for _var_ in ${OPSYSVARS:O}
294 . if defined(${_var_}.${OPSYS})
295 ${_var_}+= ${${_var_}.${OPSYS}}
296 . elif defined(${_var_}.*)
297 ${_var_}+= ${${_var_}.*}
298 . endif
299 .endfor
300
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
301 CPPFLAGS+= ${CPP_PRECOMP_FLAGS}
302
303 ALL_ENV+= CC=${CC:Q}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
304 ALL_ENV+= CFLAGS=${CFLAGS:M*:Q}
305 ALL_ENV+= CPPFLAGS=${CPPFLAGS:M*:Q}
306 ALL_ENV+= CXX=${CXX:M*:Q}
307 ALL_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
308 ALL_ENV+= COMPILER_RPATH_FLAG=${COMPILER_RPATH_FLAG:Q}
3ac1b0c make sure we correctly set F77. Addresses PR29666
dmcmahill authored
309 ALL_ENV+= F77=${FC:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
310 ALL_ENV+= FC=${FC:Q}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
311 ALL_ENV+= FFLAGS=${FFLAGS:M*:Q}
dc9bb84 Reset the current locale to a sane value (that is, 'C') during the build
jmmv authored
312 ALL_ENV+= LANG=C
313 ALL_ENV+= LC_COLLATE=C
314 ALL_ENV+= LC_CTYPE=C
315 ALL_ENV+= LC_MESSAGES=C
316 ALL_ENV+= LC_MONETARY=C
317 ALL_ENV+= LC_NUMERIC=C
318 ALL_ENV+= LC_TIME=C
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
319 ALL_ENV+= LDFLAGS=${LDFLAGS:M*:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
320 ALL_ENV+= LINKER_RPATH_FLAG=${LINKER_RPATH_FLAG:Q}
321 ALL_ENV+= PATH=${PATH:Q}:${LOCALBASE}/bin:${X11BASE}/bin
322 ALL_ENV+= PREFIX=${PREFIX}
323
324 MAKE_ENV+= ${ALL_ENV}
325 MAKE_ENV+= ${NO_EXPORT_CPP:D:UCPP=${CPP:Q}}
326 MAKE_ENV+= LINK_ALL_LIBGCC_HACK=${LINK_ALL_LIBGCC_HACK:Q}
327 MAKE_ENV+= LOCALBASE=${LOCALBASE}
328 MAKE_ENV+= NO_WHOLE_ARCHIVE_FLAG=${NO_WHOLE_ARCHIVE_FLAG:Q}
329 MAKE_ENV+= WHOLE_ARCHIVE_FLAG=${WHOLE_ARCHIVE_FLAG:Q}
330 MAKE_ENV+= X11BASE=${X11BASE}
331 MAKE_ENV+= X11PREFIX=${X11PREFIX}
332
333 # Constants to provide a consistent environment for packages using
334 # BSD-style Makefiles.
335 MAKE_ENV+= MAKECONF=${PKGMAKECONF:U/dev/null}
336 MAKE_ENV+= OBJECT_FMT=${OBJECT_FMT:Q}
337 MAKE_ENV+= ${USETOOLS:DUSETOOLS=${USETOOLS:Q}}
338
339 SCRIPTS_ENV+= ${ALL_ENV}
340 SCRIPTS_ENV+= _PKGSRCDIR=${_PKGSRCDIR}
341 SCRIPTS_ENV+= ${BATCH:DBATCH=yes}
342 SCRIPTS_ENV+= CURDIR=${.CURDIR}
343 SCRIPTS_ENV+= DEPENDS=${DEPENDS:Q}
344 SCRIPTS_ENV+= DISTDIR=${DISTDIR}
345 SCRIPTS_ENV+= FILESDIR=${FILESDIR}
346 SCRIPTS_ENV+= LOCALBASE=${LOCALBASE}
347 SCRIPTS_ENV+= PATCHDIR=${PATCHDIR}
348 SCRIPTS_ENV+= PKGSRCDIR=${PKGSRCDIR}
349 SCRIPTS_ENV+= SCRIPTDIR=${SCRIPTDIR}
350 SCRIPTS_ENV+= VIEWBASE=${VIEWBASE}
351 SCRIPTS_ENV+= WRKDIR=${WRKDIR}
352 SCRIPTS_ENV+= WRKSRC=${WRKSRC}
353 SCRIPTS_ENV+= X11BASE=${X11BASE}
354
355 CONFIGURE_ENV+= ${ALL_ENV}
356
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
357 # Store the result in the +BUILD_INFO file so we can query for the build
358 # options using "pkg_info -Q PKG_OPTIONS <pkg>".
359 #
360 .if defined(PKG_SUPPORTED_OPTIONS) && defined(PKG_OPTIONS)
361 BUILD_DEFS+= PKG_OPTIONS
362 .endif
723e0dd Deprecate IS_INTERACTIVE, and introduce a finer-grained INTERACTIVE_S…
agc authored
363
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
364 .if empty(DEPOT_SUBDIR)
365 PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty."
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
366 .endif
e7f1bfb - Integrate xpkgwedge with a switch, USE_LOCALBASE_FOR_X11, which leaves
tv authored
367
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
368 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
369 #
370 # _PLIST_IGNORE_FILES basically mirrors the list of ignored files found
371 # in pkg_views(1). It's used by the dynamic PLIST generator to skip
372 # adding the named files to the PLIST.
373 #
374 _PLIST_IGNORE_FILES= +* # package metadata files
375 _PLIST_IGNORE_FILES+= info/dir
376 .if defined(INFO_DIR) && empty(INFO_DIR:Minfo)
377 _PLIST_IGNORE_FILES+= ${INFO_DIR}/dir
378 .endif
379 _PLIST_IGNORE_FILES+= *[~\#] *.OLD *.orig *,v # scratch config files
380 _PLIST_IGNORE_FILES+= ${PLIST_IGNORE_FILES}
381 .endif
382 BUILD_DEFS+= _PLIST_IGNORE_FILES
383
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
384 .if !empty(USE_GNU_TOOLS:Mmake)
f7da509 Create a symlink from the "make" requested by the package into
jlam authored
385 _USE_GMAKE= yes
386 .endif
387
fce790b * Push the imake- and xmkmf-handling into the new tools framework.
jlam authored
388 .if empty(_USE_NEW_TOOLS:M[yY][eE][sS])
f7da509 Create a symlink from the "make" requested by the package into
jlam authored
389 .if defined(_USE_GMAKE)
3689d63 Let make do the work:
agc authored
390 MAKE_PROGRAM= ${GMAKE}
f7da509 Create a symlink from the "make" requested by the package into
jlam authored
391 .elif defined(USE_IMAKE)
53fc60b Use GNU make on Linux when USE_IMAKE=yes, because Makefile generated
minskim authored
392 . if ${_IMAKE_MAKE} == ${GMAKE}
393 USE_GNU_TOOLS+= make
394 . endif
c2ead5b Add a definition of _IMAKE_MAKE to the individual defs.${OPSYS}.mk
agc authored
395 MAKE_PROGRAM= ${_IMAKE_MAKE}
f7da509 Create a symlink from the "make" requested by the package into
jlam authored
396 .else
6b85889 Fix thinko in last commit.
tron authored
397 MAKE_PROGRAM= ${MAKE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
398 .endif
6b285bd Several GNU configure scripts (old ones, typically) can't handle it when
jlam authored
399 CONFIGURE_ENV+= MAKE="${MAKE_PROGRAM:T}"
fce790b * Push the imake- and xmkmf-handling into the new tools framework.
jlam authored
400 .endif
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
401
548c62b Add a new variable "UNLIMIT_RESOURCES" which can be used to raise pro…
tron authored
402 # Automatically increase process limit where necessary for building.
403 _ULIMIT_CMD=
404 .if defined(UNLIMIT_RESOURCES)
5c31b38 Allow more flexibility in the handling of UNLIMIT_RESOURCES.
seb authored
405 . for __tmp__ in ${UNLIMIT_RESOURCES}
406 . if defined(ULIMIT_CMD_${__tmp__})
407 _ULIMIT_CMD+= ${ULIMIT_CMD_${__tmp__}} ;
408 . endif
409 . endfor
548c62b Add a new variable "UNLIMIT_RESOURCES" which can be used to raise pro…
tron authored
410 .endif
411
b0a1264 If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
jlam authored
412 # If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
1cb4aa6 add CONFIG_SHELL to CONFIGURE_ENV. This avoids picking up bash as th…
dmcmahill authored
413 # also pass in a CONFIG_SHELL to avoid picking up bash
b0a1264 If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
jlam authored
414 .if defined(GNU_CONFIGURE)
1cb4aa6 add CONFIG_SHELL to CONFIGURE_ENV. This avoids picking up bash as th…
dmcmahill authored
415 CONFIG_SHELL?= ${SH}
416 CONFIGURE_ENV+= CONFIG_SHELL=${CONFIG_SHELL}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
417 CONFIGURE_ENV+= LIBS=${LIBS:M*:Q}
e8b9981 Rather than work around an automake braindeadness, parameterize insta…
tv authored
418 CONFIGURE_ENV+= install_sh=${INSTALL:Q}
0c786a3 Relax need to put GNU_CONFIGURE before inclusion of bsd.prefs.mk:
tv authored
419 . if defined(USE_LIBTOOL) && defined(_OPSYS_MAX_CMDLEN_CMD)
420 CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN_CMD:sh}
f37b1d0 Revert previous (re-add common CPP_PRECOMP_FLAGS). For consistency, …
tv authored
421 . endif
b0a1264 If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
jlam authored
422 .endif
423
4f685d3 - The comment above the _COOKIE settings says "don't change these!!", so
tv authored
424 EXTRACT_COOKIE= ${WRKDIR}/.extract_done
6961536 Initial commit of a new wrapper script framework that encapsulates
jlam authored
425 WRAPPER_COOKIE= ${WRKDIR}/.wrapper_done
4f685d3 - The comment above the _COOKIE settings says "don't change these!!", so
tv authored
426 CONFIGURE_COOKIE= ${WRKDIR}/.configure_done
427 INSTALL_COOKIE= ${WRKDIR}/.install_done
922037a Add a test target to bsd.pkg.mk:
dillo authored
428 TEST_COOKIE= ${WRKDIR}/.test_done
4f685d3 - The comment above the _COOKIE settings says "don't change these!!", so
tv authored
429 BUILD_COOKIE= ${WRKDIR}/.build_done
430 PATCH_COOKIE= ${WRKDIR}/.patch_done
f2a7b21 Move the hide-tools portion of bsd.buildlink2.mk into tools.mk, and
jlam authored
431 TOOLS_COOKIE= ${WRKDIR}/.tools_done
4f685d3 - The comment above the _COOKIE settings says "don't change these!!", so
tv authored
432 PACKAGE_COOKIE= ${WRKDIR}/.package_done
481cd51 Don't create the ${INTERACTIVE_COOKIE}s in the ${WRKDIR} - this will …
agc authored
433 INTERACTIVE_COOKIE= .interactive_stage
6ef5f9a Introduce NULL_COOKIE and use it instead of /dev/null for touch (see …
seb authored
434 NULL_COOKIE= ${WRKDIR}/.null
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
435
436 # Miscellaneous overridable commands:
33ed0c4 Add code to include the size of a package into both the
hubertf authored
437 SHCOMMENT?= ${ECHO_MSG} >/dev/null '***'
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
438
ca2e042 Introduce LIBABISUFFIX for platforms which require ABI-dependant libr…
sketch authored
439 LIBABISUFFIX?=
440
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
441 .if empty(_USE_NEW_TOOLS:M[yY][eE][sS])
a1e4c62 Change references to M4 & YACC into TOOLS_M4 & TOOLS_YACC to simplify
jlam authored
442 TOOLS_M4?= ${M4}
443 TOOLS_YACC?= ${YACC}
444 CONFIGURE_ENV+= M4=${TOOLS_M4:Q} YACC=${TOOLS_YACC:Q}
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
445 .endif
73265d7 Don't use "MOTIFBASE" if "USE_MOTIF" was not defined. Patch supplied by
tron authored
446
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
447 TOUCH_FLAGS?= -f
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
448
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
449 .if !defined(_PKGSRC_USE_PATCH)
450 . if defined(PATCHFILES) && !empty(PATCHFILES)
451 _PKGSRC_USE_PATCH= yes
452 . elif !exists(${PATCHDIR})
453 _PKGSRC_USE_PATCH= no
454 . else
455 _PKGSRC_USE_PATCH!= \
456 if ${TEST} "`${ECHO} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*"; then \
457 ${ECHO} yes; \
458 else \
459 ${ECHO} no; \
460 fi
461 . endif
30e93b4 add a BUILD_DEPENDS on devel/patch if no suitable patch(1) is
grant authored
462 .endif
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
463 MAKEVARS+= _PKGSRC_USE_PATCH
30e93b4 add a BUILD_DEPENDS on devel/patch if no suitable patch(1) is
grant authored
464
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
465 .if !empty(_PKGSRC_USE_PATCH:M[yY][eE][sS])
466 . if empty(_USE_NEW_TOOLS:M[yY][eE][sS])
691a6a2 add GNU gnu patch(1), to override patch(1) on some platforms.
grant authored
467 USE_GNU_TOOLS+= patch
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
468 . else
469 PKGSRC_USE_TOOLS+= patch
470 . endif
30e93b4 add a BUILD_DEPENDS on devel/patch if no suitable patch(1) is
grant authored
471 .endif
472
f97b12f Add automatic manual page handling. This is backwards-compatible with
agc authored
473 .if defined(PATCH_DEBUG) || defined(PKG_VERBOSE)
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
474 PATCH_DEBUG_TMP= yes
475 .else
476 PATCH_DEBUG_TMP= no
8dcf601 Add some new variables to control how "distribution" patches are extr…
jlam authored
477 .endif
478
479 PATCH_STRIP?= -p0
480 .if ${PATCH_DEBUG_TMP} == "yes"
481 PATCH_ARGS?= -d ${WRKSRC} -E ${PATCH_STRIP}
482 .else
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
483 PATCH_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_STRIP}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
484 .endif
485 .if defined(BATCH)
486 PATCH_ARGS+= --batch
487 .endif
8dcf601 Add some new variables to control how "distribution" patches are extr…
jlam authored
488 .if defined(_PATCH_CAN_BACKUP) && (${_PATCH_CAN_BACKUP} == "yes")
c67fef3 make _PATCH_BACKUP_ARG be more useful to callers by moving "-V simple"
lukem authored
489 PATCH_ARGS+= ${_PATCH_BACKUP_ARG} .orig
e3575b0 Add initial support for IRIX.
jschauma authored
490 .endif
8dcf601 Add some new variables to control how "distribution" patches are extr…
jlam authored
491 PATCH_FUZZ_FACTOR?= -F0 # Default to zero fuzz
492
493 # The following variables control how "distribution" patches are extracted
494 # and applied to the package sources.
495 #
496 # PATCH_DIST_STRIP is a patch option that sets the pathname strip count.
497 # PATCH_DIST_ARGS is the list of arguments to pass to the patch command.
498 # PATCH_DIST_CAT is the command that outputs the patch to stdout.
499 #
500 # For each of these variables, there is a patch-specific variant that
501 # may be set, i.e. PATCH_DIST_STRIP.<patch>, PATCH_DIST_ARGS.<patch>,
502 # PATCH_DIST_CAT.<patch>.
503 #
504 PATCH_DIST_STRIP?= -p0
505 .for i in ${PATCHFILES}
506 PATCH_DIST_STRIP.${i:S/=/--/}?= ${PATCH_DIST_STRIP}
507 . if defined(PATCH_DIST_ARGS)
508 PATCH_DIST_ARGS.${i:S/=/--/}?= ${PATCH_DIST_ARGS}
509 . elif ${PATCH_DEBUG_TMP} == "yes"
510 PATCH_DIST_ARGS.${i:S/=/--/}?= -d ${WRKSRC} -E ${PATCH_DIST_STRIP.${i:S/=/--/}}
511 . else
512 PATCH_DIST_ARGS.${i:S/=/--/}?= -d ${WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP.${i:S/=/--/}}
513 . endif
514 .endfor
515 .if defined(BATCH)
516 PATCH_DIST_ARGS+= --batch
517 . for i in ${PATCHFILES}
518 PATCH_DIST_ARGS.${i:S/=/--/}+= --batch
519 . endfor
520 .endif
521 .if defined(_PATCH_CAN_BACKUP) && (${_PATCH_CAN_BACKUP} == "yes")
522 PATCH_DIST_ARGS+= ${_PATCH_BACKUP_ARG} .orig_dist
523 . for i in ${PATCHFILES}
524 PATCH_DIST_ARGS.${i:S/=/--/}+= ${_PATCH_BACKUP_ARG} .orig_dist
525 . endfor
526 .endif
527 PATCH_DIST_CAT?= { case $$patchfile in \
528 *.Z|*.gz) ${GZCAT} $$patchfile ;; \
529 *.bz2) ${BZCAT} $$patchfile ;; \
530 *) ${CAT} $$patchfile ;; \
531 esac; }
532 .for i in ${PATCHFILES}
533 PATCH_DIST_CAT.${i:S/=/--/}?= { patchfile=${i}; ${PATCH_DIST_CAT}; }
534 .endfor
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
535
acbbdce Add a knob PKGSRC_SHOW_PATCH_ERRORMSG to control whether the newly
schmonz authored
536 .if empty(PKGSRC_SHOW_PATCH_ERRORMSG:M[yY][eE][sS])
537 PKGSRC_PATCH_FAIL= exit 1
538 .else
539 PKGSRC_PATCH_FAIL= \
0ea8f54 If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
schmonz authored
540 if [ -n "${PKG_OPTIONS}" ] || [ -n "${_LOCALPATCHFILES}" ]; then \
9d9ab7e Whitespace police - no functional change
agc authored
541 ${ECHO} "=========================================================================="; \
0ea8f54 If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
schmonz authored
542 ${ECHO}; \
9d9ab7e Whitespace police - no functional change
agc authored
543 ${ECHO} "Some of the selected build options and/or local patches may be incompatible."; \
0ea8f54 If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
schmonz authored
544 ${ECHO} "Please try building with fewer options or patches."; \
545 ${ECHO}; \
9d9ab7e Whitespace police - no functional change
agc authored
546 ${ECHO} "=========================================================================="; \
0ea8f54 If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
schmonz authored
547 fi; exit 1
acbbdce Add a knob PKGSRC_SHOW_PATCH_ERRORMSG to control whether the newly
schmonz authored
548 .endif
0ea8f54 If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
schmonz authored
549
d65cf94 Teach bsd.pkg.mk how to extract all files in ${EXTRACT_ONLY} that end in
jlam authored
550 # We need bzip2 for PATCHFILES with .bz2 suffix.
0b6de3c Support bzip2 compressed patch files.
fredb authored
551 .if defined(PATCHFILES)
6bfebe9 There's no need to check for EXTRACT_SUFX when figuring out whether we
jlam authored
552 . if !empty(PATCHFILES:M*.bz2)
9562a74 Teach the new tools framework about USE_TOOLS+=bzcat.
jlam authored
553 . if !empty(_USE_NEW_TOOLS:M[yY][eE][sS])
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
554 PKGSRC_USE_TOOLS+= bzcat
9562a74 Teach the new tools framework about USE_TOOLS+=bzcat.
jlam authored
555 . elif exists(/usr/bin/bzcat)
0b6de3c Support bzip2 compressed patch files.
fredb authored
556 BZCAT= /usr/bin/bzcat
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
557 . else
0b6de3c Support bzip2 compressed patch files.
fredb authored
558 BZCAT= ${LOCALBASE}/bin/bzcat
ecc9249 change BUILD_DEPENDS+= bzip2-0.9.0b:../../archivers/bzip2 to >=0.9.0b;
dogcow authored
559 BUILD_DEPENDS+= bzip2>=0.9.0b:../../archivers/bzip2
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
560 . endif # !exists bzcat
561 . endif
0b6de3c Support bzip2 compressed patch files.
fredb authored
562 .endif # defined(PATCHFILES)
563
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
564 # Figure out where the local mtree file is
8fa5f67 * Make PKGSRC_TOPDIR a private variable by renaming it to _PKGSRC_TOP…
jlam authored
565 MTREE_FILE?= ${PKGSRCDIR}/mk/${OPSYS}.pkg.dist
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
566 MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p
567
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
568 # Debugging levels for this file, dependent on PKG_DEBUG_LEVEL definition
569 # 0 == normal, default, quiet operation
570 # 1 == all shell commands echoed before invocation
571 # 2 == shell "set -x" operation
572 PKG_DEBUG_LEVEL?= 0
573 _PKG_SILENT= @
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
574 _PKG_DEBUG= # empty
575 _PKG_DEBUG_SCRIPT= # empty
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
576
577 .if ${PKG_DEBUG_LEVEL} > 0
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
578 _PKG_SILENT= # empty
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
579 .endif
580
581 .if ${PKG_DEBUG_LEVEL} > 1
582 _PKG_DEBUG= set -x;
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
583 _PKG_DEBUG_SCRIPT= ${SH} -x
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
584 .endif
585
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
586 # A few aliases for *-install targets
804c41e Introduce new variables:
jschauma authored
587 INSTALL_PROGRAM?= \
616dce3 Replace STRIPFLAG with _STRIPFLAG_INSTALL to fix pkg/15467.
yyamano authored
588 ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
589 INSTALL_GAME?= \
590 ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEMODE}
591 INSTALL_SCRIPT?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
592 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
593 INSTALL_LIB?= \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
594 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
595 INSTALL_DATA?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
596 ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}
0e6e504 Introduce GAMEDATAMODE and INSTALL_GAME_DATA, which will take care
jschauma authored
597 INSTALL_GAME_DATA?= \
598 ${INSTALL} ${COPY} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDATAMODE}
804c41e Introduce new variables:
jschauma authored
599 INSTALL_MAN?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
600 ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
804c41e Introduce new variables:
jschauma authored
601 INSTALL_PROGRAM_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
602 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${PKGDIRMODE}
804c41e Introduce new variables:
jschauma authored
603 INSTALL_SCRIPT_DIR?= \
2fcd7fe Add INSTALL_*_DIR macros.
hubertf authored
604 ${INSTALL_PROGRAM_DIR}
804c41e Introduce new variables:
jschauma authored
605 INSTALL_LIB_DIR?= \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
606 ${INSTALL_PROGRAM_DIR}
804c41e Introduce new variables:
jschauma authored
607 INSTALL_DATA_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
608 ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${PKGDIRMODE}
804c41e Introduce new variables:
jschauma authored
609 INSTALL_MAN_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
610 ${INSTALL} -d -o ${MANOWN} -g ${MANGRP} -m ${PKGDIRMODE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
611
b232e31 Use ${SORT} and ${WC} instead of sort and wc. Also some minor whites…
jlam authored
612 INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
613 BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
614 BSD_INSTALL_LIB="${INSTALL_LIB}" \
b232e31 Use ${SORT} and ${WC} instead of sort and wc. Also some minor whites…
jlam authored
615 BSD_INSTALL_DATA="${INSTALL_DATA}" \
616 BSD_INSTALL_MAN="${INSTALL_MAN}" \
2575256 * pass BSD_INSTALL to programs, just like the other BSD_INSTALL_* ma…
hubertf authored
617 BSD_INSTALL="${INSTALL}" \
b232e31 Use ${SORT} and ${WC} instead of sort and wc. Also some minor whites…
jlam authored
618 BSD_INSTALL_PROGRAM_DIR="${INSTALL_PROGRAM_DIR}" \
619 BSD_INSTALL_SCRIPT_DIR="${INSTALL_SCRIPT_DIR}" \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
620 BSD_INSTALL_LIB_DIR="${INSTALL_LIB_DIR}" \
b232e31 Use ${SORT} and ${WC} instead of sort and wc. Also some minor whites…
jlam authored
621 BSD_INSTALL_DATA_DIR="${INSTALL_DATA_DIR}" \
06c3fe7 INSTALL_GAME should be exported a as BSD_INSTALL_GAME
jschauma authored
622 BSD_INSTALL_MAN_DIR="${INSTALL_MAN_DIR}" \
0e6e504 Introduce GAMEDATAMODE and INSTALL_GAME_DATA, which will take care
jschauma authored
623 BSD_INSTALL_GAME="${INSTALL_GAME}" \
624 BSD_INSTALL_GAME_DATA="${INSTALL_GAME_DATA}"
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
625 MAKE_ENV+= ${INSTALL_MACROS}
626 SCRIPTS_ENV+= ${INSTALL_MACROS}
627
628 # The user can override the NO_PACKAGE by specifying this from
629 # the make command line
630 .if defined(FORCE_PACKAGE)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
631 . undef NO_PACKAGE
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
632 .endif
633
0c6bf26 s/PLIST_SUB/PLIST_SUBST/
sakamoto authored
634 # Set PLIST_SUBST to substitute "${variable}" to "value" in PLIST
74d9b13 Changes for building dynamic PLIST for perl packages:
jlam authored
635 PLIST_SUBST+= OPSYS=${OPSYS} \
636 OS_VERSION=${OS_VERSION} \
637 MACHINE_ARCH=${MACHINE_ARCH} \
638 MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH} \
639 MACHINE_GNU_PLATFORM=${MACHINE_GNU_PLATFORM} \
a9f2d0b Add missing LN to PLIST_SUBST
rh authored
640 LN=${LN:Q} \
74d9b13 Changes for building dynamic PLIST for perl packages:
jlam authored
641 LOWER_VENDOR=${LOWER_VENDOR} \
642 LOWER_OPSYS=${LOWER_OPSYS} \
893cbf3 Add LOWER_OS_VERSION to match LOWER_OPSYS, LOWER_VENDOR, and LOWER_ARCH
abs authored
643 LOWER_OS_VERSION=${LOWER_OS_VERSION} \
497a81c Add ${PKGBASE} to the things to substitute for in PLISTs.
jlam authored
644 PKGBASE=${PKGBASE} \
13cc4c1 Invent a new variable "PKGNAME_NOREV" which holds the package name wi…
tron authored
645 PKGNAME=${PKGNAME_NOREV} \
fe5e2f6 Fix cut and paste error in last commit.
tron authored
646 PKGLOCALEDIR=${PKGLOCALEDIR} \
647 PKGVERSION=${PKGVERSION:C/nb[0-9]*$//} \
2ae742b Don't hardcode /usr/X11R6 when making directories or running X based
skrll authored
648 LOCALBASE=${LOCALBASE} \
f3a9373 Make the value of VIEWBASE available in more settings.
jlam authored
649 VIEWBASE=${VIEWBASE} \
2ae742b Don't hardcode /usr/X11R6 when making directories or running X based
skrll authored
650 X11BASE=${X11BASE} \
651 X11PREFIX=${X11PREFIX} \
756a336 So many of our PLIST use mkdir, rmdir, and true, and we have full pat…
jlam authored
652 SVR4_PKGNAME=${SVR4_PKGNAME} \
a562193 Also substitute for CHMOD, CHOWN, CHGRP in PLISTs.
jlam authored
653 CHGRP=${CHGRP:Q} \
654 CHMOD=${CHMOD:Q} \
655 CHOWN=${CHOWN:Q} \
756a336 So many of our PLIST use mkdir, rmdir, and true, and we have full pat…
jlam authored
656 MKDIR=${MKDIR:Q} \
657 RMDIR=${RMDIR:Q} \
ced2d2e mkdir -> ${MKDIR}
skrll authored
658 RM=${RM:Q} \
a00c14a Add QMAILDIR variable that defaults to /var/qmail, may be set in /etc…
zuntum authored
659 TRUE=${TRUE:Q} \
660 QMAILDIR=${QMAILDIR}
bb5add8 Add support for PLIST_SUB variable. It is a list of "VAR=VALUE" pairs,
sakamoto authored
661
5026c4b Add alternatives.mk, a file used to manipulate the alternatives system.
jmmv authored
662 # Handle alternatives
663 #
664 .include "../../mk/alternatives.mk"
665
0a7cbe8 Introduce a new variable "CONF_DEPENDS" for pkgviews: a package's
jlam authored
666 # CONF_DEPENDS notes a dependency where the config directory for the
667 # package matches the dependency's config directory. CONF_DEPENDS is
668 # only meaningful if ${PKG_INSTALLATION_TYPE} == "pkgviews".
669 #
670 CONF_DEPENDS?= # empty
671 .if !empty(CONF_DEPENDS)
672 USE_PKGINSTALL= yes
673 .endif
674
41ad09d Move the inclusion of bsd.pkg.install.mk higher so that binary packages
jlam authored
675 .if defined(USE_PKGINSTALL) && !empty(USE_PKGINSTALL:M[yY][eE][sS])
cfc824b Rename mk/bsd.pkg.install.mk to mk/install/bsd.pkginstall.mk to
jlam authored
676 . include "../../mk/install/bsd.pkginstall.mk"
41ad09d Move the inclusion of bsd.pkg.install.mk higher so that binary packages
jlam authored
677 .endif
678
8067991 Make any INSTALL or DEINSTALL scripts specifiable in the package
agc authored
679 # Set INSTALL_FILE to be the name of any INSTALL file
680 .if !defined(INSTALL_FILE) && exists(${PKGDIR}/INSTALL)
681 INSTALL_FILE= ${PKGDIR}/INSTALL
682 .endif
683
684 # Set DEINSTALL_FILE to be the name of any DEINSTALL file
685 .if !defined(DEINSTALL_FILE) && exists(${PKGDIR}/DEINSTALL)
686 DEINSTALL_FILE= ${PKGDIR}/DEINSTALL
687 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
688
1ca7a4f Allow MESSAGE_SRC to be a space-separated list of files, like PLIST_SRC,
jlam authored
689 # If MESSAGE hasn't been defined, then set MESSAGE_SRC to be a space-separated
690 # list of files to be concatenated together to generate the MESSAGE file.
691 #
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
692 .if !defined(MESSAGE_SRC) && !defined(MESSAGE)
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
693 . if exists(${PKGDIR}/MESSAGE)
694 MESSAGE_SRC= ${PKGDIR}/MESSAGE
695 . else
696 . if exists(${PKGDIR}/MESSAGE.common)
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
697 MESSAGE_SRC= ${PKGDIR}/MESSAGE.common
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
698 . endif
699 . if exists(${PKGDIR}/MESSAGE.${OPSYS})
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
700 MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
701 . endif
f47f0f3 Add architecture specific MESSAGE file handling.
salo authored
702 . if exists(${PKGDIR}/MESSAGE.${MACHINE_ARCH:C/i[3-6]86/i386/g})
703 MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${MACHINE_ARCH:C/i[3-6]86/i386/g}
704 . endif
dcb217c use the form MESSAGE.${OPSYS}-${MACHINE_PLATFORM} for automatic
grant authored
705 . if exists(${PKGDIR}/MESSAGE.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g})
706 MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
707 . endif
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
708 . endif
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
709 .endif
710
711 .if defined(MESSAGE_SRC)
e377186 Rework the way that packages are registered during a "make install". We
jlam authored
712 MESSAGE= ${PKG_DB_TMPDIR}/+DISPLAY
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
713
714 # Set MESSAGE_SUBST to substitute "${variable}" to "value" in MESSAGE
715 MESSAGE_SUBST+= PKGNAME=${PKGNAME} \
03b74cd Add PKGBASE to MESSAGE_SUBST for substituting variables in MESSAGEs.
reed authored
716 PKGBASE=${PKGBASE} \
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
717 PREFIX=${PREFIX} \
718 LOCALBASE=${LOCALBASE} \
f3a9373 Make the value of VIEWBASE available in more settings.
jlam authored
719 VIEWBASE=${VIEWBASE} \
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
720 X11PREFIX=${X11PREFIX} \
625d612 Also substitute for ${PKG_SYSCONFDIR} in MESSAGE files.
jlam authored
721 X11BASE=${X11BASE} \
42380fa Add ${QMAILDIR} to MESSAGE_SUBST, as it is going to be used in all qm…
zuntum authored
722 PKG_SYSCONFDIR=${PKG_SYSCONFDIR} \
701973b Recognize ROOT_USER and ROOT_GROUP in MESSAGE files.
jlam authored
723 ROOT_GROUP=${ROOT_GROUP} \
724 ROOT_USER=${ROOT_USER} \
42380fa Add ${QMAILDIR} to MESSAGE_SUBST, as it is going to be used in all qm…
zuntum authored
725 QMAILDIR=${QMAILDIR}
1ca7a4f Allow MESSAGE_SRC to be a space-separated list of files, like PLIST_SRC,
jlam authored
726
727 MESSAGE_SUBST_SED= ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/}
89a889b Make the REQ and MESSAGE files specifiable from package Makefiles,
agc authored
728 .endif
729
3bfda94 Due to the special handling of pkgtools/digest in pkgsrc (it must be
jlam authored
730 # If pkgsrc is supposed to ensure that tests are run before installation
731 # of the package, then the build targets should be "build test", otherwise
732 # just "build" suffices. _PKGSRC_BUILD_TARGETS is used in the "all",
733 # "install", and "uptodate-digest" targets.
734 #
735 .if !empty(PKGSRC_RUN_TEST:M[yY][eE][sS])
736 _PKGSRC_BUILD_TARGETS= build test
737 .else
738 _PKGSRC_BUILD_TARGETS= build
739 .endif
740
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
741 .PHONY: uptodate-digest
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
742 uptodate-digest:
6dd50f7 Test was reversed.
jlam authored
743 .if !empty(USE_DIGEST:M[yY][eE][sS])
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
744 ${_PKG_SILENT}${_PKG_DEBUG} \
80258e3 Change uptodate-digest check from excluding digest on 'digest-* | pkg…
abs authored
745 if [ -f ${DISTINFO_FILE} -a \( ! -f ${DIGEST} -o ${DIGEST_VERSION} -lt ${DIGEST_REQD} \) ]; then \
8fa5f67 * Make PKGSRC_TOPDIR a private variable by renaming it to _PKGSRC_TOP…
jlam authored
746 { cd ${PKGSRCDIR}/pkgtools/digest; \
80258e3 Change uptodate-digest check from excluding digest on 'digest-* | pkg…
abs authored
747 ${MAKE} clean; \
748 if [ -f ${DIGEST} ]; then \
749 ${MAKE} ${MAKEFLAGS} deinstall; \
750 fi; \
3bfda94 Due to the special handling of pkgtools/digest in pkgsrc (it must be
jlam authored
751 ${MAKE} ${MAKEFLAGS} ${_PKGSRC_BUILD_TARGETS}; \
752 if [ -f ${DIGEST} ]; then \
753 ${MAKE} ${MAKEFLAGS} deinstall; \
754 fi; \
80258e3 Change uptodate-digest check from excluding digest on 'digest-* | pkg…
abs authored
755 ${MAKE} ${MAKEFLAGS} ${DEPENDS_TARGET}; \
756 ${MAKE} ${MAKEFLAGS} clean; } \
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
757 fi
3e1f9b1 If USE_DIGEST is "no", then skip the check for an up-to-date digest.
jlam authored
758 .else
759 @${DO_NADA}
760 .endif
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
761
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
762 .if !defined(PKG_ARGS_COMMON)
005bc33 Revert previous. There are extra quotes in COMMENT files created by make
bouyer authored
763 PKG_ARGS_COMMON= -v -c -${COMMENT:Q}" " -d ${DESCR} -f ${PLIST}
659515a Change COMMENT handling:
wiz authored
764 PKG_ARGS_COMMON+= -l -b ${BUILD_VERSION_FILE} -B ${BUILD_INFO_FILE}
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
765 PKG_ARGS_COMMON+= -s ${SIZE_PKG_FILE} -S ${SIZE_ALL_FILE}
8b08eac Undo implicit recursive package registration. The buildlink[23] syst…
tv authored
766 PKG_ARGS_COMMON+= -P "`${MAKE} ${MAKEFLAGS} run-depends-list | ${SORT} -u`"
f28b512 Don't write conflicts into the binary packages unless they're "overwr…
jlam authored
767 . if defined(CONFLICTS) && (${PKG_INSTALLATION_TYPE} == "overwrite")
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
768 PKG_ARGS_COMMON+= -C "${CONFLICTS}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
769 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
770 . if defined(INSTALL_FILE)
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
771 PKG_ARGS_COMMON+= -i ${INSTALL_FILE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
772 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
773 . if defined(DEINSTALL_FILE)
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
774 PKG_ARGS_COMMON+= -k ${DEINSTALL_FILE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
775 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
776 . if defined(MESSAGE)
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
777 PKG_ARGS_COMMON+= -D ${MESSAGE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
778 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
779 . if !defined(NO_MTREE)
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
780 PKG_ARGS_COMMON+= -m ${MTREE_FILE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
781 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
782 . if defined(PKG_PRESERVE)
2b46b12 Add the PKG_PRESERVE capability to bsd.pkg.mk.
agc authored
783 PKG_ARGS_COMMON+= -n ${PRESERVE_FILE}
784 . endif
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
785
786 PKG_ARGS_INSTALL= -p ${PREFIX} ${PKG_ARGS_COMMON}
de09ff8 Don't use regexp substitution where plain substitution is intended,
hubertf authored
787 PKG_ARGS_BINPKG= -p ${PREFIX:S/^${DESTDIR}//} -L ${PREFIX} ${PKG_ARGS_COMMON}
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
788 .endif # !PKG_ARGS_COMMON
789
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
790 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
791 PKG_ARGS_INSTALL+= -U # don't update the pkgdb.byfile.db
792 PKG_ARGS_BINPKG+= -E # create an empty views file in the binpkg
793 .endif
794
04f7e63 Previous commit to bsd.pkg.mk caught some "SMART_MESSAGES" work - doc…
agc authored
795 # Define SMART_MESSAGES in /etc/mk.conf for messages giving the tree
2899a74 Typo in comment for SMART_MESSAGES.
jlam authored
796 # of dependencies for building, and the current target.
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
797 .if defined(SMART_MESSAGES)
fce3306 Fix PACKAGE_DEPENDS_QUICK when installing on Solaris - escape the
agc authored
798 _PKGSRC_IN?= ===> ${.TARGET} [${PKGNAME}${_PKGSRC_DEPS}] ===
799 .else
800 _PKGSRC_IN?= ===
801 .endif
802
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
803 # Used to print all the '===>' style prompts - override this to turn them off.
804 ECHO_MSG?= ${ECHO}
805
6348997 Introduce TRUE?=/usr/bin/true, and use it.
hubertf authored
806 # How to do nothing. Override if you, for some strange reason, would rather
807 # do something.
808 DO_NADA?= ${TRUE}
809
c502b71 Implement a new PASSIVE_FETCH definition, which can be set in the
agc authored
810 # If this host is behind a filtering firewall, use passive ftp(1)
811 .if defined(PASSIVE_FETCH)
812 FETCH_BEFORE_ARGS += -p
813 .endif
814
74e5f84 Remove MASTER_SITE_* definitions from bsd.pkg.mk and put them
xtraeme authored
815 # Include popular master sites
816 .include "../../mk/bsd.sites.mk"
817
f82ed56 Automatically set MASTER_SITE_LOCAL from MASTER_SITE_BACKUP, and make…
hubertf authored
818 .if defined(DIST_SUBDIR)
8a6c9b4 Don't apply ${DIST_SUBDIR} twice.
hubertf authored
819 _MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}/}
820 . if defined(MASTER_SITE_OVERRIDE)
821 _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}/}
822 . endif # MASTER_SITE_OVERRIDE
823 .else # !DIST_SUBDIR
824 _MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP}
825 . if defined(MASTER_SITE_OVERRIDE)
826 _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_OVERRIDE}
827 . endif # MASTER_SITE_OVERRIDE
608d9dc Only add DIST_SUBDIR to MASTER_SITE_OVERRIDE if MASTER_SITE_OVERRIDE
hubertf authored
828 .endif # DIST_SUBDIR
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
829
830 # Where to put distfiles that don't have any other master site
831 MASTER_SITE_LOCAL?= \
b593c1a Add "ftp.fi.netbsd.org" to "MASTER_SITE_LOCAL" so that e.g. building
tron authored
832 ${MASTER_SITE_BACKUP:=LOCAL_PORTS/} \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
833
834 ALLFILES?= ${DISTFILES} ${PATCHFILES}
8fb71f4 Speed up the evaluation of ${CKSUMFILES} vs. ${IGNOREFILES} a little …
tv authored
835 CKSUMFILES?= ${ALLFILES}
836 .for __tmp__ in ${IGNOREFILES}
837 CKSUMFILES:= ${CKSUMFILES:N${__tmp__}}
838 .endfor
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
839
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
840 # List of all files, with ${DIST_SUBDIR} in front. Used for fetch and checksum.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
841 .if defined(DIST_SUBDIR)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
842 . if ${CKSUMFILES} != ""
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
843 _CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
844 . endif
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
845 . if !empty(DISTFILES)
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
846 _DISTFILES?= ${DISTFILES:S/^/${DIST_SUBDIR}\//}
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
847 . else
848 _DISTFILES?= # empty
849 . endif
850 . if defined(IGNOREFILES) && !empty(IGNOREFILES)
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
851 _IGNOREFILES?= ${IGNOREFILES:S/^/${DIST_SUBDIR}\//}
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
852 . endif
853 . if defined(PATCHFILES) && !empty(PATCHFILES)
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
854 _PATCHFILES?= ${PATCHFILES:S/^/${DIST_SUBDIR}\//}
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
855 . else
856 _PATCHFILES?= # empty
857 . endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
858 .else
859 _CKSUMFILES?= ${CKSUMFILES}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
860 _DISTFILES?= ${DISTFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
861 _IGNOREFILES?= ${IGNOREFILES}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
862 _PATCHFILES?= ${PATCHFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
863 .endif
d811f67 Re-work the fetch target(s), as discussed on "tech-pkg". The primary
fredb authored
864 _ALLFILES?= ${_DISTFILES} ${_PATCHFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
865
2465e63 Add _DISTFILES and _PATCHFILES definitions to the list of definitions
agc authored
866 BUILD_DEFS+= _DISTFILES _PATCHFILES
867
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
868 .if defined(GNU_CONFIGURE)
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
869 #
d405635 It's GNU_CONFIGURE_PREFIX, not CONFIGURE_PREFIX.
jlam authored
870 # GNU_CONFIGURE_PREFIX is the argument to the --prefix option passed to the
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
871 # GNU configure script.
872 #
873 GNU_CONFIGURE_PREFIX?= ${PREFIX}
90653cf Occasionally we do not want the "--host=${MACHINE_GNU_PLATFORM}" argu…
agc authored
874 USE_GNU_CONFIGURE_HOST?= yes
875 . if !empty(USE_GNU_CONFIGURE_HOST:M[yY][eE][sS])
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
876 CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM}
90653cf Occasionally we do not want the "--host=${MACHINE_GNU_PLATFORM}" argu…
agc authored
877 . endif
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
878 CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
879 HAS_CONFIGURE= yes
ac86563 Always add --x-{includes,libraries}=${X11BASE}/{include,lib}
seb authored
880 . if defined(USE_X11)
6f949fd x11.buildlink.mk is no more so remove checks for X11_BUILDLINK_MK.
jlam authored
881 CONFIGURE_ARGS+= --x-includes=${X11BASE}/include
ca2e042 Introduce LIBABISUFFIX for platforms which require ABI-dependant libr…
sketch authored
882 CONFIGURE_ARGS+= --x-libraries=${X11BASE}/lib${LIBABISUFFIX}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
883 . endif
d598c3a Rename NO_CONFIGURE_INFODIR to CONFIGURE_HAS_INFODIR (which defaults to
reed authored
884 CONFIGURE_HAS_INFODIR?= yes
885 . if !empty(INFO_FILES) && !empty(CONFIGURE_HAS_INFODIR:M[yY][eE][sS])
ebc2c7f If using GNU_CONFIGURE then set --infodir to ${PREFIX}/${INFO_DIR}.
reed authored
886 CONFIGURE_ARGS+= --infodir=${PREFIX}/${INFO_DIR}
887 . endif
df695c5 if using GNU configure and CONFIG_{GUESS,SUB}_OVERRIDE is not defined,
grant authored
888 #
889 # By default, override config.guess and config.sub for GNU configure
890 # packages. pkgsrc's updated versions of these scripts allows GNU
891 # configure to recognise NetBSD ports such as shark.
892 #
2c41357 Make CONFIG_{GUESS,SUB}_OVERRIDE slighly more powerful by allowing th…
jlam authored
893 CONFIG_GUESS_OVERRIDE?= \
894 config.guess */config.guess */*/config.guess
895 CONFIG_SUB_OVERRIDE?= \
896 config.sub */config.sub */*/config.sub
6d20fd6 Add override for uncommon "config.rpath" GNU config snippet. Use pla…
tv authored
897 CONFIG_RPATH_OVERRIDE?= # set by platform file as needed
9de0bce Default to overriding config.status after GNU configure has been run.…
jlam authored
898 #
899 # By default, override config.status for GNU configure packages. We
900 # never want it to execute after the configure phase has ended as it
901 # might overwrite any post-configure changes we might have made to the
902 # generated files.
903 #
904 CONFIG_STATUS_OVERRIDE?= \
905 config.status */config.status */*/config.status
a7639cc Update buildlink-x11 to 0.5. Changes from previous version are the
jlam authored
906 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
907
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
908 #
dc0503f Refer doc/pkgsrc.txt instead of Packages.txt.
wiz authored
909 # Config file related settings - see doc/pkgsrc.txt
27734d7 Create a new knob: PKG_SYSCONFVAR
jlam authored
910 #
911 PKG_SYSCONFVAR?= ${PKGBASE}
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
912 PKG_SYSCONFSUBDIR?= # empty
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
913 .if ${PKG_INSTALLATION_TYPE} == "overwrite"
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
914 PKG_SYSCONFDEPOTBASE= # empty
b6d609c Package Makefiles should refer to PKG_SYSCONFBASEDIR instead of
jlam authored
915 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
916 .else
917 . if !empty(PKG_SYSCONFBASE:M${PREFIX}) || \
918 !empty(PKG_SYSCONFBASE:M${PREFIX}/*)
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
919 PKG_SYSCONFDEPOTBASE= # empty
b6d609c Package Makefiles should refer to PKG_SYSCONFBASEDIR instead of
jlam authored
920 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
921 . if !empty(CONF_DEPENDS)
922 _PLIST_IGNORE_FILES+= ${PKG_SYSCONFDIR:S,^${PREFIX}/,,}
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
923 . endif
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
924 . else
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
925 PKG_SYSCONFDEPOTBASE= ${PKG_SYSCONFBASE}/${DEPOT_SUBDIR}
926 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDEPOTBASE}/${PKGNAME}
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
927 . endif
928 .endif
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
929 .if empty(PKG_SYSCONFSUBDIR)
930 DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}
931 .else
932 DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}/${PKG_SYSCONFSUBDIR}
933 .endif
934 PKG_SYSCONFDIR= ${DFLT_PKG_SYSCONFDIR}
935 .if defined(PKG_SYSCONFDIR.${PKG_SYSCONFVAR})
936 PKG_SYSCONFDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
937 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
938 PKG_SYSCONFDEPOTBASE= # empty
939 .endif
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
940
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
941 ALL_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
0a7cbe8 Introduce a new variable "CONF_DEPENDS" for pkgviews: a package's
jlam authored
942 BUILD_DEFS+= PKG_SYSCONFBASEDIR PKG_SYSCONFDIR
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
943
8cff683 if NO_BUILD is defined, default to an empty USE_LANGUAGES.
grant authored
944 # If NO_BUILD is defined, default to not needing a compiler.
945 .if defined(NO_BUILD)
946 USE_LANGUAGES?= # empty
947 .endif
948
0659c5a Include bsd.compiler.mk inside both bsd.pkg.mk and bsd.prefs.mk and d…
jlam authored
949 # Get the proper dependencies and set the PATH to use the compiler
950 # named in PKGSRC_COMPILER.
951 #
1221299 * Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk.
jlam authored
952 .include "../../mk/compiler.mk"
0659c5a Include bsd.compiler.mk inside both bsd.pkg.mk and bsd.prefs.mk and d…
jlam authored
953
57095a1 Split replace.mk into two parts, one of which is included by bsd.pref…
jlam authored
954 # These are all of the tools use by pkgsrc Makefiles. This should
955 # eventually be split up into lists of tools required by different
956 # phases of a pkgsrc build.
957 #
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
958 PKGSRC_USE_TOOLS+= \
959 [ awk basename cat chgrp chmod chown cmp cp cut date dirname \
960 echo egrep env expr false fgrep file find grep gtar gunzip \
d2d29b0 Split out ldconfig handling from the USE_TOOLS processing in replace.mk.
jlam authored
961 gzcat gzip head hostname id install ln ls m4 mkdir mtree mv \
2edddfa Don't check for ${SHLOCK}, which isn't defined yet that early in
jlam authored
962 nice pax pwd rm rmdir sed sh sort tail tee test touch tr true \
963 tsort wc xargs
57095a1 Split replace.mk into two parts, one of which is included by bsd.pref…
jlam authored
964
c4398dc Teach the new tools framework about MAIL_CMD. We use mail/nail as a
jlam authored
965 # We need a mail command to send mail to ${PKGSRC_MESSAGE_RECIPIENTS}.
966 .if !empty(PKGSRC_MESSAGE_RECIPIENTS)
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
967 PKGSRC_USE_TOOLS+= mail
c4398dc Teach the new tools framework about MAIL_CMD. We use mail/nail as a
jlam authored
968 .endif
969
95d512b Separate out the variables and targets for the "extract" phase into a
jlam authored
970 # Extract
971 .include "../../mk/bsd.pkg.extract.mk"
972
70491a4 Moved checking if ${SHLOCK} exists into the shell code fragment that
rillig authored
973 # this must come before tools/bsd.tools.mk is included
974 .if ${PKGSRC_LOCKTYPE} != "none"
975 PKGSRC_USE_TOOLS+= shlock
976 .endif
977
a369e2f Prepend USE_NEW_TOOLS with an underscore to make it private. Developers
jlam authored
978 .if !empty(_USE_NEW_TOOLS:M[yY][eE][sS])
416554c Add a new yes/no variable USE_NEW_TOOLS to ease testing the new tools
jlam authored
979 .include "../../mk/tools/bsd.tools.mk"
980 .else
eccaef6 Move the inclusion of tools.mk ahead of bsd.buildlink3.mk so that too…
jlam authored
981 .include "../../mk/tools.mk"
416554c Add a new yes/no variable USE_NEW_TOOLS to ease testing the new tools
jlam authored
982 .endif
eccaef6 Move the inclusion of tools.mk ahead of bsd.buildlink3.mk so that too…
jlam authored
983
427307f Always include wrapper/bl3, period, even if NO_BUILD.
tv authored
984 .include "../../mk/wrapper/bsd.wrapper.mk"
93cd8e1 Merge pkgsrc/mk from the buildlink2 branch back into the main trunk.
jlam authored
985
437ad7a Process RECOMMENDED *after* including bsd.buildlink3.mk; else it has no
tv authored
986 .if defined(RECOMMENDED)
987 . if !empty(IGNORE_RECOMMENDED:M[nN][oO])
988 DEPENDS+= ${RECOMMENDED}
989 . else
990 BUILD_DEFS+= IGNORE_RECOMMENDED
991 . endif
992 .endif
993
591e989 Move the "dependency reduction" code from buildlink3 to bsd.pkg.mk so
jlam authored
994 # Remove some redundant dependencies from the DEPENDS list.
995 .include "../../mk/reduce-depends.mk"
996 DEPENDS:= ${REDUCED_DEPENDS}
997
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
998 # Find out the PREFIX of dependencies where the PREFIX is needed at build time.
999 .if defined(EVAL_PREFIX)
d0cb1b1 Instead of structuring code so that variables defined by the EVAL_PREFIX
jlam authored
1000 FIND_PREFIX:= ${EVAL_PREFIX}
1001 . include "../../mk/find-prefix.mk"
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
1002 .endif
1003
1004 .if !defined(_PATH_ORIG)
1005 _PATH_ORIG:= ${PATH}
1006 MAKEFLAGS+= _PATH_ORIG=${_PATH_ORIG:Q}
7007706 Fix handling of PREPEND_PATH in dependency-recursed builds.
tv authored
1007 .endif
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
1008
7007706 Fix handling of PREPEND_PATH in dependency-recursed builds.
tv authored
1009 .if !empty(PREPEND_PATH)
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
1010 # This is very Special. Because PREPEND_PATH is set with += in reverse order,
1011 # the awk expression reverses the order again (since bootstrap bmake doesn't
1012 # yet support the :[-1..1] construct).
1013 _PATH_CMD= ${ECHO} `${ECHO} ${PREPEND_PATH:Q} | ${AWK} '{ORS=":";for (i=NF;i>0;i--) print $$i}'`${_PATH_ORIG}
1014 PATH= ${_PATH_CMD:sh} # DOES NOT use :=, to defer evaluation
1015 .endif
1221299 * Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk.
jlam authored
1016
e0f0c1d Rename PATH_ENV to BUILD_ENV, which better expresses what it's for.
jlam authored
1017 # Add these bits to the environment use when invoking the sub-make
1018 # processes for build-related phases.
1019 #
e7d8e66 Move the PREPEND_PATH for LOCALBASE/bin (and optionally X11BASE/bin) …
tv authored
1020 BUILD_ENV+= PATH=${PATH:Q}
326967f We only prepend a directory to the PATH if we haven't already done so
jlam authored
1021
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1022 .MAIN: all
1023
1024 ################################################################
67feee0 This is NetBSD. s/port/package/g
agc authored
1025 # Many ways to disable a package.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1026 #
23b1b09 Revert last change. I only tested this on netbsd-1-4; it doesn't seem to
fredb authored
1027 # Ignore packages that can't be resold if building for a CDROM.
3c860ad Introduce a new category, "crypto", with a special property: If the user
fredb authored
1028 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
1029 # Don't build a package if it's restricted and we don't want to
1030 # get into that.
1031 #
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
1032 # Don't build any package that utilizes strong cryptography, for
1033 # when the law of the land forbids it.
1034 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
1035 # Don't attempt to build packages against X if we don't have X.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1036 #
67feee0 This is NetBSD. s/port/package/g
agc authored
1037 # Don't build a package if it's broken.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1038 ################################################################
1039
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
1040 .if !defined(NO_SKIP)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1041 . if (defined(NO_BIN_ON_CDROM) && defined(FOR_CDROM))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1042 PKG_FAIL_REASON+= "${PKGNAME} may not be placed in binary form on a CDROM:" \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1043 " "${NO_BIN_ON_CDROM:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1044 . endif
1045 . if (defined(NO_SRC_ON_CDROM) && defined(FOR_CDROM))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1046 PKG_FAIL_REASON+= "${PKGNAME} may not be placed in source form on a CDROM:" \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1047 " "${NO_SRC_ON_CDROM:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1048 . endif
1049 . if (defined(RESTRICTED) && defined(NO_RESTRICTED))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1050 PKG_FAIL_REASON+= "${PKGNAME} is restricted:" \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1051 " "${RESTRICTED:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1052 . endif
1053 . if !(${MKCRYPTO} == "YES" || ${MKCRYPTO} == yes)
5bdfc68 Deprecate USE_SSL.
wiz authored
1054 . if defined(CRYPTO)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1055 PKG_FAIL_REASON+= "${PKGNAME} may not be built, because it utilizes strong cryptography"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1056 . endif
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
1057 . endif
c62edef Use X11_TYPE check instead of USE_PKGSRC_XFREE86. It's safe to use the
jlam authored
1058 . if defined(USE_X11) && !exists(${X11BASE})
1059 . if ${X11_TYPE} == "native"
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1060 PKG_FAIL_REASON+= "${PKGNAME} uses X11, but ${X11BASE} not found"
c62edef Use X11_TYPE check instead of USE_PKGSRC_XFREE86. It's safe to use the
jlam authored
1061 . else
1062 ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${X11BASE}
1063 ${_PKG_SILENT}${_PKG_DEBUG}${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${X11BASE}
1064 ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} ${PKGDIRMODE} ${X11BASE}
1065 . endif
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1066 . endif
1067 . if defined(BROKEN)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1068 PKG_FAIL_REASON+= "${PKGNAME} is marked as broken:" ${BROKEN:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1069 . endif
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1070
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1071 . if defined(LICENSE)
d23c566 Found another two uses of .ifndef and .ifdef.
rillig authored
1072 . if defined(ACCEPTABLE_LICENSES)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1073 . for _lic in ${ACCEPTABLE_LICENSES}
1074 . if ${LICENSE} == "${_lic}"
ac8a769 Add an ACCEPTABLE_LICENCES definition to /etc/mk.conf. This is a
agc authored
1075 _ACCEPTABLE= yes
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1076 . endif # LICENSE == _lic
1077 . endfor # _lic
1078 . endif # ACCEPTABLE_LICENSES
d23c566 Found another two uses of .ifndef and .ifdef.
rillig authored
1079 . if !defined(_ACCEPTABLE)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1080 PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
94bf044 Update the wording a bit when a license is not accepted, to better
hubertf authored
1081 " To view the license, enter \"${MAKE} show-license\"." \
1082 " To indicate acceptance, add this line to your /etc/mk.conf:" \
1083 " ACCEPTABLE_LICENSES+=${LICENSE}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1084 . endif # _ACCEPTABLE
1085 . endif # LICENSE
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1086
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
1087 # Define __PLATFORM_OK only if the OS matches the pkg's allowed list.
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1088 . if defined(ONLY_FOR_PLATFORM) && !empty(ONLY_FOR_PLATFORM)
1089 . for __tmp__ in ${ONLY_FOR_PLATFORM}
1090 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
1091 __PLATFORM_OK?= yes
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1092 . endif # MACHINE_PLATFORM
1093 . endfor # __tmp__
1094 . else # !ONLY_FOR_PLATFORM
1095 __PLATFORM_OK?= yes
1096 . endif # ONLY_FOR_PLATFORM
1097 . for __tmp__ in ${NOT_FOR_PLATFORM}
1098 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
1099 . undef __PLATFORM_OK
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1100 . endif # MACHINE_PLATFORM
1101 . endfor # __tmp__
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1102 . if !defined(__PLATFORM_OK)
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
1103 PKG_SKIP_REASON+= "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1104 . endif # !__PLATFORM_OK
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1105
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1106 #
1107 # Now print some error messages that we know we should ignore the pkg
1108 #
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1109 . if defined(PKG_FAIL_REASON) || defined(PKG_SKIP_REASON)
ef1e4cb do not check for ACCEPTABLE_LICENCES when deinstalling. closes PR pk…
assar authored
1110 fetch checksum extract patch configure all build install package \
2aede62 Do not attempt to update a package (deleting the package and all its
rh authored
1111 update install-depends:
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
1112 . if defined(SKIP_SILENT)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1113 @${DO_NADA}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1114 . else
9d9ab7e Whitespace police - no functional change
agc authored
1115 @for str in ${PKG_FAIL_REASON} ${PKG_SKIP_REASON}; do \
1116 ${ECHO} "${_PKGSRC_IN}> $$str"; \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1117 done
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1118 . endif
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1119 . if defined(PKG_FAIL_REASON)
1120 @${FALSE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1121 . endif
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
1122 . endif # SKIP
1123 .endif # !NO_SKIP
b0811b3 Re-move .if!defined(__ARCH_OK) to fix use of NO_IGNORE; document some…
hubertf authored
1124
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1125 # Add these defs to the ones dumped into +BUILD_DEFS
880a45c * Make sure PKGPATH gets added to BUILD_DEFS (I thought it was there…
hubertf authored
1126 BUILD_DEFS+= PKGPATH
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1127 BUILD_DEFS+= OPSYS OS_VERSION MACHINE_ARCH MACHINE_GNU_ARCH
e3afa10 make sure FFLAGS ends up in MAKE_ENV as well as BUILD_DEFS. This all…
dmcmahill authored
1128 BUILD_DEFS+= CPPFLAGS CFLAGS FFLAGS LDFLAGS
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1129 BUILD_DEFS+= CONFIGURE_ENV CONFIGURE_ARGS
d4d3dcb Add 'RESTRICTED' to ${BUILD_DEFS}, so that any restrictions are recorded
fredb authored
1130 BUILD_DEFS+= OBJECT_FMT LICENSE RESTRICTED
866552e * Replace MIRROR_DISTFILES with NO_SRC_ON_FTP
hubertf authored
1131 BUILD_DEFS+= NO_SRC_ON_FTP NO_SRC_ON_CDROM
1132 BUILD_DEFS+= NO_BIN_ON_FTP NO_BIN_ON_CDROM
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1133
f38c8ae add OSVERSION_SPECIFIC to BUILD_DEFS if defined so it ends up in the …
dmcmahill authored
1134 .if defined(OSVERSION_SPECIFIC)
1135 BUILD_DEFS+= OSVERSION_SPECIFIC
1136 .endif # OSVERSION_SPECIFIC
1137
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
1138 .PHONY: all
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1139 .if !target(all)
3bfda94 Due to the special handling of pkgtools/digest in pkgsrc (it must be
jlam authored