1 |
commit: 041d7491dac071333a961c18c95cb96d2c6dd46d |
2 |
Author: Priit Laes <plaes <AT> plaes <DOT> org> |
3 |
AuthorDate: Fri Aug 24 21:32:22 2012 +0000 |
4 |
Commit: Priit Laes <plaes <AT> plaes <DOT> org> |
5 |
CommitDate: Fri Aug 24 21:35:13 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=041d7491 |
7 |
|
8 |
Add sys-devel/make-3.82-r4 with bunch of extra patches to overlay |
9 |
|
10 |
Dependency for webkit-gtk-1.9.x |
11 |
|
12 |
--- |
13 |
.../make/files/make-3.82-MAKEFLAGS-reexec.patch | 14 +++ |
14 |
.../make/files/make-3.82-archives-many-objs.patch | 60 +++++++++++ |
15 |
.../make/files/make-3.82-copy-on-expand.patch | 58 +++++++++++ |
16 |
sys-devel/make/files/make-3.82-glob-speedup.patch | 104 +++++++++++++++++++ |
17 |
sys-devel/make/files/make-3.82-long-cmdline.patch | 105 ++++++++++++++++++++ |
18 |
.../make/files/make-3.82-memory-corruption.patch | 37 +++++++ |
19 |
sys-devel/make/files/make-3.82-oneshell.patch | 24 +++++ |
20 |
.../make/files/make-3.82-parallel-build.patch | 29 ++++++ |
21 |
.../make/files/make-3.82-parallel-remake.patch | 39 +++++++ |
22 |
sys-devel/make/make-3.82-r4.ebuild | 49 +++++++++ |
23 |
10 files changed, 519 insertions(+), 0 deletions(-) |
24 |
|
25 |
diff --git a/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch b/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch |
26 |
new file mode 100644 |
27 |
index 0000000..a2f5965 |
28 |
--- /dev/null |
29 |
+++ b/sys-devel/make/files/make-3.82-MAKEFLAGS-reexec.patch |
30 |
@@ -0,0 +1,14 @@ |
31 |
+http://bugs.gentoo.org/331975 |
32 |
+https://savannah.gnu.org/bugs/?30723 |
33 |
+ |
34 |
+--- main.c 2010/07/19 07:10:53 1.243 |
35 |
++++ main.c 2010/08/10 07:35:34 1.244 |
36 |
+@@ -2093,7 +2093,7 @@ |
37 |
+ const char *pv = define_makeflags (1, 1); |
38 |
+ char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1); |
39 |
+ sprintf (p, "MAKEFLAGS=%s", pv); |
40 |
+- putenv (p); |
41 |
++ putenv (allocated_variable_expand (p)); |
42 |
+ } |
43 |
+ |
44 |
+ if (ISDB (DB_BASIC)) |
45 |
|
46 |
diff --git a/sys-devel/make/files/make-3.82-archives-many-objs.patch b/sys-devel/make/files/make-3.82-archives-many-objs.patch |
47 |
new file mode 100644 |
48 |
index 0000000..abdcd32 |
49 |
--- /dev/null |
50 |
+++ b/sys-devel/make/files/make-3.82-archives-many-objs.patch |
51 |
@@ -0,0 +1,60 @@ |
52 |
+http://bugs.gentoo.org/334889 |
53 |
+https://savannah.gnu.org/bugs/?30612 |
54 |
+ |
55 |
+revision 1.194 |
56 |
+date: 2010-08-13 22:50:14 -0400; author: psmith; state: Exp; lines: +9 -6; commitid: 4UaslPqQHZTs5wKu; |
57 |
+- Fix Savannah bug #30612: handling of archive references with >1 object |
58 |
+ |
59 |
+Index: read.c |
60 |
+=================================================================== |
61 |
+RCS file: /sources/make/make/read.c,v |
62 |
+retrieving revision 1.193 |
63 |
+retrieving revision 1.194 |
64 |
+diff -u -p -r1.193 -r1.194 |
65 |
+--- read.c 13 Jul 2010 01:20:42 -0000 1.193 |
66 |
++++ read.c 14 Aug 2010 02:50:14 -0000 1.194 |
67 |
+@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned |
68 |
+ { |
69 |
+ /* This looks like the first element in an open archive group. |
70 |
+ A valid group MUST have ')' as the last character. */ |
71 |
+- const char *e = p + nlen; |
72 |
++ const char *e = p; |
73 |
+ do |
74 |
+ { |
75 |
+ e = next_token (e); |
76 |
+@@ -3084,19 +3084,19 @@ parse_file_seq (char **stringp, unsigned |
77 |
+ Go to the next item in the string. */ |
78 |
+ if (flags & PARSEFS_NOGLOB) |
79 |
+ { |
80 |
+- NEWELT (concat (2, prefix, tp)); |
81 |
++ NEWELT (concat (2, prefix, tmpbuf)); |
82 |
+ continue; |
83 |
+ } |
84 |
+ |
85 |
+ /* If we get here we know we're doing glob expansion. |
86 |
+ TP is a string in tmpbuf. NLEN is no longer used. |
87 |
+ We may need to do more work: after this NAME will be set. */ |
88 |
+- name = tp; |
89 |
++ name = tmpbuf; |
90 |
+ |
91 |
+ /* Expand tilde if applicable. */ |
92 |
+- if (tp[0] == '~') |
93 |
++ if (tmpbuf[0] == '~') |
94 |
+ { |
95 |
+- tildep = tilde_expand (tp); |
96 |
++ tildep = tilde_expand (tmpbuf); |
97 |
+ if (tildep != 0) |
98 |
+ name = tildep; |
99 |
+ } |
100 |
+@@ -3152,7 +3152,10 @@ parse_file_seq (char **stringp, unsigned |
101 |
+ else |
102 |
+ { |
103 |
+ /* We got a chain of items. Attach them. */ |
104 |
+- (*newp)->next = found; |
105 |
++ if (*newp) |
106 |
++ (*newp)->next = found; |
107 |
++ else |
108 |
++ *newp = found; |
109 |
+ |
110 |
+ /* Find and set the new end. Massage names if necessary. */ |
111 |
+ while (1) |
112 |
|
113 |
diff --git a/sys-devel/make/files/make-3.82-copy-on-expand.patch b/sys-devel/make/files/make-3.82-copy-on-expand.patch |
114 |
new file mode 100644 |
115 |
index 0000000..3f202b4 |
116 |
--- /dev/null |
117 |
+++ b/sys-devel/make/files/make-3.82-copy-on-expand.patch |
118 |
@@ -0,0 +1,58 @@ |
119 |
+fix from upstream cvs |
120 |
+ |
121 |
+---------------------------- |
122 |
+revision 1.58 |
123 |
+date: 2011-08-29 12:20:19 -0400; author: psmith; state: Exp; lines: +7 -13; commitid: MdH0jSxpuIy7mqxv; |
124 |
+Save strings we're expanding in case an embedded eval causes them |
125 |
+to be freed (if they're the value of a variable that's reset for example). |
126 |
+See Savannah patch #7534 |
127 |
+ |
128 |
+Index: expand.c |
129 |
+=================================================================== |
130 |
+RCS file: /sources/make/make/expand.c,v |
131 |
+retrieving revision 1.57 |
132 |
+retrieving revision 1.58 |
133 |
+diff -u -p -r1.57 -r1.58 |
134 |
+--- expand.c 7 May 2011 20:03:49 -0000 1.57 |
135 |
++++ expand.c 29 Aug 2011 16:20:19 -0000 1.58 |
136 |
+@@ -197,7 +197,7 @@ variable_expand_string (char *line, cons |
137 |
+ { |
138 |
+ struct variable *v; |
139 |
+ const char *p, *p1; |
140 |
+- char *abuf = NULL; |
141 |
++ char *save; |
142 |
+ char *o; |
143 |
+ unsigned int line_offset; |
144 |
+ |
145 |
+@@ -212,16 +212,11 @@ variable_expand_string (char *line, cons |
146 |
+ return (variable_buffer); |
147 |
+ } |
148 |
+ |
149 |
+- /* If we want a subset of the string, allocate a temporary buffer for it. |
150 |
+- Most of the functions we use here don't work with length limits. */ |
151 |
+- if (length > 0 && string[length] != '\0') |
152 |
+- { |
153 |
+- abuf = xmalloc(length+1); |
154 |
+- memcpy(abuf, string, length); |
155 |
+- abuf[length] = '\0'; |
156 |
+- string = abuf; |
157 |
+- } |
158 |
+- p = string; |
159 |
++ /* We need a copy of STRING: due to eval, it's possible that it will get |
160 |
++ freed as we process it (it might be the value of a variable that's reset |
161 |
++ for example). Also having a nil-terminated string is handy. */ |
162 |
++ save = length < 0 ? xstrdup (string) : xstrndup (string, length); |
163 |
++ p = save; |
164 |
+ |
165 |
+ while (1) |
166 |
+ { |
167 |
+@@ -411,8 +406,7 @@ variable_expand_string (char *line, cons |
168 |
+ ++p; |
169 |
+ } |
170 |
+ |
171 |
+- if (abuf) |
172 |
+- free (abuf); |
173 |
++ free (save); |
174 |
+ |
175 |
+ variable_buffer_output (o, "", 1); |
176 |
+ return (variable_buffer + line_offset); |
177 |
|
178 |
diff --git a/sys-devel/make/files/make-3.82-glob-speedup.patch b/sys-devel/make/files/make-3.82-glob-speedup.patch |
179 |
new file mode 100644 |
180 |
index 0000000..c826c2c |
181 |
--- /dev/null |
182 |
+++ b/sys-devel/make/files/make-3.82-glob-speedup.patch |
183 |
@@ -0,0 +1,104 @@ |
184 |
+change from upstream to speed up by skipping unused globs |
185 |
+https://bugs.gentoo.org/382845 |
186 |
+ |
187 |
+http://cvs.savannah.gnu.org/viewvc/make/read.c?root=make&r1=1.198&r2=1.200 |
188 |
+ |
189 |
+Revision 1.200 |
190 |
+Sat May 7 14:36:12 2011 UTC (4 months, 1 week ago) by psmith |
191 |
+Branch: MAIN |
192 |
+Changes since 1.199: +1 -1 lines |
193 |
+Inverted the boolean test from what I wanted it to be. Added a |
194 |
+regression test to make sure this continues to work. |
195 |
+ |
196 |
+Revision 1.199 |
197 |
+Mon May 2 00:18:06 2011 UTC (4 months, 2 weeks ago) by psmith |
198 |
+Branch: MAIN |
199 |
+Changes since 1.198: +35 -25 lines |
200 |
+Avoid invoking glob() unless the filename has potential globbing |
201 |
+characters in it, for performance improvements. |
202 |
+ |
203 |
+--- a/read.c 2011/04/29 15:27:39 1.198 |
204 |
++++ b/read.c 2011/05/07 14:36:12 1.200 |
205 |
+@@ -2901,6 +2901,7 @@ |
206 |
+ const char *name; |
207 |
+ const char **nlist = 0; |
208 |
+ char *tildep = 0; |
209 |
++ int globme = 1; |
210 |
+ #ifndef NO_ARCHIVES |
211 |
+ char *arname = 0; |
212 |
+ char *memname = 0; |
213 |
+@@ -3109,32 +3110,40 @@ |
214 |
+ } |
215 |
+ #endif /* !NO_ARCHIVES */ |
216 |
+ |
217 |
+- switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl)) |
218 |
+- { |
219 |
+- case GLOB_NOSPACE: |
220 |
+- fatal (NILF, _("virtual memory exhausted")); |
221 |
+- |
222 |
+- case 0: |
223 |
+- /* Success. */ |
224 |
+- i = gl.gl_pathc; |
225 |
+- nlist = (const char **)gl.gl_pathv; |
226 |
+- break; |
227 |
+- |
228 |
+- case GLOB_NOMATCH: |
229 |
+- /* If we want only existing items, skip this one. */ |
230 |
+- if (flags & PARSEFS_EXISTS) |
231 |
+- { |
232 |
+- i = 0; |
233 |
+- break; |
234 |
+- } |
235 |
+- /* FALLTHROUGH */ |
236 |
+- |
237 |
+- default: |
238 |
+- /* By default keep this name. */ |
239 |
++ /* glob() is expensive: don't call it unless we need to. */ |
240 |
++ if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL) |
241 |
++ { |
242 |
++ globme = 0; |
243 |
+ i = 1; |
244 |
+ nlist = &name; |
245 |
+- break; |
246 |
+- } |
247 |
++ } |
248 |
++ else |
249 |
++ switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl)) |
250 |
++ { |
251 |
++ case GLOB_NOSPACE: |
252 |
++ fatal (NILF, _("virtual memory exhausted")); |
253 |
++ |
254 |
++ case 0: |
255 |
++ /* Success. */ |
256 |
++ i = gl.gl_pathc; |
257 |
++ nlist = (const char **)gl.gl_pathv; |
258 |
++ break; |
259 |
++ |
260 |
++ case GLOB_NOMATCH: |
261 |
++ /* If we want only existing items, skip this one. */ |
262 |
++ if (flags & PARSEFS_EXISTS) |
263 |
++ { |
264 |
++ i = 0; |
265 |
++ break; |
266 |
++ } |
267 |
++ /* FALLTHROUGH */ |
268 |
++ |
269 |
++ default: |
270 |
++ /* By default keep this name. */ |
271 |
++ i = 1; |
272 |
++ nlist = &name; |
273 |
++ break; |
274 |
++ } |
275 |
+ |
276 |
+ /* For each matched element, add it to the list. */ |
277 |
+ while (i-- > 0) |
278 |
+@@ -3174,7 +3183,8 @@ |
279 |
+ #endif /* !NO_ARCHIVES */ |
280 |
+ NEWELT (concat (2, prefix, nlist[i])); |
281 |
+ |
282 |
+- globfree (&gl); |
283 |
++ if (globme) |
284 |
++ globfree (&gl); |
285 |
+ |
286 |
+ #ifndef NO_ARCHIVES |
287 |
+ if (arname) |
288 |
|
289 |
diff --git a/sys-devel/make/files/make-3.82-long-cmdline.patch b/sys-devel/make/files/make-3.82-long-cmdline.patch |
290 |
new file mode 100644 |
291 |
index 0000000..f8a3ccc |
292 |
--- /dev/null |
293 |
+++ b/sys-devel/make/files/make-3.82-long-cmdline.patch |
294 |
@@ -0,0 +1,105 @@ |
295 |
+http://bugs.gentoo.org/301116 |
296 |
+http://bugs.gentoo.org/300867 |
297 |
+ |
298 |
+tweaked a little to avoid regenerating autotools, then rebased onto make-3.82 |
299 |
+ |
300 |
+2009-07-29 Ralf Wildenhues <Ralf.Wildenhues@×××.de> |
301 |
+ |
302 |
+ * configure.in: Check for sys/user.h and linux/binfmts.h |
303 |
+ headers. |
304 |
+ * job.c: Include them if available. |
305 |
+ (construct_command_argv_internal): When constructing the command |
306 |
+ line with 'sh -c', use multiple arguments together with eval |
307 |
+ expansion to evade the Linux per-argument length limit |
308 |
+ MAX_ARG_STRLEN if it is defined. |
309 |
+ Problem reported against Automake by Xan Lopez <xan@×××××.org>. |
310 |
+ |
311 |
+--- job.c.orig 2010-01-15 18:36:53.000000000 +0200 |
312 |
++++ job.c 2010-01-15 18:41:09.000000000 +0200 |
313 |
+@@ -29,6 +29,15 @@ |
314 |
+ |
315 |
+ #include <string.h> |
316 |
+ |
317 |
++#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */ |
318 |
++#include <sys/user.h> |
319 |
++#include <unistd.h> |
320 |
++#ifndef PAGE_SIZE |
321 |
++#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) |
322 |
++#endif |
323 |
++#include <linux/binfmts.h> |
324 |
++#endif |
325 |
++ |
326 |
+ /* Default shell to use. */ |
327 |
+ #ifdef WINDOWS32 |
328 |
+ #include <windows.h> |
329 |
+@@ -2697,6 +2702,15 @@ |
330 |
+ argument list. */ |
331 |
+ |
332 |
+ unsigned int shell_len = strlen (shell); |
333 |
++#ifdef MAX_ARG_STRLEN |
334 |
++ static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ "; |
335 |
++#define ARG_NUMBER_DIGITS 5 |
336 |
++#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4 \ |
337 |
++ + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2)) |
338 |
++#else |
339 |
++#define EVAL_LEN 0 |
340 |
++#endif |
341 |
++ char *args_ptr; |
342 |
+ unsigned int line_len = strlen (line); |
343 |
+ unsigned int sflags_len = strlen (shellflags); |
344 |
+ char *command_ptr = NULL; /* used for batch_mode_shell mode */ |
345 |
+@@ -2700,7 +2700,7 @@ |
346 |
+ } |
347 |
+ |
348 |
+ new_line = alloca (shell_len + 1 + sflags_len + 1 |
349 |
+- + (line_len*2) + 1); |
350 |
++ + (line_len*2) + 1 + EVAL_LEN); |
351 |
+ ap = new_line; |
352 |
+ memcpy (ap, shell, shell_len); |
353 |
+ ap += shell_len; |
354 |
+@@ -2712,6 +2727,30 @@ |
355 |
+ ap += sflags_len; |
356 |
+ *(ap++) = ' '; |
357 |
+ command_ptr = ap; |
358 |
++ |
359 |
++#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN) |
360 |
++ if (unixy_shell && line_len > MAX_ARG_STRLEN) |
361 |
++ { |
362 |
++ unsigned j; |
363 |
++ memcpy (ap, eval_line, sizeof (eval_line) - 1); |
364 |
++ ap += sizeof (eval_line) - 1; |
365 |
++ for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++) |
366 |
++ ap += sprintf (ap, "\\$\\{%u\\}", j); |
367 |
++ *ap++ = '\\'; |
368 |
++ *ap++ = '"'; |
369 |
++ *ap++ = ' '; |
370 |
++ /* Copy only the first word of SHELL to $0. */ |
371 |
++ for (p = shell; *p != '\0'; ++p) |
372 |
++ { |
373 |
++ if (isspace ((unsigned char)*p)) |
374 |
++ break; |
375 |
++ *ap++ = *p; |
376 |
++ } |
377 |
++ *ap++ = ' '; |
378 |
++ } |
379 |
++#endif |
380 |
++ args_ptr = ap; |
381 |
++ |
382 |
+ for (p = line; *p != '\0'; ++p) |
383 |
+ { |
384 |
+ if (restp != NULL && *p == '\n') |
385 |
+@@ -2760,6 +2799,14 @@ |
386 |
+ } |
387 |
+ #endif |
388 |
+ *ap++ = *p; |
389 |
++ |
390 |
++#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN) |
391 |
++ if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2)) |
392 |
++ { |
393 |
++ *ap++ = ' '; |
394 |
++ args_ptr = ap; |
395 |
++ } |
396 |
++#endif |
397 |
+ } |
398 |
+ if (ap == new_line + shell_len + sflags_len + 2) |
399 |
+ /* Line was empty. */ |
400 |
|
401 |
diff --git a/sys-devel/make/files/make-3.82-memory-corruption.patch b/sys-devel/make/files/make-3.82-memory-corruption.patch |
402 |
new file mode 100644 |
403 |
index 0000000..b28c073 |
404 |
--- /dev/null |
405 |
+++ b/sys-devel/make/files/make-3.82-memory-corruption.patch |
406 |
@@ -0,0 +1,37 @@ |
407 |
+--- function.c 2011/04/18 01:25:20 1.121 |
408 |
++++ function.c 2011/05/02 12:35:01 1.122 |
409 |
+@@ -706,7 +706,7 @@ |
410 |
+ const char *word_iterator = argv[0]; |
411 |
+ char buf[20]; |
412 |
+ |
413 |
+- while (find_next_token (&word_iterator, (unsigned int *) 0) != 0) |
414 |
++ while (find_next_token (&word_iterator, NULL) != 0) |
415 |
+ ++i; |
416 |
+ |
417 |
+ sprintf (buf, "%d", i); |
418 |
+@@ -1133,21 +1133,14 @@ |
419 |
+ |
420 |
+ /* Find the maximum number of words we'll have. */ |
421 |
+ t = argv[0]; |
422 |
+- wordi = 1; |
423 |
+- while (*t != '\0') |
424 |
++ wordi = 0; |
425 |
++ while ((p = find_next_token (&t, NULL)) != 0) |
426 |
+ { |
427 |
+- char c = *(t++); |
428 |
+- |
429 |
+- if (! isspace ((unsigned char)c)) |
430 |
+- continue; |
431 |
+- |
432 |
++ ++t; |
433 |
+ ++wordi; |
434 |
+- |
435 |
+- while (isspace ((unsigned char)*t)) |
436 |
+- ++t; |
437 |
+ } |
438 |
+ |
439 |
+- words = xmalloc (wordi * sizeof (char *)); |
440 |
++ words = xmalloc ((wordi == 0 ? 1 : wordi) * sizeof (char *)); |
441 |
+ |
442 |
+ /* Now assign pointers to each string in the array. */ |
443 |
+ t = argv[0]; |
444 |
|
445 |
diff --git a/sys-devel/make/files/make-3.82-oneshell.patch b/sys-devel/make/files/make-3.82-oneshell.patch |
446 |
new file mode 100644 |
447 |
index 0000000..fbade12 |
448 |
--- /dev/null |
449 |
+++ b/sys-devel/make/files/make-3.82-oneshell.patch |
450 |
@@ -0,0 +1,24 @@ |
451 |
+fix from upstream cvs |
452 |
+ |
453 |
+---------------------------- |
454 |
+revision 1.245 |
455 |
+date: 2010-08-13 22:50:14 -0400; author: psmith; state: Exp; lines: +1 -1; commitid: 4UaslPqQHZTs5wKu; |
456 |
+- Add oneshell to $(.FEATURES) (forgot that!) |
457 |
+ |
458 |
+Index: main.c |
459 |
+=================================================================== |
460 |
+RCS file: /sources/make/make/main.c,v |
461 |
+retrieving revision 1.244 |
462 |
+retrieving revision 1.245 |
463 |
+diff -u -p -r1.244 -r1.245 |
464 |
+--- main.c 10 Aug 2010 07:35:34 -0000 1.244 |
465 |
++++ main.c 14 Aug 2010 02:50:14 -0000 1.245 |
466 |
+@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp |
467 |
+ a macro and some compilers (MSVC) don't like conditionals in macros. */ |
468 |
+ { |
469 |
+ const char *features = "target-specific order-only second-expansion" |
470 |
+- " else-if shortest-stem undefine" |
471 |
++ " else-if shortest-stem undefine oneshell" |
472 |
+ #ifndef NO_ARCHIVES |
473 |
+ " archives" |
474 |
+ #endif |
475 |
|
476 |
diff --git a/sys-devel/make/files/make-3.82-parallel-build.patch b/sys-devel/make/files/make-3.82-parallel-build.patch |
477 |
new file mode 100644 |
478 |
index 0000000..77c5587 |
479 |
--- /dev/null |
480 |
+++ b/sys-devel/make/files/make-3.82-parallel-build.patch |
481 |
@@ -0,0 +1,29 @@ |
482 |
+Patch by Kamil Mierzejewski and Jeremy Devenport to fix parallel |
483 |
+build issues present in GNU make 3.82 |
484 |
+ |
485 |
+diff -u make-3.82-orig/remake.c make-3.82/remake.c |
486 |
+--- make-3.82-orig/remake.c 2010-07-13 03:20:42.000000000 +0200 |
487 |
++++ make-3.82/remake.c 2012-03-21 12:47:52.000000000 +0100 |
488 |
+@@ -301,7 +301,7 @@ |
489 |
+ /* Check for the case where a target has been tried and failed but |
490 |
+ the diagnostics hasn't been issued. If we need the diagnostics |
491 |
+ then we will have to continue. */ |
492 |
+- if (!(f->updated && f->update_status > 0 && !f->dontcare && f->no_diag)) |
493 |
++ if (!(f->updated && f->update_status > 0 && !f->dontcare && f->no_diag) && f->command_state!=cs_not_started ) |
494 |
+ { |
495 |
+ DBF (DB_VERBOSE, _("Pruning file `%s'.\n")); |
496 |
+ return f->command_state == cs_finished ? f->update_status : 0; |
497 |
+@@ -614,6 +614,12 @@ |
498 |
+ d->file->dontcare = file->dontcare; |
499 |
+ } |
500 |
+ |
501 |
++ /* We may have already encountered this file earlier in the same |
502 |
++ * pass before we knew we'd be updating this target. In that |
503 |
++ * case calling update_file now would result in the file being |
504 |
++ * inappropriately pruned so we toggle the considered bit back |
505 |
++ * off first. */ |
506 |
++ d->file->considered = !considered; |
507 |
+ |
508 |
+ dep_status |= update_file (d->file, depth); |
509 |
+ |
510 |
+ |
511 |
|
512 |
diff --git a/sys-devel/make/files/make-3.82-parallel-remake.patch b/sys-devel/make/files/make-3.82-parallel-remake.patch |
513 |
new file mode 100644 |
514 |
index 0000000..a19fe7b |
515 |
--- /dev/null |
516 |
+++ b/sys-devel/make/files/make-3.82-parallel-remake.patch |
517 |
@@ -0,0 +1,39 @@ |
518 |
+fix from upstream cvs |
519 |
+ |
520 |
+---------------------------- |
521 |
+revision 1.247 |
522 |
+date: 2011-09-18 19:39:26 -0400; author: psmith; state: Exp; lines: +5 -3; commitid: 07NxO4T5PiWC82Av; |
523 |
+When we re-exec the master makefile in a jobserver environment, ensure |
524 |
+that MAKEFLAGS is set properly so the re-exec'd make runs in parallel. |
525 |
+See Savannah bug #33873. |
526 |
+ |
527 |
+Index: main.c |
528 |
+=================================================================== |
529 |
+RCS file: /sources/make/make/main.c,v |
530 |
+retrieving revision 1.246 |
531 |
+retrieving revision 1.247 |
532 |
+diff -u -p -r1.246 -r1.247 |
533 |
+--- main.c 29 Aug 2010 23:05:27 -0000 1.246 |
534 |
++++ main.c 18 Sep 2011 23:39:26 -0000 1.247 |
535 |
+@@ -2089,6 +2089,11 @@ main (int argc, char **argv, char **envp |
536 |
+ |
537 |
+ ++restarts; |
538 |
+ |
539 |
++ /* If we're re-exec'ing the first make, put back the number of |
540 |
++ job slots so define_makefiles() will get it right. */ |
541 |
++ if (master_job_slots) |
542 |
++ job_slots = master_job_slots; |
543 |
++ |
544 |
+ /* Reset makeflags in case they were changed. */ |
545 |
+ { |
546 |
+ const char *pv = define_makeflags (1, 1); |
547 |
+@@ -2825,9 +2830,6 @@ define_makeflags (int all, int makefile) |
548 |
+ && (*(unsigned int *) cs->value_ptr == |
549 |
+ *(unsigned int *) cs->noarg_value)) |
550 |
+ ADD_FLAG ("", 0); /* Optional value omitted; see below. */ |
551 |
+- else if (cs->c == 'j') |
552 |
+- /* Special case for `-j'. */ |
553 |
+- ADD_FLAG ("1", 1); |
554 |
+ else |
555 |
+ { |
556 |
+ char *buf = alloca (30); |
557 |
|
558 |
diff --git a/sys-devel/make/make-3.82-r4.ebuild b/sys-devel/make/make-3.82-r4.ebuild |
559 |
new file mode 100644 |
560 |
index 0000000..93dc851 |
561 |
--- /dev/null |
562 |
+++ b/sys-devel/make/make-3.82-r4.ebuild |
563 |
@@ -0,0 +1,49 @@ |
564 |
+# Copyright 1999-2011 Gentoo Foundation |
565 |
+# Distributed under the terms of the GNU General Public License v2 |
566 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/make/make-3.82-r4.ebuild,v 1.1 2011/12/03 00:57:25 vapier Exp $ |
567 |
+ |
568 |
+EAPI="2" |
569 |
+ |
570 |
+inherit flag-o-matic eutils |
571 |
+ |
572 |
+DESCRIPTION="Standard tool to compile source trees" |
573 |
+HOMEPAGE="http://www.gnu.org/software/make/make.html" |
574 |
+SRC_URI="mirror://gnu//make/${P}.tar.bz2" |
575 |
+ |
576 |
+LICENSE="GPL-3" |
577 |
+SLOT="0" |
578 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
579 |
+IUSE="nls static" |
580 |
+ |
581 |
+DEPEND="nls? ( sys-devel/gettext )" |
582 |
+RDEPEND="nls? ( virtual/libintl )" |
583 |
+ |
584 |
+src_prepare() { |
585 |
+ epatch "${FILESDIR}"/${P}-archives-many-objs.patch #334889 |
586 |
+ epatch "${FILESDIR}"/${P}-MAKEFLAGS-reexec.patch #31975 |
587 |
+ epatch "${FILESDIR}"/${P}-memory-corruption.patch #355907 |
588 |
+ epatch "${FILESDIR}"/${P}-glob-speedup.patch #382845 |
589 |
+ epatch "${FILESDIR}"/${P}-copy-on-expand.patch |
590 |
+ epatch "${FILESDIR}"/${P}-oneshell.patch |
591 |
+ epatch "${FILESDIR}"/${P}-parallel-build.patch |
592 |
+ epatch "${FILESDIR}"/${P}-parallel-remake.patch |
593 |
+ epatch "${FILESDIR}"/${P}-long-cmdline.patch #300867 #301116 |
594 |
+} |
595 |
+ |
596 |
+src_configure() { |
597 |
+ use static && append-ldflags -static |
598 |
+ econf \ |
599 |
+ --program-prefix=g \ |
600 |
+ $(use_enable nls) |
601 |
+} |
602 |
+ |
603 |
+src_install() { |
604 |
+ emake DESTDIR="${D}" install || die |
605 |
+ dodoc AUTHORS ChangeLog NEWS README* |
606 |
+ if [[ ${USERLAND} == "GNU" ]] ; then |
607 |
+ # we install everywhere as 'gmake' but on GNU systems, |
608 |
+ # symlink 'make' to 'gmake' |
609 |
+ dosym gmake /usr/bin/make |
610 |
+ dosym gmake.1 /usr/share/man/man1/make.1 |
611 |
+ fi |
612 |
+} |