pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/buildlink2 Remove libraries from the output if they...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5db8584f4e2c
branches:  trunk
changeset: 465436:5db8584f4e2c
user:      gavan <gavan%pkgsrc.org@localhost>
date:      Tue Dec 30 12:09:27 2003 +0000

description:
Remove libraries from the output if they don't exist.

ok'd by grant.

diffstat:

 mk/buildlink2/fake-la |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 34775fa22ac1 -r 5db8584f4e2c mk/buildlink2/fake-la
--- a/mk/buildlink2/fake-la     Tue Dec 30 05:29:45 2003 +0000
+++ b/mk/buildlink2/fake-la     Tue Dec 30 12:09:27 2003 +0000
@@ -1,6 +1,6 @@
 #!@BUILDLINK_SHELL@
 #
-# $NetBSD: fake-la,v 1.8 2003/12/08 13:38:19 salo Exp $
+# $NetBSD: fake-la,v 1.9 2003/12/30 12:09:27 gavan Exp $
 
 AR="@AR@"
 AWK="@AWK@"
@@ -92,4 +92,17 @@
        @RESET_LD_SO_CACHE@ >/dev/null 2>&1
 
 fi
-${SED} -e "s,$tmpdir/inst,$realdir,g" $tmpdir/inst/$libbase.la
+
+dlname=`${SED} -n -e"/^dlname='/{ s/^dlname='//; s/'$//; p; };" "$tmpdir/inst/$libbase.la"`
+library_names=`${SED} -n -e"/^library_names='/{ s/^library_names='//; s/'$//; p; };" "$tmpdir/inst/$libbase.la"`
+old_library=`${SED} -n -e"/^old_library='/{ s/^old_library='//; s/'$//; p; };" "$tmpdir/inst/$libbase.la"`
+
+for file in $dlname $library_names $old_library
+do
+       if ! [ -e $realdir/$file ]
+       then
+               removal_pattern="$removal_pattern -e s,$file\([^.0-9]\),\1,g"
+       fi
+done
+
+${SED} -e "s,$tmpdir/inst,$realdir,g" $removal_pattern $tmpdir/inst/$libbase.la



Home | Main Index | Thread Index | Old Index