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
commit3a5e38b0081e0c042b8c4f38d49395a29693ef09 (patch)
tree02109ba4aefefb23c0115c69e43ea0b2f3419daa /eclass
parentVersion bump. (diff)
downloadhistorical-3a5e38b0081e0c042b8c4f38d49395a29693ef09.tar.gz
historical-3a5e38b0081e0c042b8c4f38d49395a29693ef09.tar.bz2
historical-3a5e38b0081e0c042b8c4f38d49395a29693ef09.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
}