head	1.2;
access;
symbols
	pkgsrc-2013Q2:1.2.0.50
	pkgsrc-2013Q2-base:1.2
	pkgsrc-2012Q4:1.2.0.48
	pkgsrc-2012Q4-base:1.2
	pkgsrc-2011Q4:1.2.0.46
	pkgsrc-2011Q4-base:1.2
	pkgsrc-2011Q2:1.2.0.44
	pkgsrc-2011Q2-base:1.2
	pkgsrc-2009Q4:1.2.0.42
	pkgsrc-2009Q4-base:1.2
	pkgsrc-2008Q4:1.2.0.40
	pkgsrc-2008Q4-base:1.2
	pkgsrc-2008Q3:1.2.0.38
	pkgsrc-2008Q3-base:1.2
	cube-native-xorg:1.2.0.36
	cube-native-xorg-base:1.2
	pkgsrc-2008Q2:1.2.0.34
	pkgsrc-2008Q2-base:1.2
	pkgsrc-2008Q1:1.2.0.32
	pkgsrc-2008Q1-base:1.2
	pkgsrc-2007Q4:1.2.0.30
	pkgsrc-2007Q4-base:1.2
	pkgsrc-2007Q3:1.2.0.28
	pkgsrc-2007Q3-base:1.2
	pkgsrc-2007Q2:1.2.0.26
	pkgsrc-2007Q2-base:1.2
	pkgsrc-2007Q1:1.2.0.24
	pkgsrc-2007Q1-base:1.2
	jlam-pkgviews:1.2.0.22
	jlam-pkgviews-base:1.2
	pkgsrc-2006Q4:1.2.0.20
	pkgsrc-2006Q4-base:1.2
	pkgsrc-2006Q3:1.2.0.18
	pkgsrc-2006Q3-base:1.2
	pkgsrc-2006Q2:1.2.0.16
	pkgsrc-2006Q2-base:1.2
	pkgsrc-2006Q1:1.2.0.14
	pkgsrc-2006Q1-base:1.2
	pkgsrc-2005Q4:1.2.0.12
	pkgsrc-2005Q4-base:1.2
	pkgsrc-2005Q3:1.2.0.10
	pkgsrc-2005Q3-base:1.2
	pkgsrc-2005Q2:1.2.0.8
	pkgsrc-2005Q2-base:1.2
	pkgsrc-2005Q1:1.2.0.6
	pkgsrc-2005Q1-base:1.2
	pkgsrc-2004Q4:1.2.0.4
	pkgsrc-2004Q4-base:1.2
	pkgsrc-2004Q3:1.2.0.2
	pkgsrc-2004Q3-base:1.2;
locks; strict;
comment	@# @;


1.2
date	2004.09.10.19.51.51;	author jlam;	state dead;
branches;
next	1.1;

1.1
date	2004.08.16.03.12.02;	author tv;	state Exp;
branches;
next	;


desc
@@


1.2
log
@* Do the *.la expansion within the current _PLIST_AWK_SCRIPT framework.
  We no longer require that LIBTOOL_LA_FILES be defined in the package
  Makefile, and the libtool archives should once again be listed in the
  PLIST.

* Add a new yes/no variable "LIBTOOLIZE_PLIST" to control whether to
  have bsd.pkg.mk automatically expand *.la files in PLISTs into the
  true library names represented by the libtool archives.

* Rename the "transform-la" script to "print-la-libnames" which more
  correctly reflects its function.

Many thanks to Todd Vierling for the original implementation and for
his contructive comments on how to improve the changes in this commit.
@
text
@#!/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
@


1.1
log
@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.
@
text
@@

