summaryrefslogtreecommitdiff
path: root/mk/scripts
diff options
context:
space:
mode:
authortv <tv>2004-08-16 03:12:02 +0000
committertv <tv>2004-08-16 03:12:02 +0000
commit91357ed65a6b513abc2a288849d508353a1c4f40 (patch)
treed3ef27c84757240e297925eded8d32835bd5e1b2 /mk/scripts
parentc2b4a62461f19fb72003f02b654050a91983b422 (diff)
downloadpkgsrc-91357ed65a6b513abc2a288849d508353a1c4f40.tar.gz
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 (limited to 'mk/scripts')
-rwxr-xr-xmk/scripts/transform-la59
1 files changed, 59 insertions, 0 deletions
diff --git a/mk/scripts/transform-la b/mk/scripts/transform-la
new file mode 100755
index 00000000000..1248bd3624c
--- /dev/null
+++ b/mk/scripts/transform-la
@@ -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