From 02b96367deedf2894fff118034ce1b8c0def41d4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 8 May 2015 11:21:02 +0000 Subject: [PATCH] use find to run sed on la files so we skip sed when there are no la files #548782 --- eclass/toolchain.eclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 43b3435adc36..cfaf29738651 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.666 2015/05/04 05:43:08 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.667 2015/05/08 11:21:02 vapier Exp $ # Maintainer: Toolchain Ninjas @@ -1821,9 +1821,9 @@ fix_libtool_libdir_paths() { allarchives="\(${allarchives// /\\|}\)" popd >/dev/null - sed -i \ - -e "/^libdir=/s:=.*:='${dir}':" \ - ./${dir}/*.la || die + # 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') \ -- 2.26.2