summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorPaul de Vrieze <pauldv@gentoo.org>2003-10-15 09:03:13 +0000
committerPaul de Vrieze <pauldv@gentoo.org>2003-10-15 09:03:13 +0000
commit4cc567b8b2165ea531ce02bda8e813c2a94eeddf (patch)
tree719aa4215e9dc9fdee7c8a86f5904c8ae181d56d /eclass
parentadd bzip2 support (diff)
downloadgentoo-2-4cc567b8b2165ea531ce02bda8e813c2a94eeddf.tar.gz
gentoo-2-4cc567b8b2165ea531ce02bda8e813c2a94eeddf.tar.bz2
gentoo-2-4cc567b8b2165ea531ce02bda8e813c2a94eeddf.zip
Fix db resymlink script so that it only works with the db libraries, not with libs and headers which happen to have names starting with db
Diffstat (limited to 'eclass')
-rw-r--r--eclass/db.eclass21
1 files changed, 8 insertions, 13 deletions
diff --git a/eclass/db.eclass b/eclass/db.eclass
index 2649f0f793d2..1f125a2841ae 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -1,5 +1,5 @@
# This is a common location for functions used in the sys-libs/db ebuilds
-# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.4 2003/09/02 08:41:16 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.5 2003/10/15 09:03:13 pauldv Exp $
ECLASS=db
INHERITED="$INHERITED $ECLASS"
@@ -9,9 +9,9 @@ db_fix_so () {
cd ${ROOT}/usr/lib
# first clean up old symlinks
- find ${ROOT}/usr/lib -type l -name 'libdb*.so' -exec rm \{} \;
- find ${ROOT}/usr/lib -type l -name 'libdb*.so.[23]' -exec rm \{} \;
- find ${ROOT}/usr/lib -type l -name 'libdb*.a' -exec rm \{} \;
+ find ${ROOT}/usr/lib -maxdepth 1 -type l -name 'libdb[1._-]*so' -exec rm \{} \;
+ find ${ROOT}/usr/lib -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -exec rm \{} \;
+ find ${ROOT}/usr/lib -maxdepth 1 -type l -name 'libdb[1._-]*a' -exec rm \{} \;
# now rebuild all the correct ones
for ext in so a; do
@@ -38,10 +38,12 @@ db_fix_so () {
# do the same for headers now
# but since there are only two of them, just overwrite them
cd ${ROOT}/usr/include
- target=`find -type d -maxdepth 1 -name 'db*' | sort -g |cut -d/ -f2- | tail -n1`
- if [ -n "${target}" ]; then
+ target=`find -type d -maxdepth 1 -name 'db[0-9]*' | sort -g |cut -d/ -f2- | tail -n1`
+ if [ -n "${target} ] && [ -e "${target}/db.h" ]; then
ln -sf ${target}/db.h .
ln -sf ${target}/db_185.h .
+ elif [ ! -e "${target}/db.h" ]; then
+ rm db.h db_185.h
fi
}
@@ -71,13 +73,6 @@ db_src_install_headerslot() {
}
db_src_install_usrlibcleanup() {
- # this is handled by db_fix_so now
- #ln -s /usr/include/db${SLOT}/db.h ${D}/usr/include/db.h
-
- # we remove all symlinks created in here, as our db_fix_so will re-create them
- #find ${D}/usr/lib -type l -name 'libdb*.so' -exec rm \{} \;
- #find ${D}/usr/lib -type l -name 'libdb*.a' -exec rm \{} \;
-
# this actually does all the work for us, so let's reduce code duplication
ROOT=${D} db_fix_so
}