summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2021-01-14 13:27:45 +0100
committerFabian Groffen <grobian@gentoo.org>2021-01-14 13:28:34 +0100
commitb158fba5eee07da21f8b80fd737b9bdd3865256b (patch)
tree7c9d90bb77c22f3c8bce1968d264f62eb433d878 /eclass
parentmedia-libs/giflib: drop *-macos, bug #680110 (diff)
downloadgentoo-b158fba5eee07da21f8b80fd737b9bdd3865256b.tar.gz
gentoo-b158fba5eee07da21f8b80fd737b9bdd3865256b.tar.bz2
gentoo-b158fba5eee07da21f8b80fd737b9bdd3865256b.zip
eclass/db.eclass: use get_libname for Darwin support
Closes: https://bugs.gentoo.org/673322 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/db.eclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/eclass/db.eclass b/eclass/db.eclass
index 9a246d18979a..96a857a1962e 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: db.eclass
@@ -23,13 +23,13 @@ db_fix_so() {
cd "${LIB}" || die
# first clean up old symlinks
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -delete || die
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -delete || die
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"$(get_libname)" -delete || die
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"$(get_libname "[23]")" -delete || die
find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete || die
# now rebuild all the correct ones
local ext
- for ext in so a; do
+ for ext in so dylib a; do
for name in libdb libdb_{cxx,tcl,java,sql,stl}; do
target="$(find . -maxdepth 1 -type f -name "${name}-*.${ext}" |sort -V |tail -n 1)"
[[ -n "${target}" ]] && ln -sf ${target//.\//} ${name}.${ext}
@@ -37,17 +37,17 @@ db_fix_so() {
done;
# db[23] gets some extra-special stuff
- if [[ -f libdb1.so.2 ]]; then
- ln -sf libdb1.so.2 libdb.so.2
- ln -sf libdb1.so.2 libdb1.so
- ln -sf libdb1.so.2 libdb-1.so
+ if [[ -f libdb1$(get_libname 2) ]]; then
+ ln -sf libdb1$(get_libname 2) libdb$(get_libname 2)
+ ln -sf libdb1$(get_libname 2) libdb1$(get_libname)
+ ln -sf libdb1$(get_libname 2) libdb-1$(get_libname)
fi
# what do we do if we ever get 3.3 ?
local i
for i in libdb libdb_{cxx,tcl,java,sql,stl}; do
- if [[ -f ${i}-3.2.so ]]; then
- ln -sf ${i}-3.2.so ${i}-3.so
- ln -sf ${i}-3.2.so ${i}.so.3
+ if [[ -f $i-3.2$(get_libname) ]]; then
+ ln -sf $i-3.2$(get_libname) $i-3$(get_libname)
+ ln -sf $i-3.2$(get_libname) $i$(get_libname 3)
fi
done
@@ -143,8 +143,8 @@ db_src_install_usrlibcleanup() {
mv "${LIB}/libdb_cxx.a" "${LIB}/libdb_cxx-${SLOT}.a" || die
fi
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -delete || die
- find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -delete || die
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"$(get_libname)" -delete || die
+ find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"$(get_libname "[23]")" -delete || die
einfo "removing unversioned static archives"
find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete || die