summaryrefslogtreecommitdiff
path: root/mk
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 /mk
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.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk16
1 files changed, 14 insertions, 2 deletions
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 \