summaryrefslogtreecommitdiff
path: root/mk/install
diff options
context:
space:
mode:
authorjperkin <jperkin>2012-12-06 11:36:30 +0000
committerjperkin <jperkin>2012-12-06 11:36:30 +0000
commit8f700afa302e02d9ba9b8680de99b903e2a9ea60 (patch)
tree84f766bb8b9cbffe0b57fcfa317b3e88d3d29f7f /mk/install
parent9d33eae41ea88b933bf4b8886c642fe24e17a260 (diff)
downloadpkgsrc-8f700afa302e02d9ba9b8680de99b903e2a9ea60.tar.gz
Introduce PKGGNUDIR as a way to control gnu prefix.
By default pkgsrc uses LOCABASE/gnu as a prefix for packages to install native versions of GNU tools, which are them symbolically linked back to the 'g' versions of the files in LOCALBASE, and users can then add LOCALBASE/gnu/bin to PATH to pick up those tools. On systems where the GNU environment is desired, PKGGNUDIR now allows users to install the non-'g' files directly into LOCALBASE, making them the default without having to alter PATH, whilst retaining the 'g' files in order to ensure dependencies and tool paths remain the same.
Diffstat (limited to 'mk/install')
-rw-r--r--mk/install/install.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/mk/install/install.mk b/mk/install/install.mk
index f41cff58d0b..1894657dc5a 100644
--- a/mk/install/install.mk
+++ b/mk/install/install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.64 2012/07/28 21:33:48 reed Exp $
+# $NetBSD: install.mk,v 1.65 2012/12/06 11:36:31 jperkin Exp $
#
# This file provides the code for the "install" phase.
#
@@ -39,8 +39,9 @@
# INSTALLATION_DIRS
# A list of directories that should be created at the very
# beginning of the install phase. These directories are relative
-# to ${PREFIX}. As a convenience, a leading man/ is transformed
-# to ${PKGMANDIR}, to save package authors from typing too much.
+# to ${PREFIX}. As a convenience, a leading gnu/ is transformed
+# to ${PKGGNUDIR} and a leading man/ is transformed to
+# ${PKGMANDIR}, to save package authors from typing too much.
#
# AUTO_MKDIRS
# INSTALLATION_DIRS_FROM_PLIST
@@ -268,7 +269,7 @@ install-makedirs:
.if defined(INSTALLATION_DIRS) && !empty(INSTALLATION_DIRS)
@${STEP_MSG} "Creating installation directories"
${RUN} \
- for dir in ${INSTALLATION_DIRS:C,^man/,${PKGMANDIR}/,}; do \
+ for dir in ${INSTALLATION_DIRS:C,^gnu/,${PKGGNUDIR},:C,^man/,${PKGMANDIR}/,}; do \
case "$$dir" in \
${PREFIX}/*) \
dir=`${ECHO} "$$dir" | ${SED} "s|^${PREFIX}/||"` ;; \
@@ -292,6 +293,7 @@ install-dirs-from-PLIST:
${CAT} ${PLIST_SRC} \
| sed -n \
-e 's,\\,\\\\,' \
+ -e 's,^gnu/,${PKGGNUDIR},' \
-e 's,^man/,${PKGMANDIR}/,' \
-e 's,^info/,${PKGINFODIR}/,' \
-e 's,^share/locale/,${PKGLOCALEDIR}/locale/,' \