summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskrll <skrll@pkgsrc.org>2001-03-23 17:11:17 +0000
committerskrll <skrll@pkgsrc.org>2001-03-23 17:11:17 +0000
commit2cc8a1834e8088fd286fe795edc7635a1c7bdbed (patch)
treed776ea623090c3078b4ae33d2a59f91cc80b7fed
parent4416c570ede52633011f83a7fa19b43d8713d02c (diff)
downloadpkgsrc-2cc8a1834e8088fd286fe795edc7635a1c7bdbed.tar.gz
Handle the symlinks created by libtool on a.out for certain invocations
of libtool involving the -release option. print-PLIST on an a.out machine probably doesn't handle these, i.e. it doesn't remove them from the PLIST.
-rw-r--r--Packages.txt4
-rw-r--r--mk/bsd.pkg.mk16
2 files changed, 16 insertions, 4 deletions
diff --git a/Packages.txt b/Packages.txt
index ac0a30f2857..8439460cff4 100644
--- a/Packages.txt
+++ b/Packages.txt
@@ -1,4 +1,4 @@
-# $NetBSD: Packages.txt,v 1.145 2001/03/19 17:36:52 wiz Exp $
+# $NetBSD: Packages.txt,v 1.146 2001/03/23 17:11:17 skrll Exp $
###########################################################################
==========================
@@ -898,7 +898,7 @@ Here's how to use libtool in a pkg in seven simple steps:
The "-release" option will produce different results for a.out and ELF
(excluding symlinks) in only one case. An ELF library of the form
libfoo-release.so.x.y will have a symlink of libfoo.so.x.y on an a.out
- platform. This will be handled automatically soon.
+ platform. This is handled automatically.
The -rpath argument is the install directory of the library being built.
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index a1a81d5ebce..72d8eb9faa4 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.695 2001/03/23 16:02:23 tron Exp $
+# $NetBSD: bsd.pkg.mk,v 1.696 2001/03/23 17:11:18 skrll Exp $
#
# This file is in the public domain.
#
@@ -1842,7 +1842,15 @@ do-shlib-handling:
${AWK} ' \
BEGIN { linkc = 1 } \
/^@/ { lines[NR] = $$0; next } \
+ function libtool_release(lib) { \
+ if (gsub("-[^-]+\.so\.", "\.so\.", lib)) { \
+ if (system("${TEST} -h ${PREFIX}/" lib) == 0) { \
+ rels[NR] = lib; \
+ } \
+ } \
+ } \
/.*\/lib[^\/]+\.so\.[0-9]+\.[0-9]+\.[0-9]+$$/ { \
+ libtool_release($$0); \
lines[NR] = $$0; \
sub("\.[0-9]+$$", ""); \
links[linkc++] = $$0; \
@@ -1853,6 +1861,7 @@ do-shlib-handling:
next \
} \
/.*\/lib[^\/]+\.so\.[0-9]+\.[0-9]+$$/ { \
+ libtool_release($$0); \
lines[NR] = $$0; \
sub("\.[0-9]+$$", ""); \
links[linkc++] = $$0; \
@@ -1867,8 +1876,11 @@ do-shlib-handling:
if (lines[j] == links[i]) \
lines[j] = "@comment " lines[j]; \
if (${SHLIB_PLIST_MODE}) \
- for (i = 1 ; i <= NR ; i++) \
+ for (i = 1 ; i <= NR ; i++) { \
print lines[i]; \
+ if (rels[i] != "") \
+ print rels[i]; \
+ } \
} \
' <${PLIST} >${PLIST}.tmp ; \
if [ "${SHLIB_PLIST_MODE}" = "1" ]; then \