pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/plist Only do the locale transformation if USE_PKGL...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/60f9daba49a0
branches:  trunk
changeset: 511550:60f9daba49a0
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Apr 17 06:30:48 2006 +0000

description:
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:

 mk/plist/plist-locale.awk |  8 +++++++-
 mk/plist/plist.mk         |  3 ++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r e6870278fa13 -r 60f9daba49a0 mk/plist/plist-locale.awk
--- a/mk/plist/plist-locale.awk Mon Apr 17 06:12:46 2006 +0000
+++ b/mk/plist/plist-locale.awk Mon Apr 17 06:30:48 2006 +0000
@@ -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 -r e6870278fa13 -r 60f9daba49a0 mk/plist/plist.mk
--- a/mk/plist/plist.mk Mon Apr 17 06:12:46 2006 +0000
+++ b/mk/plist/plist.mk Mon Apr 17 06:30:48 2006 +0000
@@ -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 @@
 # 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}



Home | Main Index | Thread Index | Old Index