summaryrefslogtreecommitdiff
path: root/mk/plist/plist-locale.awk
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/plist/plist-locale.awk
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/plist/plist-locale.awk')
-rw-r--r--mk/plist/plist-locale.awk8
1 files changed, 7 insertions, 1 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)
}