From 3ae3d18e30751f9ab0608d9515b983e635141330 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 28 Mar 2009 11:09:27 +0000 Subject: support funk SONAMEs like libfoo.so -> libfoo-0.1.so --- eclass/toolchain-funcs.eclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 4cd5cc6769c7..ca690cf97a0f 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.87 2009/03/01 08:09:44 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.88 2009/03/28 11:09:27 vapier Exp $ # @ECLASS: toolchain-funcs.eclass # @MAINTAINER: @@ -426,8 +426,12 @@ gen_usr_ldscript() { local tlib if ${auto} ; then lib="lib${lib}${suffix}" + tlib=$(scanelf -qF'%S#F' "${D}"/usr/${libdir}/${lib}) mv "${D}"/usr/${libdir}/${lib}* "${D}"/${libdir}/ || die - tlib=$(scanelf -qF'%S#F' "${D}"/${libdir}/${lib}) + # some SONAMEs are funky: they encode a version before the .so + if [[ ${tlib} != ${lib}* ]] ; then + mv "${D}"/usr/${libdir}/${tlib}* "${D}"/${libdir}/ || die + fi [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}" rm -f "${D}"/${libdir}/${lib} else -- cgit v1.2.3-65-gdbad