vapier      15/05/13 09:12:57

  Modified:             toolchain.eclass
  Log:
  use find directly to run sed on la files so we skip sed when there are no la 
files #548782

Revision  Changes    Path
1.669                eclass/toolchain.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.669&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.669&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.668&r2=1.669

Index: toolchain.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
retrieving revision 1.668
retrieving revision 1.669
diff -u -r1.668 -r1.669
--- toolchain.eclass    11 May 2015 03:05:21 -0000      1.668
+++ toolchain.eclass    13 May 2015 09:12:57 -0000      1.669
@@ -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 <[email protected]>
 
@@ -1824,10 +1824,12 @@
        # 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
 }




Reply via email to