```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
20 lines
810 B
Diff
20 lines
810 B
Diff
Description: Fix parsing when built with flex 2.6
|
|
Origin: https://sourceforge.net/p/spimsimulator/code/679/
|
|
Bug: https://sourceforge.net/p/spimsimulator/bugs/66/
|
|
Bug-Debian: https://bugs.debian.org/860011
|
|
Last-Update: 2017-04-20
|
|
|
|
Index: spim-8.0+dfsg/CPU/scanner.l
|
|
===================================================================
|
|
--- a/CPU/scanner.l
|
|
+++ b/CPU/scanner.l
|
|
@@ -316,7 +316,8 @@ initialize_scanner (FILE *in_file)
|
|
yyin = in_file;
|
|
#ifdef FLEX_SCANNER
|
|
yyrestart(in_file);
|
|
-#if (YY_FLEX_MAJOR_VERSION==2 && YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33)
|
|
+#define YY_FLEX_VERSION (YY_FLEX_MAJOR_VERSION * 1000 + YY_FLEX_MINOR_VERSION * 100 + YY_FLEX_SUBMINOR_VERSION)
|
|
+#if YY_FLEX_VERSION >= 2533
|
|
/* flex 2.5.33 flipped the polarity of this flag (sigh) */
|
|
yy_init = 0;
|
|
#else
|