summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2012-08-15 18:51:06 +0000
committerFabian Groffen <grobian@gentoo.org>2012-08-15 18:51:06 +0000
commitaff6d1fabea226ff39838d15e02d2c946928aae3 (patch)
treec43c5ff92d4ed9e52e253ceaf9dcdccc48929d96 /dev-lang
parentStable for x86, wrt bug #426336 (diff)
downloadgentoo-2-aff6d1fabea226ff39838d15e02d2c946928aae3.tar.gz
gentoo-2-aff6d1fabea226ff39838d15e02d2c946928aae3.tar.bz2
gentoo-2-aff6d1fabea226ff39838d15e02d2c946928aae3.zip
Improve libdir detection for Prefix platforms, in particular Solaris, bug #427072
(Portage version: 2.2.01.20837-prefix/cvs/Darwin i386)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/perl/files/eblits/src_configure-v50160001.eblit17
1 files changed, 8 insertions, 9 deletions
diff --git a/dev-lang/perl/files/eblits/src_configure-v50160001.eblit b/dev-lang/perl/files/eblits/src_configure-v50160001.eblit
index e3f524737236..4a5cc8ad7508 100644
--- a/dev-lang/perl/files/eblits/src_configure-v50160001.eblit
+++ b/dev-lang/perl/files/eblits/src_configure-v50160001.eblit
@@ -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/dev-lang/perl/files/eblits/src_configure-v50160001.eblit,v 1.3 2012/08/13 20:19:37 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/src_configure-v50160001.eblit,v 1.4 2012/08/15 18:51:06 grobian Exp $
myconf() {
# the myconf array is declared in src_configure
@@ -79,7 +79,6 @@ eblit-perl-src_configure() {
# something compatible.
if use prefix ; then
local ldir
- local llib
local paths=""
echo "int main() {}" > "${T}"/t.c
# need to ensure dirs contain compatible libs,
@@ -87,14 +86,14 @@ eblit-perl-src_configure() {
$(tc-getCC) -o "${T}"/t "${T}"/t.c > /dev/null || die
local scantool=scanelf
[[ ${CHOST} == *-darwin* ]] && scantool=scanmacho
- local mtype=$(${scantool} -BF "%a#f" "${T}"/t)
+ local mtype=$(${scantool} -BF "%M%D#f" "${T}"/t)
+ einfo "searching libdirs for ${mtype}"
for ldir in /lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do
- [[ -d ${ldir} ]] || continue
- # find a random lib from here
- llib=( ${ldir}/*$(get_libname) )
- [[ -e ${llib[0]} ]] || continue
- [[ $(${scantool} -BF "%a#f" ${llib[0]}) == ${mtype} ]] \
- && paths="${paths} ${ldir}"
+ [[ -d ${ldir} ]] || continue
+ if ${scantool} -BF "%M%D#f" ${ldir} | grep -q ${mtype} ; then
+ paths="${paths} ${ldir}"
+ einfo "found ${ldir}"
+ fi
done
myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
elif [[ $(get_libdir) != "lib" ]] ; then