Modify mk/plist/plist-gnu.mk to convert gnu/man to ${PKGGNUDIR}${PKGMANDIR}. Also modify mk/install/install.mk to make the conversion when using AUTO_MKDIRS.diff -r1.65 -r1.66 pkgsrc/mk/install/install.mk
(sbd)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: install.mk,v 1.65 2012/12/06 11:36:31 jperkin Exp $ | 1 | # $NetBSD: install.mk,v 1.66 2013/01/05 07:32:49 sbd Exp $ | |
2 | # | 2 | # | |
3 | # This file provides the code for the "install" phase. | 3 | # This file provides the code for the "install" phase. | |
4 | # | 4 | # | |
5 | # Public targets: | 5 | # Public targets: | |
6 | # | 6 | # | |
7 | # stage-install: | 7 | # stage-install: | |
8 | # Installs the package files into LOCALBASE or ${DESTDIR}${LOCALBASE}. | 8 | # Installs the package files into LOCALBASE or ${DESTDIR}${LOCALBASE}. | |
9 | # | 9 | # | |
10 | 10 | |||
11 | # Interface for other infrastructure components: | 11 | # Interface for other infrastructure components: | |
12 | # | 12 | # | |
13 | # Hooks for use by the infrastructure: | 13 | # Hooks for use by the infrastructure: | |
14 | # | 14 | # | |
@@ -283,26 +283,27 @@ install-makedirs: | @@ -283,26 +283,27 @@ install-makedirs: | |||
283 | # PLIST files of the package, to make the declaration of | 283 | # PLIST files of the package, to make the declaration of | |
284 | # INSTALLATION_DIRS redundant in some cases. | 284 | # INSTALLATION_DIRS redundant in some cases. | |
285 | # | 285 | # | |
286 | # To enable this, the variable INSTALLATION_DIRS_FROM_PLIST must be set | 286 | # To enable this, the variable INSTALLATION_DIRS_FROM_PLIST must be set | |
287 | # to "yes". | 287 | # to "yes". | |
288 | # | 288 | # | |
289 | .PHONY: install-dirs-from-PLIST | 289 | .PHONY: install-dirs-from-PLIST | |
290 | install-dirs-from-PLIST: | 290 | install-dirs-from-PLIST: | |
291 | @${STEP_MSG} "Creating installation directories from PLIST files" | 291 | @${STEP_MSG} "Creating installation directories from PLIST files" | |
292 | ${RUN} \ | 292 | ${RUN} \ | |
293 | ${CAT} ${PLIST_SRC} \ | 293 | ${CAT} ${PLIST_SRC} \ | |
294 | | sed -n \ | 294 | | sed -n \ | |
295 | -e 's,\\,\\\\,' \ | 295 | -e 's,\\,\\\\,' \ | |
296 | -e 's,^gnu/man/,${PKGGNUDIR}${PKGMANDIR}/,' \ | |||
296 | -e 's,^gnu/,${PKGGNUDIR},' \ | 297 | -e 's,^gnu/,${PKGGNUDIR},' \ | |
297 | -e 's,^man/,${PKGMANDIR}/,' \ | 298 | -e 's,^man/,${PKGMANDIR}/,' \ | |
298 | -e 's,^info/,${PKGINFODIR}/,' \ | 299 | -e 's,^info/,${PKGINFODIR}/,' \ | |
299 | -e 's,^share/locale/,${PKGLOCALEDIR}/locale/,' \ | 300 | -e 's,^share/locale/,${PKGLOCALEDIR}/locale/,' \ | |
300 | -e 's,^\([^$$@]*\)/[^/]*$$,\1,p' \ | 301 | -e 's,^\([^$$@]*\)/[^/]*$$,\1,p' \ | |
301 | | while read dir; do \ | 302 | | while read dir; do \ | |
302 | ${_INSTALL_ONE_DIR_CMD}; \ | 303 | ${_INSTALL_ONE_DIR_CMD}; \ | |
303 | done | 304 | done | |
304 | 305 | |||
305 | ###################################################################### | 306 | ###################################################################### | |
306 | ### pre-install, do-install, post-install (PUBLIC, override) | 307 | ### pre-install, do-install, post-install (PUBLIC, override) | |
307 | ###################################################################### | 308 | ###################################################################### | |
308 | ### {pre,do,post}-install are the heart of the package-customizable | 309 | ### {pre,do,post}-install are the heart of the package-customizable |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: plist-gnu.awk,v 1.1 2012/12/06 11:36:31 jperkin Exp $ | 1 | # $NetBSD: plist-gnu.awk,v 1.2 2013/01/05 07:32:50 sbd Exp $ | |
2 | # | 2 | # | |
3 | # Copyright (c) 2012 The NetBSD Foundation, Inc. | 3 | # Copyright (c) 2012 The NetBSD Foundation, Inc. | |
4 | # All rights reserved. | 4 | # All rights reserved. | |
5 | # | 5 | # | |
6 | # This code is derived from software contributed to The NetBSD Foundation | 6 | # This code is derived from software contributed to The NetBSD Foundation | |
7 | # by Jonathan Perkin | 7 | # by Jonathan Perkin | |
8 | # | 8 | # | |
9 | # Redistribution and use in source and binary forms, with or without | 9 | # Redistribution and use in source and binary forms, with or without | |
10 | # modification, are permitted provided that the following conditions | 10 | # modification, are permitted provided that the following conditions | |
11 | # are met: | 11 | # are met: | |
12 | # 1. Redistributions of source code must retain the above copyright | 12 | # 1. Redistributions of source code must retain the above copyright | |
13 | # notice, this list of conditions and the following disclaimer. | 13 | # notice, this list of conditions and the following disclaimer. | |
14 | # 2. Redistributions in binary form must reproduce the above copyright | 14 | # 2. Redistributions in binary form must reproduce the above copyright | |
@@ -25,26 +25,35 @@ | @@ -25,26 +25,35 @@ | |||
25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
28 | # POSSIBILITY OF SUCH DAMAGE. | 28 | # POSSIBILITY OF SUCH DAMAGE. | |
29 | 29 | |||
30 | ### This awk script handles gnu entries in PLISTs. This script | 30 | ### This awk script handles gnu entries in PLISTs. This script | |
31 | ### requires the following scripts to be included: | 31 | ### requires the following scripts to be included: | |
32 | ### | 32 | ### | |
33 | ### plist-functions.awk (print_entry) | 33 | ### plist-functions.awk (print_entry) | |
34 | ### | 34 | ### | |
35 | ### Certain environment variables must be set prior to running this script: | 35 | ### Certain environment variables must be set prior to running this script: | |
36 | ### | 36 | ### | |
37 | ### PKGGNUDIR is the ${PREFIX}-relative path to the installed GNU files. | 37 | ### PKGGNUDIR is the ${PREFIX}-relative path to the installed GNU files. | |
38 | ### PKGMANDIR is the ${PKGGNUDIR}-relative path to the install GNU manpages. | |||
38 | ### | 39 | ### | |
39 | BEGIN { | 40 | BEGIN { | |
40 | # PKGGNUDIR is allowed to be empty so we do not provide a default. | 41 | # PKGGNUDIR is allowed to be empty so we do not provide a default. | |
41 | PKGGNUDIR = ENVIRON["PKGGNUDIR"] | 42 | PKGGNUDIR = ENVIRON["PKGGNUDIR"] | |
43 | PKGMANDIR = ENVIRON["PKGMANDIR"] ? ENVIRON["PKGMANDIR"] : "man" | |||
42 | } | 44 | } | |
43 | 45 | |||
44 | ### | 46 | ### | |
47 | ### Convert gnu/man to ${PKGGNUDIR}${PKGMANDIR} for all GNU manpages. | |||
48 | ### | |||
49 | /^[^@]/ && \ | |||
50 | /^gnu\/man\// { | |||
51 | sub("^gnu/man", PKGGNUDIR PKGMANDIR) | |||
52 | } | |||
53 | ### | |||
45 | ### Convert gnu/ to ${PKGGNUDIR} for all GNU file entries. | 54 | ### Convert gnu/ to ${PKGGNUDIR} for all GNU file entries. | |
46 | ### | 55 | ### | |
47 | /^[^@]/ && \ | 56 | /^[^@]/ && \ | |
48 | /^gnu\// { | 57 | /^gnu\// { | |
49 | sub("^gnu/", PKGGNUDIR) | 58 | sub("^gnu/", PKGGNUDIR) | |
50 | } | 59 | } |