From ce059d82f9dde19a8a4a286f8b44061e4af32a11 Mon Sep 17 00:00:00 2001 From: Nicholas Vinson Date: Mon, 2 Jan 2017 10:33:49 -0800 Subject: sci-libs/scotch: Add flex-2.6.3 compatibility patch Flex-2.6.3 changed and is different from the behavior shown in 2.6.1 and older. The behaviorial differences prevent scotch from building with 2.6.3. This patch adds code to detect 2.6.3 or newer and apply fixes that correctly reflect the new flex behavior. Package-Manager: Portage-2.3.3, Repoman-2.3.1 Closes: https://github.com/gentoo/gentoo/pull/3307 --- .../scotch/files/scotch-6.0.4-flex-2.6.3-fix.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sci-libs/scotch/files/scotch-6.0.4-flex-2.6.3-fix.patch (limited to 'sci-libs/scotch/files/scotch-6.0.4-flex-2.6.3-fix.patch') diff --git a/sci-libs/scotch/files/scotch-6.0.4-flex-2.6.3-fix.patch b/sci-libs/scotch/files/scotch-6.0.4-flex-2.6.3-fix.patch new file mode 100644 index 000000000000..c1301f57076a --- /dev/null +++ b/sci-libs/scotch/files/scotch-6.0.4-flex-2.6.3-fix.patch @@ -0,0 +1,33 @@ +--- scotch_6.0.4/src/libscotch/parser_ll.l.old 2017-01-02 08:42:41.216249106 -0800 ++++ scotch-6.0.4-r1/work/scotch_6.0.4/src/libscotch/parser_ll.l 2017-01-02 09:50:14.572579444 -0800 +@@ -84,20 +84,29 @@ + #endif /* X_OSDOS */ + + #ifdef FLEX_SCANNER + #define YY_ALWAYS_INTERACTIVE 1 /* Set the parser as interactive and read one char at a time */ + #define YY_INPUT(buf,result,max_size) { int c = stratParserInput (); result = (c == 0) ? YY_NULL : ((buf)[0] = c, 1); } ++ ++# if YY_FLEX_MAJOR_VERSION > 2 || \ ++ YY_FLEX_MAJOR_VERSION == 2 && YY_FLEX_MINOR_VERSION > 6 || \ ++ YY_FLEX_MAJOR_VERSION == 2 && YY_FLEX_MINOR_VERSION == 6 && YY_FLEX_SUBMINOR_VERSION >= 3 ++ int yywrap() { return 1; } ++# else ++# define yywrap() (1) /* Always return end-of-file on end-of-string */ ++# endif ++ + #else /* FLEX_SCANNER */ + #undef getc /* Redirect I/O functions */ + #define getc yygetc + #undef yygetc + #define yygetc(stream) stratParserInput () ++#define yywrap() (1) /* Always return end-of-file on end-of-string */ + #endif /* FLEX_SCANNER */ + + #define YY_NO_UNPUT /* No prototype for yyunput as not defined */ + #define YY_SKIP_YYWRAP /* No prototype for yywrap as defined as macro */ +-#define yywrap() (1) /* Always return end-of-file on end-of-string */ + + /* + ** The static variables. + */ + -- cgit v1.2.3-65-gdbad