summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-11-26 15:54:43 +0000
committerdholland <dholland@pkgsrc.org>2011-11-26 15:54:43 +0000
commit13d89164ed463b6307c27ef8ce6054deb96e98d7 (patch)
tree1b03634ee7149fe901ae9d7c418fa798108ffb84 /pkgtools
parent61deb47f8191a40ad02789b6db23256c259ef910 (diff)
downloadpkgsrc-13d89164ed463b6307c27ef8ce6054deb96e98d7.tar.gz
Propagate a fix from NetBSD base bsd.lib.mk: if SHLIB_FULLVERSION is
the same as SHLIB_MAJOR, don't try to symlink SHLIB_MAJOR. Otherwise you lose the library and get a symlink pointing to itself, and things fail later with ELOOP. Fixes builds of packages that use bsd.lib.mk for shared libraries and set only a major version number.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/bootstrap-mk-files/Makefile4
-rw-r--r--pkgtools/bootstrap-mk-files/files/bsd.lib.mk5
2 files changed, 6 insertions, 3 deletions
diff --git a/pkgtools/bootstrap-mk-files/Makefile b/pkgtools/bootstrap-mk-files/Makefile
index d39497c4023..f2b4f3b2896 100644
--- a/pkgtools/bootstrap-mk-files/Makefile
+++ b/pkgtools/bootstrap-mk-files/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.27 2011/11/06 21:01:30 tcort Exp $
+# $NetBSD: Makefile,v 1.28 2011/11/26 15:54:43 dholland Exp $
-DISTNAME= bootstrap-mk-files-20111106
+DISTNAME= bootstrap-mk-files-20111126
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/bootstrap-mk-files/files/bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/bsd.lib.mk
index 36d56d2340f..cb961f9cb13 100644
--- a/pkgtools/bootstrap-mk-files/files/bsd.lib.mk
+++ b/pkgtools/bootstrap-mk-files/files/bsd.lib.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.4 2009/12/30 12:35:33 abs Exp $
+# $NetBSD: bsd.lib.mk,v 1.5 2011/11/26 15:54:44 dholland Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.if !target(__initialized__)
@@ -392,8 +392,11 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
${SHLIB_LDENDFILE}
.endif
.if ${OBJECT_FMT} == "ELF"
+.if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
+ "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
+.endif
ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
mv -f lib${LIB}.so.tmp lib${LIB}.so
.endif