summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-01-12 16:53:56 +0000
committerMike Frysinger <vapier@gentoo.org>2013-01-12 16:53:56 +0000
commit3ee9761c98e8560de9920a32f7cf9c7f8b2da8b5 (patch)
tree7b6070ad1f166b88f8d9b63d58c03399a8b8e6fb /eclass
parentadd -j1 to the make install phase for bug #451500 (diff)
downloadhistorical-3ee9761c98e8560de9920a32f7cf9c7f8b2da8b5.tar.gz
historical-3ee9761c98e8560de9920a32f7cf9c7f8b2da8b5.tar.bz2
historical-3ee9761c98e8560de9920a32f7cf9c7f8b2da8b5.zip
rewrite linker scripts and symlinks too when moving lib32
Diffstat (limited to 'eclass')
-rw-r--r--eclass/emul-linux-x86.eclass18
1 files changed, 17 insertions, 1 deletions
diff --git a/eclass/emul-linux-x86.eclass b/eclass/emul-linux-x86.eclass
index 91a02380d9f1..e0130aa0f5da 100644
--- a/eclass/emul-linux-x86.eclass
+++ b/eclass/emul-linux-x86.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.15 2012/11/25 07:19:51 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.16 2013/01/12 16:53:56 vapier Exp $
#
# Original Author: Mike Doty <kingtaco@gentoo.org>
@@ -85,5 +85,21 @@ emul-linux-x86_src_install() {
if [[ -d ${D}/lib32 ]] ; then
mv "${D}"/lib32 "${D}"/${x86_libdir} || die
fi
+
+ pushd "${D}"/usr/${x86_libdir} >/dev/null
+
+ # Fix linker script paths.
+ sed -i \
+ -e "s:/lib32/:/${x86_libdir}/:" \
+ $(grep -ls '^GROUP.*/lib32/' *.so) || die
+
+ # Rewrite symlinks (if need be).
+ local sym tgt
+ while read sym ; do
+ tgt=$(readlink "${sym}")
+ ln -sf "${tgt/lib32/${x86_libdir}}" "${sym}" || die
+ done < <(find -xtype l)
+
+ popd >/dev/null
fi
}