1 |
haubi 13/11/22 09:05:55 |
2 |
|
3 |
Modified: ChangeLog libtool.eclass |
4 |
Log: |
5 |
libtool.eclass elibtoolize(): Besides ltmain.sh, explicitly locate configure |
6 |
to apply patches rather than guessing based on where ltmain.sh was found. |
7 |
|
8 |
Revision Changes Path |
9 |
1.1064 eclass/ChangeLog |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1064&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1064&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1063&r2=1.1064 |
14 |
|
15 |
Index: ChangeLog |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
18 |
retrieving revision 1.1063 |
19 |
retrieving revision 1.1064 |
20 |
diff -u -r1.1063 -r1.1064 |
21 |
--- ChangeLog 20 Nov 2013 19:23:45 -0000 1.1063 |
22 |
+++ ChangeLog 22 Nov 2013 09:05:55 -0000 1.1064 |
23 |
@@ -1,6 +1,10 @@ |
24 |
# ChangeLog for eclass directory |
25 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
26 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1063 2013/11/20 19:23:45 mgorny Exp $ |
27 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1064 2013/11/22 09:05:55 haubi Exp $ |
28 |
+ |
29 |
+ 22 Nov 2013; Michael Haubenwallner <haubi@g.o> libtool.eclass: |
30 |
+ elibtoolize(): Besides ltmain.sh, explicitly locate configure to apply |
31 |
+ patches rather than guessing based on where ltmain.sh was found. |
32 |
|
33 |
20 Nov 2013; Michał Górny <mgorny@g.o> cmake-multilib.eclass: |
34 |
Run multilib header wrapping only when multiple ABIs are enabled, bug |
35 |
|
36 |
|
37 |
|
38 |
1.107 eclass/libtool.eclass |
39 |
|
40 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/libtool.eclass?rev=1.107&view=markup |
41 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/libtool.eclass?rev=1.107&content-type=text/plain |
42 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/libtool.eclass?r1=1.106&r2=1.107 |
43 |
|
44 |
Index: libtool.eclass |
45 |
=================================================================== |
46 |
RCS file: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v |
47 |
retrieving revision 1.106 |
48 |
retrieving revision 1.107 |
49 |
diff -u -r1.106 -r1.107 |
50 |
--- libtool.eclass 11 May 2013 11:17:58 -0000 1.106 |
51 |
+++ libtool.eclass 22 Nov 2013 09:05:55 -0000 1.107 |
52 |
@@ -1,6 +1,6 @@ |
53 |
# Copyright 1999-2013 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.106 2013/05/11 11:17:58 aballier Exp $ |
56 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.107 2013/11/22 09:05:55 haubi Exp $ |
57 |
|
58 |
# @ECLASS: libtool.eclass |
59 |
# @MAINTAINER: |
60 |
@@ -204,9 +204,9 @@ |
61 |
# Reuse "$@" for dirs to patch |
62 |
set -- |
63 |
if [[ ${do_shallow} == "yes" ]] ; then |
64 |
- [[ -f ${S}/ltmain.sh ]] && set -- "${S}" |
65 |
+ [[ -f ${S}/ltmain.sh || -f ${S}/configure ]] && set -- "${S}" |
66 |
else |
67 |
- set -- $(find "${S}" -name ltmain.sh -printf '%h ') |
68 |
+ set -- $(find "${S}" '(' -name ltmain.sh -o -name configure ')' -printf '%h\n' | sort -u) |
69 |
fi |
70 |
|
71 |
local d p |
72 |
@@ -225,8 +225,12 @@ |
73 |
ewarn " avoid this if possible (perhaps by filing a bug)" |
74 |
fi |
75 |
|
76 |
+ local ret |
77 |
+ |
78 |
+ # patching ltmain.sh |
79 |
+ [[ -f ${d}/ltmain.sh ]] && |
80 |
for p in ${elt_patches} ; do |
81 |
- local ret=0 |
82 |
+ ret=0 |
83 |
|
84 |
case ${p} in |
85 |
portage) |
86 |
@@ -258,17 +262,6 @@ |
87 |
ELT_walk_patches "${d}/ltmain.sh" "${p}" |
88 |
ret=$? |
89 |
;; |
90 |
- uclibc-conf) |
91 |
- if grep -qs 'Transform linux' "${d}/configure" ; then |
92 |
- ELT_walk_patches "${d}/configure" "${p}" |
93 |
- ret=$? |
94 |
- # ltmain.sh and co might be in a subdirectory ... |
95 |
- elif [[ ! -e ${d}/configure ]] && \ |
96 |
- grep -qs 'Transform linux' "${d}/../configure" ; then |
97 |
- ELT_walk_patches "${d}/../configure" "${p}" |
98 |
- ret=$? |
99 |
- fi |
100 |
- ;; |
101 |
uclibc-ltconf) |
102 |
# Newer libtoolize clears ltconfig, as not used anymore |
103 |
if [[ -s ${d}/ltconfig ]] ; then |
104 |
@@ -276,34 +269,12 @@ |
105 |
ret=$? |
106 |
fi |
107 |
;; |
108 |
- fbsd-conf) |
109 |
- if grep -qs 'version_type=freebsd-' "${d}/configure" ; then |
110 |
- ELT_walk_patches "${d}/configure" "${p}" |
111 |
- ret=$? |
112 |
- # ltmain.sh and co might be in a subdirectory ... |
113 |
- elif [[ ! -e ${d}/configure ]] && \ |
114 |
- grep -qs 'version_type=freebsd-' "${d}/../configure" ; then |
115 |
- ELT_walk_patches "${d}/../configure" "${p}" |
116 |
- ret=$? |
117 |
- fi |
118 |
- ;; |
119 |
fbsd-ltconf) |
120 |
if [[ -s ${d}/ltconfig ]] ; then |
121 |
ELT_walk_patches "${d}/ltconfig" "${p}" |
122 |
ret=$? |
123 |
fi |
124 |
;; |
125 |
- darwin-conf) |
126 |
- if grep -qs '&& echo \.so ||' "${d}/configure" ; then |
127 |
- ELT_walk_patches "${d}/configure" "${p}" |
128 |
- ret=$? |
129 |
- # ltmain.sh and co might be in a subdirectory ... |
130 |
- elif [[ ! -e ${d}/configure ]] && \ |
131 |
- grep -qs '&& echo \.so ||' "${d}/../configure" ; then |
132 |
- ELT_walk_patches "${d}/../configure" "${p}" |
133 |
- ret=$? |
134 |
- fi |
135 |
- ;; |
136 |
darwin-ltconf) |
137 |
# Newer libtoolize clears ltconfig, as not used anymore |
138 |
if [[ -s ${d}/ltconfig ]] ; then |
139 |
@@ -321,49 +292,6 @@ |
140 |
ret=$? |
141 |
fi |
142 |
;; |
143 |
- aixrtl|hpux-conf) |
144 |
- ret=1 |
145 |
- local subret=0 |
146 |
- # apply multiple patches as often as they match |
147 |
- while [[ $subret -eq 0 ]]; do |
148 |
- subret=1 |
149 |
- if [[ -e ${d}/configure ]]; then |
150 |
- ELT_walk_patches "${d}/configure" "${p}" |
151 |
- subret=$? |
152 |
- # ltmain.sh and co might be in a subdirectory ... |
153 |
- elif [[ ! -e ${d}/configure && -e ${d}/../configure ]] ; then |
154 |
- ELT_walk_patches "${d}/../configure" "${p}" |
155 |
- subret=$? |
156 |
- fi |
157 |
- if [[ $subret -eq 0 ]]; then |
158 |
- # have at least one patch succeeded. |
159 |
- ret=0 |
160 |
- fi |
161 |
- done |
162 |
- ;; |
163 |
- mint-conf|gold-conf|sol2-conf) |
164 |
- ret=1 |
165 |
- local subret=1 |
166 |
- if [[ -e ${d}/configure ]]; then |
167 |
- ELT_walk_patches "${d}/configure" "${p}" |
168 |
- subret=$? |
169 |
- # ltmain.sh and co might be in a subdirectory ... |
170 |
- elif [[ -e ${d}/../configure ]] ; then |
171 |
- ELT_walk_patches "${d}/../configure" "${p}" |
172 |
- subret=$? |
173 |
- elif [[ -e ${d}/../../configure ]] ; then |
174 |
- ELT_walk_patches "${d}/../../configure" "${p}" |
175 |
- subret=$? |
176 |
- fi |
177 |
- if [[ $subret -eq 0 ]]; then |
178 |
- # have at least one patch succeeded. |
179 |
- ret=0 |
180 |
- fi |
181 |
- ;; |
182 |
- target-nm) |
183 |
- ELT_walk_patches "${d}/configure" "${p}" |
184 |
- ret=$? |
185 |
- ;; |
186 |
install-sh) |
187 |
ELT_walk_patches "${d}/install-sh" "${p}" |
188 |
ret=$? |
189 |
@@ -421,15 +349,6 @@ |
190 |
uclibc-*) |
191 |
[[ ${CHOST} == *-uclibc ]] && ewarn " uClibc patch set '${p}' failed to apply!" |
192 |
;; |
193 |
- fbsd-*) |
194 |
- if [[ ${CHOST} == *-freebsd* ]] ; then |
195 |
- if [[ -z $(grep 'Handle Gentoo/FreeBSD as it was Linux' \ |
196 |
- "${d}/configure" "${d}/../configure" 2>/dev/null) ]]; then |
197 |
- eerror " FreeBSD patch set '${p}' failed to apply!" |
198 |
- die "FreeBSD patch set '${p}' failed to apply!" |
199 |
- fi |
200 |
- fi |
201 |
- ;; |
202 |
darwin-*) |
203 |
[[ ${CHOST} == *"-darwin"* ]] && ewarn " Darwin patch set '${p}' failed to apply!" |
204 |
;; |
205 |
@@ -437,6 +356,8 @@ |
206 |
fi |
207 |
done |
208 |
|
209 |
+ # makes sense for ltmain.sh patches only |
210 |
+ [[ -f ${d}/ltmain.sh ]] && |
211 |
if [[ -z ${ELT_APPLIED_PATCHES} ]] ; then |
212 |
if [[ ${do_portage} == "no" && \ |
213 |
${do_reversedeps} == "no" && \ |
214 |
@@ -448,6 +369,80 @@ |
215 |
fi |
216 |
fi |
217 |
|
218 |
+ # patching configure |
219 |
+ [[ -f ${d}/configure ]] && |
220 |
+ for p in ${elt_patches} ; do |
221 |
+ ret=0 |
222 |
+ |
223 |
+ case ${p} in |
224 |
+ uclibc-conf) |
225 |
+ if grep -qs 'Transform linux' "${d}/configure" ; then |
226 |
+ ELT_walk_patches "${d}/configure" "${p}" |
227 |
+ ret=$? |
228 |
+ fi |
229 |
+ ;; |
230 |
+ fbsd-conf) |
231 |
+ if grep -qs 'version_type=freebsd-' "${d}/configure" ; then |
232 |
+ ELT_walk_patches "${d}/configure" "${p}" |
233 |
+ ret=$? |
234 |
+ fi |
235 |
+ ;; |
236 |
+ darwin-conf) |
237 |
+ if grep -qs '&& echo \.so ||' "${d}/configure" ; then |
238 |
+ ELT_walk_patches "${d}/configure" "${p}" |
239 |
+ ret=$? |
240 |
+ fi |
241 |
+ ;; |
242 |
+ aixrtl|hpux-conf) |
243 |
+ ret=1 |
244 |
+ local subret=0 |
245 |
+ # apply multiple patches as often as they match |
246 |
+ while [[ $subret -eq 0 ]]; do |
247 |
+ subret=1 |
248 |
+ if [[ -e ${d}/configure ]]; then |
249 |
+ ELT_walk_patches "${d}/configure" "${p}" |
250 |
+ subret=$? |
251 |
+ fi |
252 |
+ if [[ $subret -eq 0 ]]; then |
253 |
+ # have at least one patch succeeded. |
254 |
+ ret=0 |
255 |
+ fi |
256 |
+ done |
257 |
+ ;; |
258 |
+ mint-conf|gold-conf|sol2-conf) |
259 |
+ ELT_walk_patches "${d}/configure" "${p}" |
260 |
+ ret=$? |
261 |
+ ;; |
262 |
+ target-nm) |
263 |
+ ELT_walk_patches "${d}/configure" "${p}" |
264 |
+ ret=$? |
265 |
+ ;; |
266 |
+ *) |
267 |
+ # ltmain.sh patches are applied above |
268 |
+ ;; |
269 |
+ esac |
270 |
+ |
271 |
+ if [[ ${ret} -ne 0 ]] ; then |
272 |
+ case ${p} in |
273 |
+ uclibc-*) |
274 |
+ [[ ${CHOST} == *-uclibc ]] && ewarn " uClibc patch set '${p}' failed to apply!" |
275 |
+ ;; |
276 |
+ fbsd-*) |
277 |
+ if [[ ${CHOST} == *-freebsd* ]] ; then |
278 |
+ if [[ -z $(grep 'Handle Gentoo/FreeBSD as it was Linux' \ |
279 |
+ "${d}/configure" 2>/dev/null) ]]; then |
280 |
+ eerror " FreeBSD patch set '${p}' failed to apply!" |
281 |
+ die "FreeBSD patch set '${p}' failed to apply!" |
282 |
+ fi |
283 |
+ fi |
284 |
+ ;; |
285 |
+ darwin-*) |
286 |
+ [[ ${CHOST} == *"-darwin"* ]] && ewarn " Darwin patch set '${p}' failed to apply!" |
287 |
+ ;; |
288 |
+ esac |
289 |
+ fi |
290 |
+ done |
291 |
+ |
292 |
rm -f "${d}/libtool" |
293 |
|
294 |
> "${d}/.elibtoolized" |