Rebase to 2.5.36
This commit is contained in:
parent
1d38037b36
commit
9c353052cc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
flex-2.5.35.tar.bz2
|
||||
/flex*/
|
||||
*.rpm
|
||||
/flex-2.5.36.tar.bz2
|
||||
|
@ -1,22 +0,0 @@
|
||||
diff -urNp flex-2.5.35.orig/flex.skl flex-2.5.35/flex.skl
|
||||
--- flex-2.5.35.orig/flex.skl 2009-04-20 03:09:46.000000000 +0530
|
||||
+++ flex-2.5.35/flex.skl 2009-04-20 07:46:58.000000000 +0530
|
||||
@@ -217,6 +217,7 @@ m4preproc_include(`flexint.h')
|
||||
/* begin standard C++ headers. */
|
||||
#include <iostream>
|
||||
#include <errno.h>
|
||||
+#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
/* end standard C++ headers. */
|
||||
diff -urNp flex-2.5.35.orig/skel.c flex-2.5.35/skel.c
|
||||
--- flex-2.5.35.orig/skel.c 2009-04-20 03:09:46.000000000 +0530
|
||||
+++ flex-2.5.35/skel.c 2009-04-20 07:46:40.000000000 +0530
|
||||
@@ -284,6 +284,7 @@ const char *skel[] = {
|
||||
"/* begin standard C++ headers. */",
|
||||
"#include <iostream> ",
|
||||
"#include <errno.h>",
|
||||
+ "#include <cstdio>",
|
||||
"#include <cstdlib>",
|
||||
"#include <cstring>",
|
||||
"/* end standard C++ headers. */",
|
@ -1,36 +0,0 @@
|
||||
diff -u flex-2.5.35/scan.c flex-2.5.35/scan.c
|
||||
--- flex-2.5.35/scan.c
|
||||
+++ flex-2.5.35/scan.c
|
||||
@@ -2096,7 +2096,7 @@
|
||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
diff -u flex-2.5.35/flex.skl flex-2.5.35/flex.skl
|
||||
--- flex-2.5.35/flex.skl
|
||||
+++ flex-2.5.35/flex.skl
|
||||
@@ -1075,7 +1075,7 @@
|
||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
||||
%endif
|
||||
%if-c++-only C++ definition
|
||||
#define ECHO LexerOutput( yytext, yyleng )
|
||||
diff -u flex-2.5.35/skel.c flex-2.5.35/skel.c
|
||||
--- flex-2.5.35/skel.c
|
||||
+++ flex-2.5.35/skel.c
|
||||
@@ -1142,7 +1142,7 @@
|
||||
"/* This used to be an fputs(), but since the string might contain NUL's,",
|
||||
" * we now use fwrite().",
|
||||
" */",
|
||||
- "#define ECHO fwrite( yytext, yyleng, 1, yyout )",
|
||||
+ "#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)",
|
||||
"%endif",
|
||||
"%if-c++-only C++ definition",
|
||||
"#define ECHO LexerOutput( yytext, yyleng )",
|
@ -1,53 +0,0 @@
|
||||
diff -up flex-2.5.35/flex.skl\~ flex-2.5.35/flex.skl
|
||||
--- flex-2.5.35/flex.skl~ 2010-07-13 17:18:43.000000000 +0200
|
||||
+++ flex-2.5.35/flex.skl 2010-07-13 17:23:49.000000000 +0200
|
||||
@@ -960,6 +960,22 @@ m4_ifdef( [[M4_YY_NO_SET_LINENO]],,
|
||||
void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );
|
||||
]])
|
||||
|
||||
+m4_ifdef( [[M4_YY_REENTRANT]],
|
||||
+[[
|
||||
+m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,
|
||||
+[[
|
||||
+int yyget_column M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
|
||||
+]])
|
||||
+]])
|
||||
+
|
||||
+m4_ifdef( [[M4_YY_REENTRANT]],
|
||||
+[[
|
||||
+m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,
|
||||
+[[
|
||||
+void yyset_column M4_YY_PARAMS( int column_no M4_YY_PROTO_LAST_ARG );
|
||||
+]])
|
||||
+]])
|
||||
+
|
||||
%if-bison-bridge
|
||||
m4_ifdef( [[M4_YY_NO_GET_LVAL]],,
|
||||
[[
|
||||
|
||||
Diff finished. Tue Jul 13 17:27:50 2010
|
||||
--- flex-2.5.35/skel.c~ 2010-07-14 13:15:42.000000000 +0200
|
||||
+++ flex-2.5.35/skel.c 2010-07-14 13:16:05.000000000 +0200
|
||||
@@ -1027,6 +1027,22 @@
|
||||
"void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );",
|
||||
"]])",
|
||||
"",
|
||||
+ "m4_ifdef( [[M4_YY_REENTRANT]],",
|
||||
+ "[[",
|
||||
+ "m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,",
|
||||
+ "[[",
|
||||
+ "int yyget_column M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
|
||||
+ "]])",
|
||||
+ "]])",
|
||||
+ "",
|
||||
+ "m4_ifdef( [[M4_YY_REENTRANT]],",
|
||||
+ "[[",
|
||||
+ "m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,",
|
||||
+ "[[",
|
||||
+ "void yyset_column M4_YY_PARAMS( int column_no M4_YY_PROTO_LAST_ARG );",
|
||||
+ "]])",
|
||||
+ "]])",
|
||||
+ "",
|
||||
"%if-bison-bridge",
|
||||
"m4_ifdef( [[M4_YY_NO_GET_LVAL]],,",
|
||||
"[[",
|
@ -1,11 +0,0 @@
|
||||
--- flex-2.5.35/gen.c-orig 2008-04-30 22:51:08.000000000 +0200
|
||||
+++ flex-2.5.35/gen.c 2008-04-30 22:51:14.000000000 +0200
|
||||
@@ -1890,7 +1890,7 @@
|
||||
outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
|
||||
outn ("\t\t{ \\");
|
||||
outn ("\t\tint c = '*'; \\");
|
||||
- outn ("\t\tint n; \\");
|
||||
+ outn ("\t\tunsigned n; \\");
|
||||
outn ("\t\tfor ( n = 0; n < max_size && \\");
|
||||
outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
|
||||
outn ("\t\t\tbuf[n] = (char) c; \\");
|
92
flex-2.5.36-bison-2.6.1.patch
Normal file
92
flex-2.5.36-bison-2.6.1.patch
Normal file
@ -0,0 +1,92 @@
|
||||
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,11 +21,10 @@
|
||||
* PURPOSE.
|
||||
*/
|
||||
|
||||
+#define YYPARSE_PARAM scanner
|
||||
#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 <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_
|
||||
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;
|
||||
}
|
38
flex.spec
38
flex.spec
@ -1,15 +1,12 @@
|
||||
Summary: A tool for creating scanners (text pattern recognizers)
|
||||
Name: flex
|
||||
Version: 2.5.35
|
||||
Release: 16%{?dist}
|
||||
Version: 2.5.36
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
Group: Development/Tools
|
||||
URL: http://flex.sourceforge.net/
|
||||
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
||||
Patch0: flex-2.5.35-sign.patch
|
||||
Patch1: flex-2.5.35-hardening.patch
|
||||
Patch2: flex-2.5.35-gcc44.patch
|
||||
Patch3: flex-2.5.35-missing-prototypes.patch
|
||||
Patch0: flex-2.5.36-bison-2.6.1.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: m4
|
||||
BuildRequires: gettext bison m4
|
||||
@ -44,12 +41,20 @@ This package contains the library with default implementations of
|
||||
`main' and `yywrap' functions that the client binary can choose to use
|
||||
instead of implementing their own.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for flex scanner generator
|
||||
Group: Documentation
|
||||
|
||||
%description doc
|
||||
|
||||
This package contains documentation for flex scanner generator in
|
||||
plain text and PDF formats.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%global flexdocdir %{_datadir}/doc/flex-doc-%{version}
|
||||
|
||||
%build
|
||||
%configure --disable-dependency-tracking CFLAGS="-fPIC $RPM_OPT_FLAGS"
|
||||
@ -57,8 +62,9 @@ make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
make DESTDIR=$RPM_BUILD_ROOT docdir=%{flexdocdir} install
|
||||
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
||||
rm -f $RPM_BUILD_ROOT/%{flexdocdir}/{README.cvs,TODO}
|
||||
|
||||
( cd ${RPM_BUILD_ROOT}
|
||||
ln -sf flex .%{_bindir}/lex
|
||||
@ -102,7 +108,19 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/*.a
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/doc/flex-doc-%{version}
|
||||
|
||||
%changelog
|
||||
* Tue Jul 31 2012 Petr Machata <pmachata@redhat.com> - 2.5.36-1
|
||||
- Rebase to 2.5.36
|
||||
- Drop flex-2.5.35-sign.patch, flex-2.5.35-hardening.patch,
|
||||
flex-2.5.35-gcc44.patch, flex-2.5.35-missing-prototypes.patch
|
||||
- Add flex-2.5.36-bison-2.6.1.patch
|
||||
- Add a subpackage doc
|
||||
- Resolves #842073
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.35-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user