summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/flex/files')
-rw-r--r--sys-devel/flex/files/flex-2.5.33-pic.patch12
-rw-r--r--sys-devel/flex/files/flex-2.5.34-isatty.patch53
-rw-r--r--sys-devel/flex/files/flex-2.5.35-gcc44.patch13
-rw-r--r--sys-devel/flex/files/flex-2.5.35-saneautotools.patch77
-rw-r--r--sys-devel/flex/files/flex-2.5.37-proto.patch27
-rw-r--r--sys-devel/flex/files/flex-2.5.37-tests.patch113
6 files changed, 295 insertions, 0 deletions
diff --git a/sys-devel/flex/files/flex-2.5.33-pic.patch b/sys-devel/flex/files/flex-2.5.33-pic.patch
new file mode 100644
index 000000000000..88ac8b3ce98a
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.33-pic.patch
@@ -0,0 +1,12 @@
+--- Makefile.in 2007-02-06 12:27:32.000000000 +0100
++++ Makefile.in.new 2007-02-06 12:29:50.000000000 +0100
+@@ -993,7 +993,9 @@
+ ecs.o: ecs.c flexdef.h flexint.h
+ gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
+ libmain.o: libmain.c
++ $(COMPILE) -fPIC -DPIC -o libmain.o -c libmain.c
+ libyywrap.o: libyywrap.c
++ $(COMPILE) -fPIC -DPIC -o libyywrap.o -c libyywrap.c
+ main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
+ tables.h tables_shared.h
+ misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
diff --git a/sys-devel/flex/files/flex-2.5.34-isatty.patch b/sys-devel/flex/files/flex-2.5.34-isatty.patch
new file mode 100644
index 000000000000..b397433c5c57
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.34-isatty.patch
@@ -0,0 +1,53 @@
+Declare the isatty prototype all the time ... otherwise packages like
+doxygen and ttmkfdir fail to build.
+
+http://bugs.gentoo.org/119598
+
+--- flex/scan.c
++++ flex/scan.c
+@@ -4179,9 +4179,19 @@
+ yyfree((void *) b );
+ }
+
++#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
+-#ifndef __cplusplus
++#ifdef __cplusplus
++extern "C" {
++#endif
++#ifdef __THROW /* this is a gnuism */
++extern int isatty (int ) __THROW;
++#else
+ extern int isatty (int );
++#endif
+-#endif /* __cplusplus */
++#ifdef __cplusplus
++}
++#endif
++#endif
+
+ /* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+--- flex/skel.c
++++ flex/skel.c
+@@ -2183,9 +2183,19 @@
+ "[[",
+ " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,",
+ " [[",
++ "#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */",
+- "#ifndef __cplusplus",
++ "#ifdef __cplusplus",
++ "extern \"C\" {",
++ "#endif",
++ "#ifdef __THROW /* this is a gnuism */",
++ "extern int isatty M4_YY_PARAMS( int ) __THROW;",
++ "#else",
+ "extern int isatty M4_YY_PARAMS( int );",
++ "#endif",
+- "#endif /* __cplusplus */",
++ "#ifdef __cplusplus",
++ "}",
++ "#endif",
++ "#endif",
+ " ]])",
+ "]])",
+ "%endif",
diff --git a/sys-devel/flex/files/flex-2.5.35-gcc44.patch b/sys-devel/flex/files/flex-2.5.35-gcc44.patch
new file mode 100644
index 000000000000..69045bee9151
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.35-gcc44.patch
@@ -0,0 +1,13 @@
+https://sourceforge.net/tracker/?func=detail&aid=2178663&group_id=97492&atid=618177
+
+diff -Naurp flex-2.5.35-orig/skel.c flex-2.5.35/skel.c
+--- flex-2.5.35-orig/skel.c 2009-03-25 22:21:16.000000000 -0600
++++ flex-2.5.35/skel.c 2009-03-25 22:22:22.000000000 -0600
+@@ -286,6 +286,7 @@ const char *skel[] = {
+ "#include <errno.h>",
+ "#include <cstdlib>",
+ "#include <cstring>",
++ "#include <cstdio>",
+ "/* end standard C++ headers. */",
+ "%endif",
+ "",
diff --git a/sys-devel/flex/files/flex-2.5.35-saneautotools.patch b/sys-devel/flex/files/flex-2.5.35-saneautotools.patch
new file mode 100644
index 000000000000..fd8487a71e83
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.35-saneautotools.patch
@@ -0,0 +1,77 @@
+Index: flex-2.5.35/configure.in
+===================================================================
+--- flex-2.5.35.orig/configure.in
++++ flex-2.5.35/configure.in
+@@ -39,6 +39,7 @@ AM_GNU_GETTEXT_VERSION(0.12)
+ AC_PROG_YACC
+ AM_PROG_LEX
+ AC_PROG_CC
++AM_PROG_CC_C_O
+ AC_PROG_CXX
+ AC_PROG_LN_S
+ AC_PROG_RANLIB
+@@ -103,13 +104,6 @@ AC_HEADER_STDBOOL
+ AC_C_CONST
+ AC_TYPE_SIZE_T
+
+-# Checks for library functions.
+-
+-AC_FUNC_FORK
+-AC_FUNC_MALLOC
+-AC_FUNC_REALLOC
+-AC_CHECK_FUNCS([dup2 isascii memset pow regcomp setlocale strchr strtol])
+-
+ AC_CONFIG_FILES(
+ Makefile
+ doc/Makefile
+Index: flex-2.5.35/Makefile.am
+===================================================================
+--- flex-2.5.35.orig/Makefile.am
++++ flex-2.5.35/Makefile.am
+@@ -127,33 +127,6 @@ LIBS = @LIBINTL@ @LIBS@
+ skel.c: flex.skl mkskel.sh flexint.h tables_shared.h
+ sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c
+
+-# Explicitly describe dependencies.
+-# You can recreate this with `gcc -I. -MM *.c'
+-buf.o: buf.c flexdef.h flexint.h
+-ccl.o: ccl.c flexdef.h flexint.h
+-dfa.o: dfa.c flexdef.h flexint.h tables.h tables_shared.h
+-ecs.o: ecs.c flexdef.h flexint.h
+-scanflags.o: scanflags.c flexdef.h flexint.h
+-gen.o: gen.c flexdef.h flexint.h tables.h tables_shared.h
+-libmain.o: libmain.c
+-libyywrap.o: libyywrap.c
+-main.o: main.c flexdef.h flexint.h version.h options.h scanopt.h \
+- tables.h tables_shared.h
+-misc.o: misc.c flexdef.h flexint.h tables.h tables_shared.h
+-nfa.o: nfa.c flexdef.h flexint.h
+-options.o: options.c options.h scanopt.h flexdef.h flexint.h
+-parse.o: parse.c flexdef.h flexint.h tables.h tables_shared.h
+-scan.o: scan.c flexdef.h flexint.h parse.h
+-scanopt.o: scanopt.c flexdef.h flexint.h scanopt.h
+-skel.o: skel.c flexdef.h flexint.h
+-sym.o: sym.c flexdef.h flexint.h
+-tables.o: tables.c flexdef.h flexint.h tables.h tables_shared.h
+-tables_shared.o: tables_shared.c flexdef.h flexint.h tables.h \
+- tables_shared.h
+-tblcmp.o: tblcmp.c flexdef.h flexint.h
+-yylex.o: yylex.c flexdef.h flexint.h parse.h
+-filter.o: filter.c flexdef.h flexint.h
+-
+ # Create the ChangeLog, but only if we're inside a cvs working directory
+
+ ChangeLog: $(srcdir)/tools/cvsauthors $(srcdir)/tools/cvs2cl.pl
+Index: flex-2.5.35/tests/test-pthread/Makefile.am
+===================================================================
+--- flex-2.5.35.orig/tests/test-pthread/Makefile.am
++++ flex-2.5.35/tests/test-pthread/Makefile.am
+@@ -27,7 +27,7 @@ CLEANFILES = scanner.c scanner.h parser.
+ OBJS = scanner.o # parser.o
+
+ AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
+-LDFLAGS = -lpthread
++LOADLIBES = -lpthread
+ #LFLAGS = --header="scanner.h"
+ #YFLAGS = --defines --output=parser.c
+
diff --git a/sys-devel/flex/files/flex-2.5.37-proto.patch b/sys-devel/flex/files/flex-2.5.37-proto.patch
new file mode 100644
index 000000000000..5d3c30ff18d2
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.37-proto.patch
@@ -0,0 +1,27 @@
+From 0f9eb0b8455f843daebf0f3dababeee7f3cde48b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 4 Aug 2012 15:46:38 -0400
+Subject: [PATCH] add prototype for lerrsf_fatal
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ flexdef.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/flexdef.h b/flexdef.h
+index 0e81410..046dd9a 100644
+--- a/flexdef.h
++++ b/flexdef.h
+@@ -908,6 +908,9 @@ extern void lerrif PROTO ((const char *, int));
+ /* Report an error message formatted with one string argument. */
+ extern void lerrsf PROTO ((const char *, const char *));
+
++/* Like lerrsf, but also exit after displaying message. */
++extern void lerrsf_fatal PROTO ((const char *, const char *));
++
+ /* Spit out a "#line" statement. */
+ extern void line_directive_out PROTO ((FILE *, int));
+
+--
+1.7.9.7
+
diff --git a/sys-devel/flex/files/flex-2.5.37-tests.patch b/sys-devel/flex/files/flex-2.5.37-tests.patch
new file mode 100644
index 000000000000..56d441a351e6
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.37-tests.patch
@@ -0,0 +1,113 @@
+From 095b0bf0a730d46d301c0e2fb2e7af40caeb2c9b Mon Sep 17 00:00:00 2001
+From: Elias Pipping <pipping@users.sourceforge.net>
+Date: Mon, 6 Aug 2012 15:13:23 -0400
+Subject: [PATCH] Fix two tests to pass under bison 2.6
+
+Given that bison is moving forward with the %parse-param instead of
+YYPARSE_PARAM syntax, it makes sense to switch over to using the new style
+declaration. In particular, this means that flex scanners that use bison
+features will now require bison 2.6 or higher.
+
+Signed-off-by: Will Estes <westes575@gmail.com>
+---
+ tests/test-bison-yylloc/main.c | 2 --
+ tests/test-bison-yylloc/parser.y | 6 +++---
+ tests/test-bison-yylval/main.c | 2 --
+ tests/test-bison-yylval/parser.y | 6 ++----
+ 4 files changed, 5 insertions(+), 11 deletions(-)
+
+diff --git a/tests/test-bison-yylloc/main.c b/tests/test-bison-yylloc/main.c
+index 082c88c..24568a9 100644
+--- a/tests/test-bison-yylloc/main.c
++++ b/tests/test-bison-yylloc/main.c
+@@ -24,8 +24,6 @@
+ #include "parser.h"
+ #include "scanner.h"
+
+-extern int testparse(yyscan_t);
+-
+ int main ( int argc, char** argv )
+ {
+ yyscan_t scanner;
+diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y
+index aaee976..e8f4e56 100644
+--- a/tests/test-bison-yylloc/parser.y
++++ b/tests/test-bison-yylloc/parser.y
+@@ -21,6 +21,8 @@
+ * PURPOSE.
+ */
+
++%parse-param { void* scanner }
++
+ /*
+ How to compile:
+ bison --defines --output-file="parser.c" --name-prefix="test" parser.y
+@@ -32,10 +34,8 @@
+ #include "config.h"
+
+ #define YYERROR_VERBOSE 1
+-#define YYPARSE_PARAM scanner
+ #define YYLEX_PARAM scanner
+
+-int yyerror(char* msg);
+ extern int testget_lineno(void*);
+
+
+@@ -89,7 +89,7 @@ line:
+
+ %%
+
+-int yyerror(char* msg) {
++int yyerror(void* scanner, char* msg) {
+ fprintf(stderr,"%s\n",msg);
+ return 0;
+ }
+diff --git a/tests/test-bison-yylval/main.c b/tests/test-bison-yylval/main.c
+index 165e672..30c4314 100644
+--- a/tests/test-bison-yylval/main.c
++++ b/tests/test-bison-yylval/main.c
+@@ -24,8 +24,6 @@
+ #include "parser.h"
+ #include "scanner.h"
+
+-extern int testparse(yyscan_t);
+-
+ int main ( int argc, char** argv )
+ {
+ yyscan_t scanner;
+diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y
+index 77bac87..0ffdb89 100644
+--- a/tests/test-bison-yylval/parser.y
++++ b/tests/test-bison-yylval/parser.y
+@@ -25,6 +25,7 @@
+ How to compile:
+ bison --defines --output-file="parser.c" --name-prefix="test" parser.y
+ */
++%parse-param { void* scanner }
+ %{
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -32,11 +33,8 @@
+ #include "config.h"
+
+ #define YYERROR_VERBOSE 1
+-#define YYPARSE_PARAM scanner
+ #define YYLEX_PARAM scanner
+
+-int yyerror(char* msg);
+-
+
+ /* A dummy function. A check against seg-faults in yylval->str. */
+ int process_text(char* s) {
+@@ -76,7 +74,7 @@ starttag: LT TAGNAME GT { process_text($2); free($2);} ;
+ endtag: LTSLASH TAGNAME GT { process_text($2);free($2);} ;
+ %%
+
+-int yyerror(char* msg) {
++int yyerror(void* scanner, char* msg) {
+ fprintf(stderr,"%s\n",msg);
+ return 0;
+ }
+--
+1.7.9.7
+