diff options
author | Peter Alfredsen <loki_val@gentoo.org> | 2009-03-08 15:46:54 +0000 |
---|---|---|
committer | Peter Alfredsen <loki_val@gentoo.org> | 2009-03-08 15:46:54 +0000 |
commit | 5c7f9ffab7a4b1e1abac81492407a6b13dc6abb4 (patch) | |
tree | 5f42cb3148ecc08425b2158778682afa8d404a30 /eclass | |
parent | Broken patch, going back to ~alpha. (diff) | |
download | gentoo-2-5c7f9ffab7a4b1e1abac81492407a6b13dc6abb4.tar.gz gentoo-2-5c7f9ffab7a4b1e1abac81492407a6b13dc6abb4.tar.bz2 gentoo-2-5c7f9ffab7a4b1e1abac81492407a6b13dc6abb4.zip |
Fix mono_multilib_comply for the case where an empty pkgconfig directory is installed.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/mono.eclass | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/eclass/mono.eclass b/eclass/mono.eclass index 0fe28ee1bc5f..8216138609de 100644 --- a/eclass/mono.eclass +++ b/eclass/mono.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.12 2009/01/14 17:17:17 loki_val Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.13 2009/03/08 15:46:54 loki_val Exp $ # @ECLASS: mono.eclass # @MAINTAINER: @@ -54,14 +54,16 @@ mono_multilib_comply() { rm -rf "${D}"/usr/lib for dir in "${D}"/usr/"$(get_libdir)"/pkgconfig "${D}"/usr/share/pkgconfig do - [[ -d "${dir}" ]] && finddirs=( "${finddirs[@]}" "${dir}" ) + + if [[ -d "${dir}" && "$(find "${dir}" -name '*.pc')" != "" ]] + then + pushd "${dir}" &> /dev/null + sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \ + *.pc \ + || die "Sedding some sense into pkgconfig files failed." + popd "${dir}" &> /dev/null + fi done - if ! [[ -z "${finddirs[@]// /}" ]] - then - sed -i -r -e 's:/(lib)([^a-zA-Z0-9]|$):/'"$(get_libdir)"'\2:g' \ - $(find "${finddirs[@]}" -name '*.pc') \ - || die "Sedding some sense into pkgconfig files failed." - fi if [[ -d "${D}/usr/bin" ]] then for exe in "${D}/usr/bin"/* |