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
commita7667489eb3c0d1a83db4cf82ea7ea3895ea3a57 (patch)
tree1b03634ee7149fe901ae9d7c418fa798108ffb84 /pkgtools
parentea1a0cfbc1fdbf57d2c75aff9cbac5dd1ffb1e4c (diff)
downloadpkgsrc-a7667489eb3c0d1a83db4cf82ea7ea3895ea3a57.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