From 89a672bb76dd4ad20863cdaed6283cd7466693ec313d4cfb7cde3ae1c009c8bd Mon Sep 17 00:00:00 2001 From: Factory Maintainer Date: Tue, 16 Oct 2012 11:16:33 +0000 Subject: [PATCH] Accepting request 138308 from home:coolo:branches:openSUSE:Factory - update to 2.5.37 ** Import flex into git. See git://flex.git.sourceforge.net/gitroot/flex/flex. ** Fix make install target to not fail when the flex++ program is already installed ** New translations from the translation project: de, fi, pl, vi ** various portability fixes that quiet compiler warnings on 64-bit hosts ** various manual fixes, including correcting the name of a %option and updating some simple examples to use ANSI C syntax ** various bug fixes that prevent certain error conditions from persisting when they should not persist ** improvements to the test suite so it behaves better when linking compiled files ** new translations from the translation project: ca, da, es, fi, fr, ga, ko, pt_br, ro, ru, sv, tr, zh_cn ** the flex distribution is now built with automake 1.10.1 and automake 2.61 - add patch flex-2.5.37-notex.patch to compile without texlive - remove patches no longer required: flex-2.5.33-yylineno.patch flex-2.5.34-doc-fix.diff flex-2.5.34-g++44.diff OBS-URL: https://build.opensuse.org/request/show/138308 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/flex?expand=0&rev=12 --- flex-2.5.33-yylineno.patch | 36 ------------- flex-2.5.34-asneeded.patch | 15 ------ flex-2.5.34-doc-fix.diff | 96 --------------------------------- flex-2.5.34-fPIC.patch | 4 +- flex-2.5.34-g++44.diff | 12 ----- flex-2.5.35.tar.bz2 | 3 -- flex-2.5.37-bison-2.6.1-1.patch | 95 ++++++++++++++++++++++++++++++++ flex-2.5.37-notex.patch | 15 ++++++ flex-2.5.37.tar.bz2 | 3 ++ flex.changes | 27 ++++++++++ flex.spec | 35 ++++++------ 11 files changed, 159 insertions(+), 182 deletions(-) delete mode 100644 flex-2.5.33-yylineno.patch delete mode 100644 flex-2.5.34-asneeded.patch delete mode 100644 flex-2.5.34-doc-fix.diff delete mode 100644 flex-2.5.34-g++44.diff delete mode 100644 flex-2.5.35.tar.bz2 create mode 100644 flex-2.5.37-bison-2.6.1-1.patch create mode 100644 flex-2.5.37-notex.patch create mode 100644 flex-2.5.37.tar.bz2 diff --git a/flex-2.5.33-yylineno.patch b/flex-2.5.33-yylineno.patch deleted file mode 100644 index e35f27c..0000000 --- a/flex-2.5.33-yylineno.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- main.c -+++ main.c -@@ -1633,9 +1633,11 @@ - - if (!C_plus_plus && !reentrant) { - outn ("extern int yylineno;"); -- OUT_BEGIN_CODE (); -- outn ("int yylineno = 1;"); -- OUT_END_CODE (); -+ if (do_yylineno) { -+ OUT_BEGIN_CODE (); -+ outn ("int yylineno = 1;"); -+ OUT_END_CODE (); -+ } - } - - if (C_plus_plus) { ---- flex.skl -+++ flex.skl -@@ -80,6 +80,16 @@ - m4preproc_define(`M4_GEN_PREFIX', - ``m4_define(yy[[$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') - -+%# don't use yylineno in non-reentrant scanners when %option yylineno not given -+m4_ifdef( [[M4_YY_REENTRANT]],, -+ [[m4_ifdef( [[M4_YY_USE_LINENO]],, -+ [[ -+ m4_define( [[M4_YY_NO_GET_LINENO]], [[]]) -+ m4_define( [[M4_YY_NO_SET_LINENO]], [[]]) -+ ]]) -+ ]] -+) -+ - %if-c++-only - /* The c++ scanner is a mess. The FlexLexer.h header file relies on the - * following macro. This is required in order to pass the c++-multiple-scanners diff --git a/flex-2.5.34-asneeded.patch b/flex-2.5.34-asneeded.patch deleted file mode 100644 index 7d237d2..0000000 --- a/flex-2.5.34-asneeded.patch +++ /dev/null @@ -1,15 +0,0 @@ -libraries need to be last - -Index: tests/test-pthread/Makefile.am -=================================================================== ---- tests/test-pthread/Makefile.am.orig -+++ tests/test-pthread/Makefile.am -@@ -37,7 +37,7 @@ scanner.c: $(srcdir)/scanner.l - $(FLEX) $(LFLAGS) $< - - $(testname)$(EXEEXT): $(OBJS) -- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES) -+ $(CC) -o $@ $(OBJS) $(LOADLIBES) $(LDFLAGS) - - test: $(testname)$(EXEEXT) - ./$(testname) $(srcdir)/test-*.input diff --git a/flex-2.5.34-doc-fix.diff b/flex-2.5.34-doc-fix.diff deleted file mode 100644 index fb34fbe..0000000 --- a/flex-2.5.34-doc-fix.diff +++ /dev/null @@ -1,96 +0,0 @@ -The documentation has the td_hilen and td_lolen fields in the wrong -order (comapre with tables_shared.h). - -Andreas Gruenbacher - ---- - doc/flex.info-1 | 16 ++++++++-------- - doc/flex.texi | 14 +++++++------- - 2 files changed, 15 insertions(+), 15 deletions(-) - ---- doc/flex.info-1.orig -+++ doc/flex.info-1 -@@ -4171,8 +4171,8 @@ indexed by name, as described below. The - +-------------------------------+ - Table 1 | uint16 td_id; | - | uint16 td_flags; | -- | uint32 td_lolen; | - | uint32 td_hilen; | -+ | uint32 td_lolen; | - | void td_data[]; | - | uint8 td_pad64[]; | - +-------------------------------+ -@@ -4303,12 +4303,6 @@ Fields of a table: - elements or between structs. The type of each member is - determined by the `YYTD_DATA*' bits. - --`td_lolen' -- Specifies the number of elements in the lowest dimension array. If -- this is a one-dimensional array, then it is simply the number of -- elements in this array. The element size is determined by the -- `td_flags' field. -- - `td_hilen' - If `td_hilen' is non-zero, then the data is a two-dimensional - array. Otherwise, the data is a one-dimensional array. `td_hilen' -@@ -4324,11 +4318,17 @@ Fields of a table: - simply skipped. Flex does not currently generate tables of zero - length. - -+`td_lolen' -+ Specifies the number of elements in the lowest dimension array. If -+ this is a one-dimensional array, then it is simply the number of -+ elements in this array. The element size is determined by the -+ `td_flags' field. -+ - `td_data[]' - The table data. This array may be a one- or two-dimensional array, - of type `int8', `int16', `int32', `struct yy_trans_info', or - `struct yy_trans_info*', depending upon the values in the -- `td_flags', `td_lolen', and `td_hilen' fields. -+ `td_flags', `td_hilen', and `td_lolen' fields. - - `td_pad64[]' - Zero or more NULL bytes, padding the entire table to the next ---- doc/flex.texi.orig -+++ doc/flex.texi -@@ -5083,8 +5083,8 @@ indexed by name, as described below. The - +-------------------------------+ - Table 1 | uint16 td_id; | - | uint16 td_flags; | -- | uint32 td_lolen; | - | uint32 td_hilen; | -+ | uint32 td_lolen; | - | void td_data[]; | - | uint8 td_pad64[]; | - +-------------------------------+ -@@ -5203,11 +5203,6 @@ two integers. There is no padding betwee - The type of each member is determined by the @code{YYTD_DATA*} bits. - @end table - --@item td_lolen --Specifies the number of elements in the lowest dimension array. If this is --a one-dimensional array, then it is simply the number of elements in this array. --The element size is determined by the @code{td_flags} field. -- - @item td_hilen - If @code{td_hilen} is non-zero, then the data is a two-dimensional array. - Otherwise, the data is a one-dimensional array. @code{td_hilen} contains the -@@ -5221,11 +5216,16 @@ by the @code{td_flags} field. It is pos - array, and no data is loaded, i.e., this table is simply skipped. Flex does not - currently generate tables of zero length. - -+@item td_lolen -+Specifies the number of elements in the lowest dimension array. If this is -+a one-dimensional array, then it is simply the number of elements in this array. -+The element size is determined by the @code{td_flags} field. -+ - @item td_data[] - The table data. This array may be a one- or two-dimensional array, of type - @code{int8}, @code{int16}, @code{int32}, @code{struct yy_trans_info}, or - @code{struct yy_trans_info*}, depending upon the values in the --@code{td_flags}, @code{td_lolen}, and @code{td_hilen} fields. -+@code{td_flags}, @code{td_hilen}, and @code{td_lolen} fields. - - @item td_pad64[] - Zero or more NULL bytes, padding the entire table to the next 64-bit boundary as diff --git a/flex-2.5.34-fPIC.patch b/flex-2.5.34-fPIC.patch index c0d6353..abd96aa 100644 --- a/flex-2.5.34-fPIC.patch +++ b/flex-2.5.34-fPIC.patch @@ -5,6 +5,8 @@ instead. Makefile.am | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) +Index: Makefile.am +=================================================================== --- Makefile.am.orig +++ Makefile.am @@ -40,8 +40,7 @@ indent = @INDENT@ @@ -17,7 +19,7 @@ instead. flex_SOURCES = \ ccl.c \ -@@ -70,13 +69,7 @@ libfl_a_SOURCES = \ +@@ -73,13 +72,7 @@ libfl_a_SOURCES = \ libmain.c \ libyywrap.c diff --git a/flex-2.5.34-g++44.diff b/flex-2.5.34-g++44.diff deleted file mode 100644 index aa207a2..0000000 --- a/flex-2.5.34-g++44.diff +++ /dev/null @@ -1,12 +0,0 @@ -Index: skel.c -=================================================================== ---- skel.c 2008-02-26 22:34:19.000000000 +0100 -+++ skel.c 2009-01-12 11:29:26.000000000 +0100 -@@ -286,6 +286,7 @@ const char *skel[] = { - "#include ", - "#include ", - "#include ", -+ "#include ", - "/* end standard C++ headers. */", - "%endif", - "", diff --git a/flex-2.5.35.tar.bz2 b/flex-2.5.35.tar.bz2 deleted file mode 100644 index e887887..0000000 --- a/flex-2.5.35.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0becbd4b2b36b99c67f8c22ab98f7f80c9860aec70f0350a0018f29a88704e7b -size 1256501 diff --git a/flex-2.5.37-bison-2.6.1-1.patch b/flex-2.5.37-bison-2.6.1-1.patch new file mode 100644 index 0000000..56a67da --- /dev/null +++ b/flex-2.5.37-bison-2.6.1-1.patch @@ -0,0 +1,95 @@ +Submitted By: Bruce Dubbs +Date: 2012-08-20 +Initial Package Version: 2.5.36 +Origin: Redhat +Description: This fixes two errors in the regression tests due to changes +in bison. + +diff -up flex-2.5.36/tests/test-bison-yylloc/main.c~ flex-2.5.36/tests/test-bison-yylloc/main.c +--- flex-2.5.36/tests/test-bison-yylloc/main.c~ 2002-06-25 21:37:06.000000000 +0200 ++++ flex-2.5.36/tests/test-bison-yylloc/main.c 2012-07-31 18:53:22.007394045 +0200 +@@ -21,8 +21,6 @@ + #include "parser.h" + #include "scanner.h" + +-extern int testparse(yyscan_t); +- + int main ( int argc, char** argv ) + { + yyscan_t scanner; +diff -up flex-2.5.36/tests/test-bison-yylloc/parser.y~ flex-2.5.36/tests/test-bison-yylloc/parser.y +--- flex-2.5.36/tests/test-bison-yylloc/parser.y~ 2002-07-25 02:43:47.000000000 +0200 ++++ flex-2.5.36/tests/test-bison-yylloc/parser.y 2012-08-01 01:06:53.093155586 +0200 +@@ -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 -up flex-2.5.36/tests/test-bison-yylval/main.c~ flex-2.5.36/tests/test-bison-yylval/main.c +--- flex-2.5.36/tests/test-bison-yylval/main.c~ 2002-06-25 21:37:06.000000000 +0200 ++++ flex-2.5.36/tests/test-bison-yylval/main.c 2012-08-01 01:10:02.015510280 +0200 +@@ -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 -up flex-2.5.36/tests/test-bison-yylval/parser.y~ flex-2.5.36/tests/test-bison-yylval/parser.y +--- flex-2.5.36/tests/test-bison-yylval/parser.y~ 2002-06-25 21:37:06.000000000 +0200 ++++ flex-2.5.36/tests/test-bison-yylval/parser.y 2012-08-01 01:13:11.239867147 +0200 +@@ -25,6 +25,7 @@ + How to compile: + bison --defines --output-file="parser.c" --name-prefix="test" parser.y + */ ++%parse-param { void* scanner } + %{ + #include + #include +@@ -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_ + 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; + } diff --git a/flex-2.5.37-notex.patch b/flex-2.5.37-notex.patch new file mode 100644 index 0000000..025846e --- /dev/null +++ b/flex-2.5.37-notex.patch @@ -0,0 +1,15 @@ +We don't need texlive in the core bootstrap cycle + +Index: flex-2.5.37/doc/Makefile.am +=================================================================== +--- flex-2.5.37.orig/doc/Makefile.am ++++ flex-2.5.37/doc/Makefile.am +@@ -2,7 +2,7 @@ help2man = @HELP2MAN@ + + info_TEXINFOS = flex.texi + dist_man_MANS = flex.1 +-dist_doc_DATA= flex.pdf ++#dist_doc_DATA= flex.pdf + + CLEANFILES = \ + flex.hks \ diff --git a/flex-2.5.37.tar.bz2 b/flex-2.5.37.tar.bz2 new file mode 100644 index 0000000..7f52f49 --- /dev/null +++ b/flex-2.5.37.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17aa7b4ebf19a13bc2dff4115b416365c95f090061539a932a68092349ac052a +size 1303313 diff --git a/flex.changes b/flex.changes index 4cd7394..7fe3802 100644 --- a/flex.changes +++ b/flex.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Tue Oct 16 08:33:54 UTC 2012 - coolo@suse.com + +- update to 2.5.37 + ** Import flex into git. See + git://flex.git.sourceforge.net/gitroot/flex/flex. + ** Fix make install target to not fail when the flex++ program is + already installed + ** New translations from the translation project: de, fi, pl, vi + ** various portability fixes that quiet compiler warnings on 64-bit + hosts + ** various manual fixes, including correcting the name of a %option and + updating some simple examples to use ANSI C syntax + ** various bug fixes that prevent certain error conditions from + persisting when they should not persist + ** improvements to the test suite so it behaves better when linking + compiled files + ** new translations from the translation project: ca, da, es, fi, fr, + ga, ko, pt_br, ro, ru, sv, tr, zh_cn + ** the flex distribution is now built with automake 1.10.1 and automake + 2.61 +- add patch flex-2.5.37-notex.patch to compile without texlive +- remove patches no longer required: + flex-2.5.33-yylineno.patch + flex-2.5.34-doc-fix.diff + flex-2.5.34-g++44.diff + ------------------------------------------------------------------- Fri Dec 2 15:41:49 UTC 2011 - coolo@suse.com diff --git a/flex.spec b/flex.spec index a219a20..a8d24af 100644 --- a/flex.spec +++ b/flex.spec @@ -1,7 +1,7 @@ # # spec file for package flex # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,14 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: flex BuildRequires: automake BuildRequires: bison BuildRequires: gcc-c++ BuildRequires: help2man +BuildRequires: makeinfo Url: http://flex.sourceforge.net/ -License: BSD-3-Clause -Group: Development/Languages/C and C++ Requires: m4 PreReq: %install_info_prereq # bug437293 @@ -30,18 +30,20 @@ PreReq: %install_info_prereq Obsoletes: flex-64bit %endif # -Version: 2.5.35 +Version: 2.5.37 Release: 0 Summary: Fast Lexical Analyzer Generator -Source: %{name}-%{version}.tar.bz2 +License: BSD-3-Clause +Group: Development/Languages/C and C++ +Source: http://prdownloads.sourceforge.net/flex/flex-%{version}.tar.bz2 Source1: lex-wrapper.sh Source2: README.SUSE Source3: baselibs.conf Patch1: flex-2.5.34-fPIC.patch -Patch2: flex-2.5.33-yylineno.patch -Patch3: flex-2.5.34-doc-fix.diff -Patch4: flex-2.5.34-g++44.diff -Patch5: flex-2.5.34-asneeded.patch +# PATCH-FIX-OPENSUSE Remove tex dependency, info is enough for us, we don't need pdf - coolo@suse.de +Patch2: flex-2.5.37-notex.patch +# PATCH-FIX-UPSTREAM fix tests for new bison +Patch3: http://www.linuxfromscratch.org/patches/lfs/7.2/flex-2.5.37-bison-2.6.1-1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -51,17 +53,12 @@ patterns in text. %prep %setup -q %patch1 -# Patch2 disabled for now, as the testsuite explicitly tests for yylineno in -# all scanners. Let's see if the failing packages got fixed in the meantime. -#patch2 -%patch3 -%patch4 -%patch5 -cp %{S:2} . +%patch2 -p1 +%patch3 -p1 %build autoreconf -fi -%configure +%configure --docdir=%{_docdir}/%{name} make %{?_smp_mflags} %check @@ -72,8 +69,8 @@ make check %install make install DESTDIR=$RPM_BUILD_ROOT install %{S:1} $RPM_BUILD_ROOT/%{_bindir}/lex -ln -s flex $RPM_BUILD_ROOT/%{_bindir}/flex++ ln -s flex.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/lex.1.gz +cp %{S:2} $RPM_BUILD_ROOT/%{_docdir}/%{name} %find_lang %{name} %files -f %{name}.lang @@ -86,7 +83,7 @@ ln -s flex.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/lex.1.gz %{_mandir}/man1/flex.1.gz %{_mandir}/man1/lex.1.gz %{_infodir}/flex* -%doc README README.SUSE AUTHORS COPYING NEWS +%{_docdir}/%name %post %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz