Make it more explicit that PKG_DESTDIR_SUPPORT and as side effect META_PACKAGE must be set before including bsd.prefs.mk.diff -r1.284 -r1.285 pkgsrc/mk/bsd.prefs.mk
(joerg)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.prefs.mk,v 1.284 2008/06/12 01:09:02 joerg Exp $ | 1 | # $NetBSD: bsd.prefs.mk,v 1.285 2008/06/16 15:10:48 joerg 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. | |
@@ -348,26 +348,29 @@ SHAREMODE?= ${DOCMODE} | @@ -348,26 +348,29 @@ SHAREMODE?= ${DOCMODE} | |||
348 | .if exists(${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk) | 348 | .if exists(${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk) | |
349 | . include "${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk" | 349 | . include "${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk" | |
350 | .else | 350 | .else | |
351 | . include "${_PKGSRC_TOPDIR}/mk/platform/NetBSD.mk" | 351 | . include "${_PKGSRC_TOPDIR}/mk/platform/NetBSD.mk" | |
352 | PKG_FAIL_REASON+= "missing mk/platform/${OPSYS}.mk" | 352 | PKG_FAIL_REASON+= "missing mk/platform/${OPSYS}.mk" | |
353 | .endif | 353 | .endif | |
354 | 354 | |||
355 | PKGDIRMODE?= 755 | 355 | PKGDIRMODE?= 755 | |
356 | 356 | |||
357 | # A meta-package is a package that does not have any files and whose | 357 | # A meta-package is a package that does not have any files and whose | |
358 | # only purpose is to depend on other packages, giving that collection | 358 | # only purpose is to depend on other packages, giving that collection | |
359 | # a simple name. | 359 | # a simple name. | |
360 | # | 360 | # | |
361 | # This variable must be set before including bsd.prefs.mk directly or | |||
362 | # indirectly. | |||
363 | # | |||
361 | # Keywords: meta meta-package META_PACKAGE | 364 | # Keywords: meta meta-package META_PACKAGE | |
362 | # | 365 | # | |
363 | .if defined(META_PACKAGE) | 366 | .if defined(META_PACKAGE) | |
364 | PKG_DESTDIR_SUPPORT= user-destdir | 367 | PKG_DESTDIR_SUPPORT= user-destdir | |
365 | NO_CONFIGURE= yes | 368 | NO_CONFIGURE= yes | |
366 | NO_BUILD= yes | 369 | NO_BUILD= yes | |
367 | DISTFILES= # none | 370 | DISTFILES= # none | |
368 | PLIST_SRC= # none | 371 | PLIST_SRC= # none | |
369 | do-patch: | 372 | do-patch: | |
370 | @${DO_NADA} | 373 | @${DO_NADA} | |
371 | do-install: | 374 | do-install: | |
372 | @${DO_NADA} | 375 | @${DO_NADA} | |
373 | .endif | 376 | .endif |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: destdir.help,v 1.1 2008/01/19 22:41:47 rillig Exp $ | 1 | # $NetBSD: destdir.help,v 1.2 2008/06/16 15:10:48 joerg Exp $ | |
2 | # | 2 | # | |
3 | # === | 3 | # === | |
4 | # Warning: This file is still under construction. Don't rely on it. | 4 | # Warning: This file is still under construction. Don't rely on it. | |
5 | # === | 5 | # === | |
6 | # | 6 | # | |
7 | # This file documents the variables around the DESTDIR support. | 7 | # This file documents the variables around the DESTDIR support. | |
8 | # | 8 | # | |
9 | # Normally, packages are installed directly into LOCALBASE and may | 9 | # Normally, packages are installed directly into LOCALBASE and may | |
10 | # overwrite files of other packages there. It also makes it easy to | 10 | # overwrite files of other packages there. It also makes it easy to | |
11 | # create packages which behave differently depending on whether they | 11 | # create packages which behave differently depending on whether they | |
12 | # are installed from source or from a binary package. This is not good. | 12 | # are installed from source or from a binary package. This is not good. | |
13 | # | 13 | # | |
14 | # The DESTDIR support tries to prevent some of these problems. When it | 14 | # The DESTDIR support tries to prevent some of these problems. When it | |
@@ -27,21 +27,24 @@ | @@ -27,21 +27,24 @@ | |||
27 | # This is not supported for actual installation yet, due to | 27 | # This is not supported for actual installation yet, due to | |
28 | # short comings of pkg_create. [FIXME] | 28 | # short comings of pkg_create. [FIXME] | |
29 | # | 29 | # | |
30 | # === Package-settable variables === | 30 | # === Package-settable variables === | |
31 | # | 31 | # | |
32 | # PKG_DESTDIR_SUPPORT | 32 | # PKG_DESTDIR_SUPPORT | |
33 | # * "user-destdir" means that all files of the packages should be | 33 | # * "user-destdir" means that all files of the packages should be | |
34 | # installed with default ownership and permissions. | 34 | # installed with default ownership and permissions. | |
35 | # | 35 | # | |
36 | # * "destdir" means that some of the installed files need special | 36 | # * "destdir" means that some of the installed files need special | |
37 | # ownership or permissions. The installation is done by the | 37 | # ownership or permissions. The installation is done by the | |
38 | # privileged user. | 38 | # privileged user. | |
39 | # | 39 | # | |
40 | # This variable must be set before including bsd.prefs.mk directly or | |||
41 | # indirectly. | |||
42 | # | |||
40 | # === Implementation notes === | 43 | # === Implementation notes === | |
41 | # | 44 | # | |
42 | # In the "install" phase, the variable DESTDIR is set in the make(1) | 45 | # In the "install" phase, the variable DESTDIR is set in the make(1) | |
43 | # environment of the default "do-install" target. Additionally, the | 46 | # environment of the default "do-install" target. Additionally, the | |
44 | # variable is passed in the INSTALL_MAKE_FLAGS to override potential | 47 | # variable is passed in the INSTALL_MAKE_FLAGS to override potential | |
45 | # "DESTDIR=" entries in the Makefiles. | 48 | # "DESTDIR=" entries in the Makefiles. | |
46 | # | 49 | # | |
47 | # Keywords: destdir | 50 | # Keywords: destdir |