Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: toolchain.eclass
Date: Wed, 28 Jan 2009 23:40:41
Message-Id: E1LSK1O-0003dV-VY@stork.gentoo.org
1 vapier 09/01/28 23:40:38
2
3 Modified: toolchain.eclass
4 Log:
5 need to rewrite dependency_libs lines in all .la files #125728
6
7 Revision Changes Path
8 1.387 eclass/toolchain.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?rev=1.387&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?rev=1.387&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?r1=1.386&r2=1.387
13
14 Index: toolchain.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
17 retrieving revision 1.386
18 retrieving revision 1.387
19 diff -u -r1.386 -r1.387
20 --- toolchain.eclass 28 Jan 2009 21:01:10 -0000 1.386
21 +++ toolchain.eclass 28 Jan 2009 23:40:38 -0000 1.387
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.386 2009/01/28 21:01:10 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.387 2009/01/28 23:40:38 vapier Exp $
27 #
28 # Maintainer: Toolchain Ninjas <toolchain@g.o>
29
30 @@ -1929,7 +1929,7 @@
31 done
32 find "${D}" -type d | xargs rmdir >& /dev/null
33
34 - fix_libtool_libdir_paths $(find "${D}"${LIBPATH} -name *.la)
35 + fix_libtool_libdir_paths
36 }
37
38 #----<< src_* >>----
39 @@ -2449,16 +2449,21 @@
40 # -are-, and not where they -used- to be. also, any dependencies we have
41 # on our own .la files need to be updated.
42 fix_libtool_libdir_paths() {
43 - local dirpath allarchives="${@##*/}"
44 + pushd "${D}" >/dev/null
45 +
46 + local dir=${LIBPATH}
47 + local allarchives=$(cd ./${dir}; echo *.la)
48 allarchives="\(${allarchives// /\\|}\)"
49 - for archive in "$@" ; do
50 - dirpath=${archive%/*}
51 - dirpath=${dirpath#${D}}
52 - sed -i \
53 - -e "/^libdir=/s:=.*:='${dirpath}':" \
54 - -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${dirpath}/\1:g" \
55 - "${archive}"
56 - done
57 +
58 + sed -i \
59 + -e "/^libdir=/s:=.*:='${dir}':" \
60 + ./${dir}/*.la
61 + sed -i \
62 + -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${LIBPATH}/\1:g" \
63 + $(find ./${PREFIX}/lib* -maxdepth 3 -name '*.la') \
64 + ./${dir}/*.la
65 +
66 + popd >/dev/null
67 }
68
69 is_multilib() {