pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Add new variable LIBTOOL_LA_FILES, which may be use...
details: https://anonhg.NetBSD.org/pkgsrc/rev/24dc8acc7c4a
branches: trunk
changeset: 479512:24dc8acc7c4a
user: tv <tv%pkgsrc.org@localhost>
date: Mon Aug 16 03:12:02 2004 +0000
description:
Add new variable LIBTOOL_LA_FILES, which may be used instead of listing
all of the .a, .la, .so, and .so.* files in the PLIST. This will
autogenerate the PLIST entries based on the informaion in the .la file.
This include print-PLIST support; if LIBTOOL_LA_FILES contains an
installed .la, its entries will be elided from the output PLIST template.
diffstat:
mk/bsd.pkg.mk | 8 +++++-
mk/scripts/transform-la | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 1 deletions(-)
diffs (92 lines):
diff -r 05162119ba52 -r 24dc8acc7c4a mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Mon Aug 16 02:47:49 2004 +0000
+++ b/mk/bsd.pkg.mk Mon Aug 16 03:12:02 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1489 2004/08/16 01:56:03 schmonz Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1490 2004/08/16 03:12:02 tv Exp $
#
# This file is in the public domain.
#
@@ -407,6 +407,11 @@
CONFIGURE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
LIBTOOL_OVERRIDE?= libtool */libtool */*/libtool
+.if defined(LIBTOOL_LA_FILES)
+GENERATE_PLIST+= ${SH} ../../mk/scripts/transform-la ${PREFIX} ${LIBTOOL_LA_FILES};
+_FILTER_LIBTOOL_LA_FILES= | ${GREP} -vxF \
+ `${SH} ../../mk/scripts/transform-la ${PREFIX} ${LIBTOOL_LA_FILES} | ${SED} -e 's,^,-e ,'`
+.endif
.endif
.if defined(BUILD_USES_MSGFMT) && \
@@ -4495,6 +4500,7 @@
*) genlinks=0 ;; \
esac; \
${FIND} ${PREFIX}/. -xdev -newer ${EXTRACT_COOKIE} \! -type d -print\
+ ${_FILTER_LIBTOOL_LA_FILES} \
| ${SORT} \
| ${AWK} ' \
{ sub("${PREFIX}/\\./", ""); } \
diff -r 05162119ba52 -r 24dc8acc7c4a mk/scripts/transform-la
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/scripts/transform-la Mon Aug 16 03:12:02 2004 +0000
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# Copyright (c) 2004 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Todd Vierling.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed by the NetBSD
+# Foundation, Inc. and its contributors.
+# 4. Neither the name of The NetBSD Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+PREFIX="$1"; shift
+
+for la in $*; do
+ basedir=$(dirname $la)
+ library_names=
+ old_library=
+
+ # the .la file is itself a Bourne-compatible script
+ . $PREFIX/$la || {
+ echo "$0: cannot read libtool archive $PREFIX/$la" >&2; exit 1
+ }
+
+ # catch where libtool's install wrapper was not properly used
+ if [ "$installed" = "no" ]; then
+ echo "$0: library $PREFIX/$la was not properly installed" >&2; exit 1
+ fi
+
+ echo "$la"
+ for lib in $library_names $old_library; do
+ echo "$basedir/$lib"
+ done
+done
Home |
Main Index |
Thread Index |
Old Index