Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=multilib.git;a=commitdiff;h=fa522dc0d302a540e4dd6feae0063b8f415af2c6
commit fa522dc0d302a540e4dd6feae0063b8f415af2c6 Author: crazy <[email protected]> Date: Mon Jan 29 13:44:28 2018 +0100 make-4.2.90-2-x86_64 * revert some 'commint from hell' which breaks world at least for peoples generates some scripts , files , code from make rules.. in newer make eg: $(shell, echo '#') is valid while in stable make is not an need be escaped eg \# , however old an new rules doesn't like each other and so it generates crap. It is possible to use both by doing something like : FOO := \# $(.... echo '$FOO') *for each var* but I'm not going to rewrite that all over the place.. diff --git a/source/devel/make/0001-Revert-Use-strchr-for-simple-case-of-find_char_unquo.patch b/source/devel/make/0001-Revert-Use-strchr-for-simple-case-of-find_char_unquo.patch new file mode 100644 index 0000000..c1f4840 --- /dev/null +++ b/source/devel/make/0001-Revert-Use-strchr-for-simple-case-of-find_char_unquo.patch @@ -0,0 +1,182 @@ +From 13a5e44a2d2c72bea8de8f044161af35021e8783 Mon Sep 17 00:00:00 2001 +From: Your Name <[email protected]> +Date: Mon, 29 Jan 2018 12:57:45 +0100 +Subject: [PATCH 1/2] Revert "Use strchr for simple case of find_char_unquote." + +This reverts commit 0ca31088dc1b7e2d737d5908237e6042f3b42108. +--- + src/read.c | 67 ++++++++++++-------------------------------------------------- + 1 file changed, 13 insertions(+), 54 deletions(-) + +diff --git a/src/read.c b/src/read.c +index db1a42d..29c0ffb 100644 +--- a/src/read.c ++++ b/src/read.c +@@ -154,8 +154,7 @@ static void record_target_var (struct nameseq *filenames, char *defn, + static enum make_word_type get_next_mword (char *buffer, char *delim, + char **startp, unsigned int *length); + static void remove_comments (char *line); +-static char *find_map_unquote (char *string, int map); +-static char *find_char_unquote (char *string, int stop); ++static char *find_char_unquote (char *string, int map); + static char *unescape_char (char *string, int c); + + +@@ -1003,7 +1002,7 @@ eval (struct ebuffer *ebuf, int set_default) + + /* Search the line for an unquoted ; that is not after an + unquoted #. */ +- cmdleft = find_map_unquote (line, MAP_SEMI|MAP_COMMENT|MAP_VARIABLE); ++ cmdleft = find_char_unquote (line, MAP_SEMI|MAP_COMMENT|MAP_VARIABLE); + if (cmdleft != 0 && *cmdleft == '#') + { + /* We found a comment before a semicolon. */ +@@ -1050,7 +1049,7 @@ eval (struct ebuffer *ebuf, int set_default) + if (cmdleft == 0) + { + /* Look for a semicolon in the expanded line. */ +- cmdleft = find_char_unquote (p2, ';'); ++ cmdleft = find_char_unquote (p2, MAP_SEMI); + + if (cmdleft != 0) + { +@@ -1077,7 +1076,7 @@ eval (struct ebuffer *ebuf, int set_default) + } + } + +- colonp = find_char_unquote (p2, ':'); ++ colonp = find_char_unquote (p2, MAP_COLON); + #ifdef HAVE_DOS_PATHS + /* The drive spec brain-damage strikes again... */ + /* Note that the only separators of targets in this context +@@ -1086,7 +1085,7 @@ eval (struct ebuffer *ebuf, int set_default) + while (colonp && (colonp[1] == '/' || colonp[1] == '\\') && + colonp > p2 && isalpha ((unsigned char)colonp[-1]) && + (colonp == p2 + 1 || strchr (" \t(", colonp[-2]) != 0)) +- colonp = find_char_unquote (colonp + 1, ':'); ++ colonp = find_char_unquote (colonp + 1, MAP_COLON); + #endif + if (colonp != 0) + break; +@@ -1179,7 +1178,7 @@ eval (struct ebuffer *ebuf, int set_default) + + /* This is a normal target, _not_ a target-specific variable. + Unquote any = in the dependency list. */ +- find_char_unquote (lb_next, '='); ++ find_char_unquote (lb_next, MAP_EQUALS); + + /* Remember the command prefix for this target. */ + prefix = cmd_prefix; +@@ -1197,7 +1196,7 @@ eval (struct ebuffer *ebuf, int set_default) + /* Look for a semicolon in the expanded line. */ + if (cmdleft == 0) + { +- cmdleft = find_char_unquote (p2, ';'); ++ cmdleft = find_char_unquote (p2, MAP_SEMI); + if (cmdleft != 0) + *(cmdleft++) = '\0'; + } +@@ -1401,7 +1400,7 @@ remove_comments (char *line) + { + char *comment; + +- comment = find_map_unquote (line, MAP_COMMENT|MAP_VARIABLE); ++ comment = find_char_unquote (line, MAP_COMMENT|MAP_VARIABLE); + + if (comment != 0) + /* Cut off the line at the #. */ +@@ -2232,7 +2231,7 @@ record_files (struct nameseq *filenames, const char *pattern, + are skipped, even if the contain STOPMAP characters. */ + + static char * +-find_map_unquote (char *string, int stopmap) ++find_char_unquote (char *string, int stopmap) + { + unsigned int string_len = 0; + char *p = string; +@@ -2313,46 +2312,6 @@ find_map_unquote (char *string, int stopmap) + return 0; + } + +-static char * +-find_char_unquote (char *string, int stop) +-{ +- unsigned int string_len = 0; +- char *p = string; +- +- while (1) +- { +- p = strchr(p, stop); +- +- if (!p) +- return NULL; +- +- if (p > string && p[-1] == '\\') +- { +- /* Search for more backslashes. */ +- int i = -2; +- while (&p[i] >= string && p[i] == '\\') +- --i; +- ++i; +- /* Only compute the length if really needed. */ +- if (string_len == 0) +- string_len = strlen (string); +- /* The number of backslashes is now -I. +- Copy P over itself to swallow half of them. */ +- memmove (&p[i], &p[i/2], (string_len - (p - string)) - (i/2) + 1); +- p += i/2; +- if (i % 2 == 0) +- /* All the backslashes quoted each other; the STOPCHAR was +- unquoted. */ +- return p; +- +- /* The STOPCHAR was quoted by a backslash. Look for another. */ +- } +- else +- /* No backslash in sight. */ +- return p; +- } +-} +- + /* Unescape a character in a string. The string is compressed onto itself. */ + + static char * +@@ -2406,7 +2365,7 @@ unescape_char (char *string, int c) + char * + find_percent (char *pattern) + { +- return find_char_unquote (pattern, '%'); ++ return find_char_unquote (pattern, MAP_PERCENT); + } + + /* Search STRING for an unquoted % and handle quoting. Returns a pointer to +@@ -3111,7 +3070,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopmap, + /* There are names left, so find the end of the next name. + Throughout this iteration S points to the start. */ + s = p; +- p = find_map_unquote (p, findmap); ++ p = find_char_unquote (p, findmap); + + #ifdef VMS + /* convert comma separated list to space separated */ +@@ -3121,7 +3080,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopmap, + #ifdef _AMIGA + /* If we stopped due to a device name, skip it. */ + if (p && p != s+1 && p[0] == ':') +- p = find_map_unquote (p+1, findmap); ++ p = find_char_unquote (p+1, findmap); + #endif + #ifdef HAVE_DOS_PATHS + /* If we stopped due to a drive specifier, skip it. +@@ -3129,7 +3088,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopmap, + doesn't allow path names with spaces. */ + if (p && p == s+1 && p[0] == ':' + && isalpha ((unsigned char)s[0]) && STOP_SET (p[1], MAP_DIRSEP)) +- p = find_map_unquote (p+1, findmap); ++ p = find_char_unquote (p+1, findmap); + #endif + + if (!p) +-- +2.16.1 + diff --git a/source/devel/make/0002-Revert-SV-20513-Un-escaped-are-not-comments-in-funct.patch b/source/devel/make/0002-Revert-SV-20513-Un-escaped-are-not-comments-in-funct.patch new file mode 100644 index 0000000..9294314 --- /dev/null +++ b/source/devel/make/0002-Revert-SV-20513-Un-escaped-are-not-comments-in-funct.patch @@ -0,0 +1,180 @@ +From e1ca2aab0d8976c120680056fc272323971c765b Mon Sep 17 00:00:00 2001 +From: Your Name <[email protected]> +Date: Mon, 29 Jan 2018 13:01:34 +0100 +Subject: [PATCH 2/2] Revert "[SV 20513] Un-escaped # are not comments in + function invocations" + +This reverts commit c6966b323811c37acedff05b576b907b06aea5f4. +--- + NEWS | 4 ---- + src/main.c | 2 +- + src/read.c | 25 ++++++++++++------------- + tests/scripts/features/escape | 18 ------------------ + tests/scripts/functions/guile | 14 -------------- + tests/scripts/functions/shell | 6 ++++-- + 6 files changed, 17 insertions(+), 52 deletions(-) + +diff --git a/NEWS b/NEWS +index aa01191..3f28f21 100644 +--- a/NEWS ++++ b/NEWS +@@ -42,10 +42,6 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set + value to the load value requested. This allows usage such as "-j -lN" for + N-processor systems with less fear of overload. + Patch provided by Sven C. Dack <[email protected]> +- +-* Rework the source distribution to move source files into the src/* +- subdirectory. This aligns with modern best practices in GNU. +- + * The previous limit of 63 jobs under -jN on MS-Windows is now + increased to 4095. That limit includes the subprocess started by + the $(shell) function. +diff --git a/src/main.c b/src/main.c +index 9fa2c84..3b28646 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1314,7 +1314,7 @@ main (int argc, char **argv, char **envp) + some compilers (MSVC) don't like conditionals in macros. */ + { + const char *features = "target-specific order-only second-expansion" +- " else-if shortest-stem undefine oneshell nocomment" ++ " else-if shortest-stem undefine oneshell" + #ifndef NO_ARCHIVES + " archives" + #endif +diff --git a/src/read.c b/src/read.c +index 29c0ffb..ccd857b 100644 +--- a/src/read.c ++++ b/src/read.c +@@ -1392,15 +1392,14 @@ eval (struct ebuffer *ebuf, int set_default) + + + /* Remove comments from LINE. +- This will also remove backslashes that escape things. +- It ignores comment characters that appear inside variable references. */ ++ This is done by copying the text at LINE onto itself. */ + + static void + remove_comments (char *line) + { + char *comment; + +- comment = find_char_unquote (line, MAP_COMMENT|MAP_VARIABLE); ++ comment = find_char_unquote (line, MAP_COMMENT); + + if (comment != 0) + /* Cut off the line at the #. */ +@@ -2221,27 +2220,27 @@ record_files (struct nameseq *filenames, const char *pattern, + } + } + +-/* Search STRING for an unquoted STOPMAP. +- Backslashes quote elements from STOPMAP and backslash. +- Quoting backslashes are removed from STRING by compacting it into itself. +- Returns a pointer to the first unquoted STOPCHAR if there is one, or nil if +- there are none. ++/* Search STRING for an unquoted STOPCHAR or blank (if BLANK is nonzero). ++ Backslashes quote STOPCHAR, blanks if BLANK is nonzero, and backslash. ++ Quoting backslashes are removed from STRING by compacting it into ++ itself. Returns a pointer to the first unquoted STOPCHAR if there is ++ one, or nil if there are none. STOPCHARs inside variable references are ++ ignored if IGNOREVARS is true. + +- If MAP_VARIABLE is set, then the complete contents of variable references +- are skipped, even if the contain STOPMAP characters. */ ++ STOPCHAR _cannot_ be '$' if IGNOREVARS is true. */ + + static char * +-find_char_unquote (char *string, int stopmap) ++find_char_unquote (char *string, int map) + { + unsigned int string_len = 0; + char *p = string; + + /* Always stop on NUL. */ +- stopmap |= MAP_NUL; ++ map |= MAP_NUL; + + while (1) + { +- while (! STOP_SET (*p, stopmap)) ++ while (! STOP_SET (*p, map)) + ++p; + + if (*p == '\0') +diff --git a/tests/scripts/features/escape b/tests/scripts/features/escape +index 5157a97..562fb49 100644 +--- a/tests/scripts/features/escape ++++ b/tests/scripts/features/escape +@@ -81,23 +81,5 @@ all: ..\foo + !, + '', ": '..\\foo'\n"); + +-# Test escaped comments in variable assignments +-run_make_test(q! +-self = $1 +-foo := $(call self,#foo#)#foo +-bar := $(call self,\#bar\#)#bar +-all:;@echo '$(foo) $(bar)' +-!, +- '',"#foo# \\#bar\\#"); +- +-# Test escaped comments in variable assignments in a variable +-run_make_test(q! +-C = \# +-self = $1 +-foo := $(call self,$Cfoo$C)#foo +-all:;@echo '$(foo)' +-!, +- '',"#foo#"); +- + # This tells the test driver that the perl test script executed properly. + 1; +diff --git a/tests/scripts/functions/guile b/tests/scripts/functions/guile +index 415827a..c63bec9 100644 +--- a/tests/scripts/functions/guile ++++ b/tests/scripts/functions/guile +@@ -36,20 +36,6 @@ x:;@echo '$(guile #f)'; \ + !, + '', "\n#t\nc\n1234\nfoo\nbar\na b\na b c d 1 2 3"); + +-# Verify guile functions in variables -- SV 43378 +-run_make_test(q! +-res := $(guile #f) \ +- $(guile #t) \ +- $(guile #\c) \ +- $(guile 1234) \ +- $(guile 'foo) \ +- $(guile "bar") \ +- $(guile (cons 'a 'b)) \ +- $(guile '(a b (c . d) 1 (2) 3)) +-x:;@echo '$(res)' +-!, +- '', " #t c 1234 foo bar a b a b c d 1 2 3"); +- + # Verify the gmk-expand function + run_make_test(q! + VAR = $(guile (gmk-expand "$(shell echo hi)")) +diff --git a/tests/scripts/functions/shell b/tests/scripts/functions/shell +index 6e44608..8f57b3b 100644 +--- a/tests/scripts/functions/shell ++++ b/tests/scripts/functions/shell +@@ -34,11 +34,13 @@ all: ; @echo SIG=$(SIG) + ','','SIG=130'); + + # Test unescaped comment characters in shells. Savannah bug #20513 +-run_make_test(q! ++if ($all_tests) { ++ run_make_test(q! + FOO := $(shell echo '#') + foo: ; echo '$(FOO)' + !, +- '', "echo '#'\n#\n"); ++ '', "#\n"); ++} + + # Test shells inside exported environment variables. + # This is the test that fails if we try to put make exported variables into +-- +2.16.1 + diff --git a/source/devel/make/0003-Revert-Remove-MAP_PERCENT-as-strchr-is-faster.patch b/source/devel/make/0003-Revert-Remove-MAP_PERCENT-as-strchr-is-faster.patch new file mode 100644 index 0000000..5abd79e --- /dev/null +++ b/source/devel/make/0003-Revert-Remove-MAP_PERCENT-as-strchr-is-faster.patch @@ -0,0 +1,77 @@ +From a9fc812659a6b9dd780a38e220292f09b2f30ae7 Mon Sep 17 00:00:00 2001 +From: foo <[email protected]> +Date: Mon, 29 Jan 2018 13:31:15 +0100 +Subject: [PATCH 3/3] Revert "Remove MAP_PERCENT as strchr is faster." + +This reverts commit 98602961981b6cc38fe20d067767d1aa25e124b8. +--- + src/main.c | 1 + + src/makeint.h | 7 ++++--- + src/read.c | 10 +++++----- + 3 files changed, 10 insertions(+), 8 deletions(-) + +diff --git a/src/main.c b/src/main.c +index 3b28646..8bb9522 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -632,6 +632,7 @@ initialize_stopchar_map (void) + stopchar_map[(int)';'] = MAP_SEMI; + stopchar_map[(int)'='] = MAP_EQUALS; + stopchar_map[(int)':'] = MAP_COLON; ++ stopchar_map[(int)'%'] = MAP_PERCENT; + stopchar_map[(int)'|'] = MAP_PIPE; + stopchar_map[(int)'.'] = MAP_DOT | MAP_USERFUNC; + stopchar_map[(int)','] = MAP_COMMA; +diff --git a/src/makeint.h b/src/makeint.h +index 2adab63..a4dc76c 100644 +--- a/src/makeint.h ++++ b/src/makeint.h +@@ -398,9 +398,10 @@ extern int unixy_shell; + #define MAP_EQUALS 0x0020 + #define MAP_COLON 0x0040 + #define MAP_VARSEP 0x0080 +-#define MAP_PIPE 0x0100 +-#define MAP_DOT 0x0200 +-#define MAP_COMMA 0x0400 ++#define MAP_PERCENT 0x0100 ++#define MAP_PIPE 0x0200 ++#define MAP_DOT 0x0400 ++#define MAP_COMMA 0x0800 + + /* These are the valid characters for a user-defined function. */ + #define MAP_USERFUNC 0x2000 +diff --git a/src/read.c b/src/read.c +index ccd857b..765e0b6 100644 +--- a/src/read.c ++++ b/src/read.c +@@ -2387,9 +2387,10 @@ find_percent_cached (const char **string) + + while (1) + { +- p = strchr(p, '%'); ++ while (! STOP_SET (*p, MAP_PERCENT|MAP_NUL)) ++ ++p; + +- if (!p) ++ if (*p == '\0') + break; + + /* See if this % is escaped with a backslash; if not we're done. */ +@@ -2435,12 +2436,11 @@ find_percent_cached (const char **string) + if (new) + { + *string = strcache_add (*string); +- if (p) +- p = *string + (p - new); ++ p = *string + (p - new); + } + + /* If we didn't find a %, return NULL. Otherwise return a ptr to it. */ +- return p; ++ return (*p == '\0') ? NULL : p; + } + + /* Find the next line of text in an eval buffer, combining continuation lines +-- +2.16.1 + diff --git a/source/devel/make/FrugalBuild b/source/devel/make/FrugalBuild index b3bdf5d..6c7ec12 100644 --- a/source/devel/make/FrugalBuild +++ b/source/devel/make/FrugalBuild @@ -3,7 +3,7 @@ pkgname=make pkgver=4.2.90 -pkgrel=1 +pkgrel=2 pkgdesc="GNU make utility to maintain groups of programs" url="http://www.gnu.org/software/make" depends=('glibc>=2.26.9000-3' 'bash') @@ -12,8 +12,14 @@ groups=('devel' 'devel-core') archs=("x86_64") Fup2gnugz #source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz) -source=(http://ftp.frugalware.org/pub/other/people/crazy/$pkgname-$pkgver.tar.xz) -sha1sums=('502282a749bd6fc67d7f6d56088cd3a44ab67d9c') +source=(http://ftp.frugalware.org/pub/other/people/crazy/$pkgname-$pkgver.tar.xz + 0001-Revert-Use-strchr-for-simple-case-of-find_char_unquo.patch + 0002-Revert-SV-20513-Un-escaped-are-not-comments-in-funct.patch + 0003-Revert-Remove-MAP_PERCENT-as-strchr-is-faster.patch) +sha1sums=('502282a749bd6fc67d7f6d56088cd3a44ab67d9c' \ + '6092b742726ac7e8a0e664665c86b4184c34a443' \ + 'b120d790ba593f4dcfca57875288ac223ff55576' \ + '32e34fb513db110ba69b9f24d2ad6364c63f1747') Fconfopts+=" --disable-silent-rules" _Fbuild_autoreconf="yes" _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
