diff options
author | Fabian Groffen <grobian@gentoo.org> | 2010-01-27 20:41:27 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2010-01-27 20:41:27 +0000 |
commit | f494d590cb0c6ef08570876d7521a1ec029eeb00 (patch) | |
tree | 4a9afa6653d07c73dcf5a60ab2f80e940e045cd4 /eclass | |
parent | add ELT-patches from Prefix, bug #301190 (diff) | |
download | gentoo-2-f494d590cb0c6ef08570876d7521a1ec029eeb00.tar.gz gentoo-2-f494d590cb0c6ef08570876d7521a1ec029eeb00.tar.bz2 gentoo-2-f494d590cb0c6ef08570876d7521a1ec029eeb00.zip |
Activate Prefix ELT-patches when and where necessary, acked by base-system, bug #301190
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/libtool.eclass | 65 |
1 files changed, 59 insertions, 6 deletions
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass index c63c77a98958..967c21ae7f1e 100644 --- a/eclass/libtool.eclass +++ b/eclass/libtool.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.83 2009/05/03 20:03:10 loki_val Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.84 2010/01/27 20:41:27 grobian Exp $ # # Maintainer: base-system@gentoo.org # @@ -174,11 +174,26 @@ elibtoolize() { [[ ${do_uclibc} == "yes" ]] && \ elt_patches="${elt_patches} uclibc-conf uclibc-ltconf" - [[ ${CHOST} == *"-freebsd"* ]] && \ - elt_patches="${elt_patches} fbsd-conf fbsd-ltconf" - - [[ ${CHOST} == *"-darwin"* ]] && \ - elt_patches="${elt_patches} darwin-ltconf darwin-ltmain" + case "${CHOST}" in + *-aix*) + elt_patches="${elt_patches} hardcode aixrtl" + ;; + *-darwin*) + elt_patches="${elt_patches} darwin-ltconf darwin-ltmain darwin-conf" + ;; + *-freebsd*) + elt_patches="${elt_patches} fbsd-conf fbsd-ltconf" + ;; + *-hpux*) + elt_patches="${elt_patches} hpux-conf deplibs hc-flag-ld hardcode hardcode-relink relink-prog no-lc" + ;; + *-irix*) + elt_patches="${elt_patches} irix-ltmain" + ;; + *-mint*) + elt_patches="${elt_patches} mint-conf" + ;; + esac for x in ${my_dirlist} ; do local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||") @@ -260,6 +275,18 @@ elibtoolize() { ret=$? fi ;; + "darwin-conf") + if [[ -e ${x}/configure && \ + -n $(grep '&& echo \.so ||' "${x}/configure") ]] ; then + ELT_walk_patches "${x}/configure" "${y}" + ret=$? + # ltmain.sh and co might be in a subdirectory ... + elif [[ ! -e ${x}/configure && -e ${x}/../configure && \ + -n $(grep '&& echo \.so ||' "${x}/../configure") ]] ; then + ELT_walk_patches "${x}/../configure" "${y}" + ret=$? + fi + ;; "darwin-ltconf") # Newer libtoolize clears ltconfig, as not used anymore if [[ -s ${x}/ltconfig ]] ; then @@ -267,6 +294,32 @@ elibtoolize() { ret=$? fi ;; + "darwin-ltmain") + # special case to avoid false positives (failing to apply + # ltmain.sh path message), newer libtools have this patch + # built in, so not much to patch around then + if [[ -e ${x}/ltmain.sh && \ + -z $(grep 'verstring="-compatibility_version' "${x}/ltmain.sh") ]] ; then + ELT_walk_patches "${x}/ltmain.sh" "${y}" + ret=$? + fi + ;; + "aixrtl" | "hpux-conf" | "mint-conf" ) + ret=1 + local subret=1 + if [[ -e ${x}/configure ]]; then + ELT_walk_patches "${x}/configure" "${y}" + subret=$? + # ltmain.sh and co might be in a subdirectory ... + elif [[ ! -e ${x}/configure && -e ${x}/../configure ]] ; then + ELT_walk_patches "${x}/../configure" "${y}" + subret=$? + fi + if [[ $subret -eq 0 ]]; then + # have at least one patch succeeded. + ret=0 + fi + ;; "install-sh") ELT_walk_patches "${x}/install-sh" "${y}" ret=$? |