summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-05-13 09:12:57 +0000
committerMike Frysinger <vapier@gentoo.org>2015-05-13 09:12:57 +0000
commit5f4e15c4475eec595bdce0311f6b431e07045b7a (patch)
treee3a8c710520a5e7ac39a55a58b23a1a595c5b988 /eclass
parentVersion bump. (diff)
downloadgentoo-2-5f4e15c4475eec595bdce0311f6b431e07045b7a.tar.gz
gentoo-2-5f4e15c4475eec595bdce0311f6b431e07045b7a.tar.bz2
gentoo-2-5f4e15c4475eec595bdce0311f6b431e07045b7a.zip
use find directly to run sed on la files so we skip sed when there are no la files #548782
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass12
1 files changed, 7 insertions, 5 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 17dc420e8b8c..db12cfdfd076 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.668 2015/05/11 03:05:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.669 2015/05/13 09:12:57 vapier Exp $
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -1824,10 +1824,12 @@ fix_libtool_libdir_paths() {
# The libdir might not have any .la files. #548782
find "./${dir}" -maxdepth 1 -name '*.la' \
-exec sed -i -e "/^libdir=/s:=.*:='${dir}':" {} + || die
- sed -i \
- -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${LIBPATH}/\1:g" \
- $(find ./${PREFIX}/lib* -maxdepth 3 -name '*.la') \
- $(find ./${dir}/ -maxdepth 1 -name '*.la') || die
+ # Would be nice to combine these, but -maxdepth can not be specified
+ # on sub-expressions.
+ find "./${PREFIX}"/lib* -maxdepth 3 -name '*.la' \
+ -exec sed -i -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${LIBPATH}/\1:g" {} + || die
+ find "./${dir}/" -maxdepth 1 -name '*.la' \
+ -exec sed -i -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${LIBPATH}/\1:g" {} + || die
popd >/dev/null
}