Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: libtool.eclass
Date: Fri, 18 Nov 2011 17:32:27
Message-Id: 20111118173214.D6DFA2004B@flycatcher.gentoo.org
1 vapier 11/11/18 17:32:14
2
3 Modified: libtool.eclass
4 Log:
5 allow overlays to specify eclass overrides without breaking libtools lookup of local patches #389009
6
7 Revision Changes Path
8 1.96 eclass/libtool.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/libtool.eclass?rev=1.96&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/libtool.eclass?rev=1.96&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/libtool.eclass?r1=1.95&r2=1.96
13
14 Index: libtool.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v
17 retrieving revision 1.95
18 retrieving revision 1.96
19 diff -u -r1.95 -r1.96
20 --- libtool.eclass 14 Nov 2011 17:08:49 -0000 1.95
21 +++ libtool.eclass 18 Nov 2011 17:32:14 -0000 1.96
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2011 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.95 2011/11/14 17:08:49 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.96 2011/11/18 17:32:14 vapier Exp $
27
28 # @ECLASS: libtool.eclass
29 # @MAINTAINER:
30 @@ -14,12 +14,23 @@
31 # generated libtool files. We do not run the libtoolize program because that
32 # requires a regeneration of the main autotool files in order to work properly.
33
34 +# If an overlay has eclass overrides, but doesn't actually override the
35 +# libtool.eclass, we'll have ECLASSDIR pointing to the active overlay's
36 +# eclass/ dir, but libtool.eclass is still in the main Gentoo tree. So
37 +# add a check to locate the ELT-patches/ regardless of what's going on.
38 +ECLASSDIR_LOCAL=${BASH_SOURCE[0]%/*}
39 +elt_patch_dir() {
40 + local d="${ECLASSDIR}/ELT-patches"
41 + if [[ ! -d ${d} ]] ; then
42 + d="${ECLASSDIR_LOCAL}/ELT-patches"
43 + fi
44 + echo "${d}"
45 +}
46 +
47 DESCRIPTION="Based on the ${ECLASS} eclass"
48
49 inherit multilib toolchain-funcs
50
51 -ELT_PATCH_DIR="${ECLASSDIR}/ELT-patches"
52 -
53 #
54 # See if we can apply $2 on $1, and if so, do it
55 #
56 @@ -70,7 +81,7 @@
57 local ret=1
58 local file=$1
59 local patch_set=$2
60 - local patch_dir="${ELT_PATCH_DIR}/${patch_set}"
61 + local patch_dir="$(elt_patch_dir)/${patch_set}"
62 local rem_int_dep=$3
63
64 [[ -z ${patch_set} ]] && return 1
65 @@ -84,7 +95,7 @@
66 sed_args+=( -e "s|@REM_INT_DEP@|${rem_int_dep}|g" )
67 fi
68
69 - pushd "${ELT_PATCH_DIR}" >/dev/null || die
70 + pushd "$(elt_patch_dir)" >/dev/null || die
71
72 # Go through the patches in reverse order (newer version to older)
73 for patch in $(find "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r) ; do