From d24e34db85b279e595b80b5793f7d9557044b7f5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2018 05:14:40 +0000 Subject: import flex-2.5.37-6.el7 --- diff --git a/SOURCES/flex-2.5.36-bison-2.6.1.patch b/SOURCES/flex-2.5.36-bison-2.6.1.patch index e7cdff6..a40128a 100644 --- a/SOURCES/flex-2.5.36-bison-2.6.1.patch +++ b/SOURCES/flex-2.5.36-bison-2.6.1.patch @@ -1,7 +1,8 @@ -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 @@ +Index: b/tests/test-bison-yylloc/main.c +=================================================================== +--- a/tests/test-bison-yylloc/main.c ++++ b/tests/test-bison-yylloc/main.c +@@ -24,8 +24,6 @@ #include "parser.h" #include "scanner.h" @@ -10,9 +11,10 @@ diff -up flex-2.5.36/tests/test-bison-yylloc/main.c~ flex-2.5.36/tests/test-biso 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 +Index: b/tests/test-bison-yylloc/parser.y +=================================================================== +--- a/tests/test-bison-yylloc/parser.y ++++ b/tests/test-bison-yylloc/parser.y @@ -21,6 +21,8 @@ * PURPOSE. */ @@ -42,9 +44,10 @@ diff -up flex-2.5.36/tests/test-bison-yylloc/parser.y~ flex-2.5.36/tests/test-bi 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 +Index: b/tests/test-bison-yylval/main.c +=================================================================== +--- a/tests/test-bison-yylval/main.c ++++ b/tests/test-bison-yylval/main.c @@ -24,8 +24,6 @@ #include "parser.h" #include "scanner.h" @@ -54,9 +57,10 @@ diff -up flex-2.5.36/tests/test-bison-yylval/main.c~ flex-2.5.36/tests/test-biso 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 +Index: b/tests/test-bison-yylval/parser.y +=================================================================== +--- 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 diff --git a/SOURCES/flex-rh1210022.patch b/SOURCES/flex-rh1210022.patch new file mode 100644 index 0000000..0028b9c --- /dev/null +++ b/SOURCES/flex-rh1210022.patch @@ -0,0 +1,38 @@ +From c53fd2db8c78fef5afd284c3e64da51bc71cf6c3 Mon Sep 17 00:00:00 2001 +From: nomis52 +Date: Sat, 4 Aug 2012 15:03:31 -0400 +Subject: [PATCH] Change variable types to silence compiler warnings; resolves + #3552806 + +Signed-off-by: Will Estes +--- + flex.skl | 2 +- + gen.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: b/flex.skl +=================================================================== +--- a/flex.skl ++++ b/flex.skl +@@ -2360,7 +2360,7 @@ YY_BUFFER_STATE yy_scan_bytes YYFARGS2( + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; +- int i; ++ yy_size_t i; + m4_dnl M4_YY_DECL_GUTS_VAR(); + + /* Get memory for full buffer, including space for trailing EOB's. */ +Index: b/gen.c +=================================================================== +--- a/gen.c ++++ b/gen.c +@@ -1972,7 +1972,7 @@ void make_tables () + ("if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )"); + indent_up (); + indent_puts ("{"); +- indent_puts ("int yyl;"); ++ indent_puts ("yy_size_t yyl;"); + do_indent (); + out_str ("for ( yyl = %s; yyl < yyleng; ++yyl )\n", + yymore_used ? (yytext_is_array ? "YY_G(yy_prev_more_offset)" : diff --git a/SOURCES/flex-rh1439367.patch b/SOURCES/flex-rh1439367.patch new file mode 100644 index 0000000..77e1dce --- /dev/null +++ b/SOURCES/flex-rh1439367.patch @@ -0,0 +1,73 @@ +From c376be574e99b5f64a7dad71cfc7c0b1f71b747b Mon Sep 17 00:00:00 2001 +From: Manoj Srivastava +Date: Wed, 9 Apr 2014 00:23:07 -0700 +Subject: [PATCH] Do not use obsolete bison constructs in tests. + +In Bison 3.0, support for YYLEX_PARAM and YYPARSE_PARAM has been +removed (deprecated in Bison 1.875): use %lex-param, %parse-param, or +%param. This commit fixes the tests so they still work. + +Signed-off-by: Manoj Srivastava +--- + tests/test-bison-yylloc/parser.y | 4 ++-- + tests/test-bison-yylval/parser.y | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +Index: b/tests/test-bison-yylloc/parser.y +=================================================================== +--- a/tests/test-bison-yylloc/parser.y ++++ b/tests/test-bison-yylloc/parser.y +@@ -22,6 +22,7 @@ + */ + + %parse-param { void* scanner } ++%lex-param { void* scanner } + + /* + How to compile: +@@ -34,7 +35,6 @@ + #include "config.h" + + #define YYERROR_VERBOSE 1 +-#define YYLEX_PARAM scanner + + extern int testget_lineno(void*); + +@@ -52,7 +52,7 @@ int process_text(char* s) { + + %} + +-%pure_parser ++%pure-parser + + %union { + int lineno; +Index: b/tests/test-bison-yylval/parser.y +=================================================================== +--- a/tests/test-bison-yylval/parser.y ++++ b/tests/test-bison-yylval/parser.y +@@ -26,6 +26,7 @@ + bison --defines --output-file="parser.c" --name-prefix="test" parser.y + */ + %parse-param { void* scanner } ++%lex-param { void* scanner } + %{ + #include + #include +@@ -33,7 +34,6 @@ + #include "config.h" + + #define YYERROR_VERBOSE 1 +-#define YYLEX_PARAM scanner + + + /* A dummy function. A check against seg-faults in yylval->str. */ +@@ -49,7 +49,7 @@ int process_text(char* s) { + + %} + +-%pure_parser ++%pure-parser + + %union { + long unused; diff --git a/SPECS/flex.spec b/SPECS/flex.spec index 29cc1e2..a636f22 100644 --- a/SPECS/flex.spec +++ b/SPECS/flex.spec @@ -1,7 +1,7 @@ Summary: A tool for creating scanners (text pattern recognizers) Name: flex Version: 2.5.37 -Release: 3%{?dist} +Release: 6%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -13,10 +13,12 @@ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 # https://sourceforge.net/tracker/?func=detail&aid=3546447&group_id=97492&atid=618177 Patch0: flex-2.5.36-bison-2.6.1.patch +Patch1: flex-rh1439367.patch +Patch2: flex-rh1210022.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: m4 -BuildRequires: gettext bison m4 +BuildRequires: gettext bison m4 gcc-c++ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -60,6 +62,8 @@ plain text and PDF formats. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %global flexdocdir %{_datadir}/doc/flex-doc-%{version} @@ -120,6 +124,15 @@ rm -rf ${RPM_BUILD_ROOT} %{_datadir}/doc/flex-doc-%{version} %changelog +* Thu Jul 12 2018 Patsy Franklin - 2.5.37-6 +- Build requires gcc-c++ for building from source. (#1600429) + +* Wed May 23 2018 Arjun Shankar - 2.5.37-5 +- Remove g++ signed/unsigned comparison warning in generated scanner (#1210022) + +* Mon May 21 2018 Arjun Shankar - 2.5.37-4 +- Fix testsuite build issues (#1439367) + * Fri Jan 24 2014 Daniel Mach - 2.5.37-3 - Mass rebuild 2014-01-24 @@ -293,7 +306,7 @@ rm -rf ${RPM_BUILD_ROOT} * Wed Mar 8 2006 Petr Machata - 2.5.4a-37.4 - adding test for #183098 into build process -* Fri Mar 2 2006 Petr Machata - 2.5.4a-37.3 +* Fri Mar 3 2006 Petr Machata - 2.5.4a-37.3 - rebuilt, no changes inside. In hunt for #183098 * Fri Feb 10 2006 Jesse Keating - 2.5.4a-37.2 @@ -302,7 +315,7 @@ rm -rf ${RPM_BUILD_ROOT} * Tue Feb 07 2006 Jesse Keating - 2.5.4a-37.1 - rebuilt for new gcc4.1 snapshot and glibc changes -* Wed Feb 02 2006 Petr Machata 2.5.4a-37 +* Thu Feb 02 2006 Petr Machata 2.5.4a-37 - adding `make bigcheck' into build process. Refreshing initscan.c to make this possible.