pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/plist Create a new variable IGNORE_LIBTOOLIZE conta...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/704aa5cbcbf5
branches:  trunk
changeset: 510844:704aa5cbcbf5
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Apr 05 05:54:01 2006 +0000

description:
Create a new variable IGNORE_LIBTOOLIZE containing files which should
not be expanded by the plist module.

diffstat:

 mk/plist/plist-libtool.awk |  12 ++++++++++--
 mk/plist/plist.mk          |   3 ++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diffs (56 lines):

diff -r e2efb4f23868 -r 704aa5cbcbf5 mk/plist/plist-libtool.awk
--- a/mk/plist/plist-libtool.awk        Wed Apr 05 02:29:14 2006 +0000
+++ b/mk/plist/plist-libtool.awk        Wed Apr 05 05:54:01 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: plist-libtool.awk,v 1.2 2006/02/07 18:42:38 jlam Exp $
+# $NetBSD: plist-libtool.awk,v 1.3 2006/04/05 05:54:01 jlam Exp $
 #
 # Copyright (c) 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,6 +41,9 @@
 ###
 ### Certain environment variables must be set prior to running this script:
 ###
+### IGNORE_LIBTOOLIZE is a whitespace-separated list of ${PREFIX}-relative
+###    paths to *.la files that should not be expanded.
+###
 ### LIBTOOL_EXPAND is the path to the script that prints out the
 ###    actual library files associated with a libtool archive file.
 ###
@@ -58,13 +61,18 @@
        LIBTOOLIZE_PLIST = ENVIRON["LIBTOOLIZE_PLIST"] ? ENVIRON["LIBTOOLIZE_PLIST"] : "yes"
        PREFIX = ENVIRON["PREFIX"] ? ENVIRON["PREFIX"] : "/usr/pkg"
        TEST = ENVIRON["TEST"] ? ENVIRON["TEST"] : "test"
+
+       IGNORE_LA_REGEXP = ENVIRON["IGNORE_LIBTOOLIZE"] ? ENVIRON["IGNORE_LIBTOOLIZE"] : ""
+       gsub("  *", "|", IGNORE_LA_REGEXP)
+        IGNORE_LA_REGEXP = "(" IGNORE_LA_REGEXP ")"
 }
 
 ###
 ### Expand libtool archives into the list of corresponding shared and/or
 ### static libraries.
 ###
-(LIBTOOLIZE_PLIST ~ /[yY][eE][sS]/) && /^[^@].*\.la$/ {
+(LIBTOOLIZE_PLIST ~ /[yY][eE][sS]/) && \
+/^[^@]/ && ($0 !~ "^" IGNORE_LA_REGEXP "$") && /\.la$/ {
        print_entry($0)
        cmd = TEST " -f " PREFIX "/" $0
        if (system(cmd) == 0) {
diff -r e2efb4f23868 -r 704aa5cbcbf5 mk/plist/plist.mk
--- a/mk/plist/plist.mk Wed Apr 05 02:29:14 2006 +0000
+++ b/mk/plist/plist.mk Wed Apr 05 05:54:01 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.7 2006/03/20 01:48:58 jlam Exp $
+# $NetBSD: plist.mk,v 1.8 2006/04/05 05:54:01 jlam Exp $
 #
 # This Makefile fragment handles the creation of PLISTs for use by
 # pkg_create(8).
@@ -93,6 +93,7 @@
 _PLIST_AWK_ENV+=       IMAKE_MANINSTALL=${_IMAKE_MANINSTALL:Q}
 _PLIST_AWK_ENV+=       IGNORE_INFO_PATH=${_IGNORE_INFO_PATH:Q}
 _PLIST_AWK_ENV+=       PKGINFODIR=${PKGINFODIR:Q}
+_PLIST_AWK_ENV+=       IGNORE_LIBTOOLIZE=${IGNORE_LIBTOOLIZE:Q}
 _PLIST_AWK_ENV+=       LIBTOOLIZE_PLIST=${LIBTOOLIZE_PLIST:Q}
 _PLIST_AWK_ENV+=       LIBTOOL_EXPAND=${_LIBTOOL_EXPAND:Q}
 _PLIST_AWK_ENV+=       LS=${TOOLS_LS:Q}



Home | Main Index | Thread Index | Old Index