- Rebase to 2.6.1 (#1318074,#1364943)
- update URL (github), drop unused patches (#1238860)
This commit is contained in:
Rex Dieter 2016-09-13 08:56:11 -05:00
parent 3821e2741c
commit e12b8361fa
5 changed files with 10 additions and 122 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ flex-2.5.35.tar.bz2
/flex-2.5.37.tar.bz2
/flex-2.5.39.tar.bz2
/flex-2.6.0.tar.bz2
/flex-2.6.1.tar.xz

View File

@ -1,79 +0,0 @@
From 35aba3d6e3c99fcd527c677bef8efeb59963fe8a Mon Sep 17 00:00:00 2001
Message-Id: <35aba3d6e3c99fcd527c677bef8efeb59963fe8a.1397340102.git.srivasta@golden-gryphon.com>
From: Manoj Srivastava <srivasta@golden-gryphon.com>
Date: Wed, 9 Apr 2014 00:23:07 -0700
Subject: [PATCH 1/1] [bison-test-fixes] 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 <srivasta@golden-gryphon.com>
---
tests/test-bison-yylloc/parser.y | 4 ++--
tests/test-bison-yylval/parser.y | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
50.0% tests/test-bison-yylloc/
50.0% tests/test-bison-yylval/
diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y
index e8f4e56..224d252 100644
--- 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;
diff --git a/tests/test-bison-yylval/parser.y b/tests/test-bison-yylval/parser.y
index 0ffdb89..626c5e7 100644
--- 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 <stdio.h>
#include <stdlib.h>
@@ -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;
--
1.9.2

View File

@ -1,36 +0,0 @@
diff -Nrup a/src/flex.skl b/src/flex.skl
--- a/src/flex.skl 2016-07-27 11:11:48.528378027 -0400
+++ b/src/flex.skl 2016-07-27 11:14:03.012351701 -0400
@@ -1718,7 +1718,7 @@ int yyFlexLexer::yy_get_next_buffer()
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
diff -Nrup a/src/scan.c b/src/scan.c
--- a/src/scan.c 2015-11-17 11:17:41.000000000 -0500
+++ b/src/scan.c 2016-07-27 11:14:18.126674417 -0400
@@ -4181,7 +4181,7 @@ static int yy_get_next_buffer (void)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
diff -Nrup a/src/skel.c b/src/skel.c
--- a/src/skel.c 2015-11-17 11:17:39.000000000 -0500
+++ b/src/skel.c 2016-07-27 11:14:36.362857240 -0400
@@ -1929,7 +1929,7 @@ const char *skel[] = {
"",
" else",
" {",
- " yy_size_t num_to_read =",
+ " int num_to_read =",
" YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;",
"",
" while ( num_to_read <= 0 )",

View File

@ -2,19 +2,18 @@
Summary: A tool for creating scanners (text pattern recognizers)
Name: flex
Version: 2.6.0
Release: 2%{?dist}
Version: 2.6.1
Release: 1%{?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.
# gettext.h (copied from gnulib) is under LGPLv2+
License: BSD and LGPLv2+
Group: Development/Tools
URL: http://flex.sourceforge.net/
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
URL: https://github.com/westes/flex
Source: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.xz
Patch0: flex-2.6.0-yyless.patch
Patch1: flex-2.6.0-num_to_read.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: m4
@ -62,7 +61,6 @@ plain text and PDF formats.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%configure --docdir=%{_pkgdocdir} CFLAGS="-fPIC $RPM_OPT_FLAGS"
@ -135,6 +133,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_pkgdocdir}
%changelog
* Tue Sep 13 2016 Rex Dieter <rdieter@fedoraproject.org> - 2.6.1-1
- Rebase to 2.6.1 (#1318074,#1364943)
- update URL (github), drop unused patches (#1238860)
* Wed Jul 27 2016 Patsy Franklin <pfrankli@redhat.com> - 2.6.0-2
Fix wrong type on num_to_read. BZ #1360744

View File

@ -1 +1 @@
266270f13c48ed043d95648075084d59 flex-2.6.0.tar.bz2
cd3c86290fc2676a641aefafeb10848a flex-2.6.1.tar.xz