summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-04-17 06:30:48 +0000
committerjlam <jlam>2006-04-17 06:30:48 +0000
commitf73a3a6bda32f5cd530045dde4f3f214f20c8d2c (patch)
tree0ab63f77fd3bf03aee27f39d70a606842eb8828c /mk
parent8ee2e1f796584afc295d72c88c32ee55ab41bbd3 (diff)
downloadpkgsrc-f73a3a6bda32f5cd530045dde4f3f214f20c8d2c.tar.gz
Only do the locale transformation if USE_PKGLOCALEDIR is defined. This
avoids any problems with current packages that install locale files but don't honor PKGLOCALEDIR yet.
Diffstat (limited to 'mk')
-rw-r--r--mk/plist/plist-locale.awk8
-rw-r--r--mk/plist/plist.mk3
2 files changed, 9 insertions, 2 deletions
diff --git a/mk/plist/plist-locale.awk b/mk/plist/plist-locale.awk
index 0cd95f87a1b..ec914ecb718 100644
--- a/mk/plist/plist-locale.awk
+++ b/mk/plist/plist-locale.awk
@@ -1,4 +1,4 @@
-# $NetBSD: plist-locale.awk,v 1.1 2006/04/17 06:12:46 jlam Exp $
+# $NetBSD: plist-locale.awk,v 1.2 2006/04/17 06:30:48 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -41,16 +41,22 @@
### PKGLOCALEDIR is the ${PREFIX}-relative path to the "locale" directory
### under which all locale files are installed.
###
+### USE_PKGLOCALEDIR is a yes/no variable indicating whether to convert
+### "share/locale" to be under ${PKGLOCALEDIR}.
+###
BEGIN {
PKGLOCALEDIR = ENVIRON["PKGLOCALEDIR"] ? ENVIRON["PKGLOCALEDIR"] : "share"
+ USE_PKGLOCALEDIR = ENVIRON["USE_PKGLOCALEDIR"] ? ENVIRON["USE_PKGLOCALEDIR"] : "no"
}
###
### Convert share/locale to ${PKGLOCALEDIR}/locale for all locale entries.
###
+(USE_PKGLOCALEDIR ~ /[yY][eE][sS]/) && \
/^share\/locale\// {
sub("^share", PKGLOCALEDIR)
}
+(USE_PKGLOCALEDIR ~ /[yY][eE][sS]/) && \
/^@dirrm share\/locale\// {
sub("^@dirrm share", "@dirrm " PKGLOCALEDIR)
}
diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk
index 2e91a5b501d..c7c7b757da6 100644
--- a/mk/plist/plist.mk
+++ b/mk/plist/plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.10 2006/04/17 06:12:46 jlam Exp $
+# $NetBSD: plist.mk,v 1.11 2006/04/17 06:30:48 jlam Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -91,6 +91,7 @@ MAKEVARS+= _IGNORE_INFO_PATH
# scripts for information on each of the variable set in the environment.
#
_PLIST_AWK_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR:Q}
+_PLIST_AWK_ENV+= USE_PKGLOCALEDIR=${USE_PKGLOCALEDIR:Dyes:Uno}
_PLIST_AWK_ENV+= IMAKE_MANINSTALL=${_IMAKE_MANINSTALL:Q}
_PLIST_AWK_ENV+= IGNORE_INFO_PATH=${_IGNORE_INFO_PATH:Q}
_PLIST_AWK_ENV+= PKGINFODIR=${PKGINFODIR:Q}