[packages/ruby] - fix building with bison 3.0
baggins
baggins at pld-linux.org
Sun Aug 18 20:45:19 CEST 2013
commit 0068d4a81eb0326c09fcee03958a55b65f0fc2a6
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Aug 18 20:44:07 2013 +0200
- fix building with bison 3.0
Excerpt from bison 3.0 NEWS file:
*** Obsolete features
'''Support for YYLEX_PARAM and YYPARSE_PARAM is removed''' (deprecated in Bison
1.875): use %lex-param, %parse-param, or %param.
bison3.patch | 21 +++++++++++++++++++++
ruby.spec | 4 +++-
2 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/ruby.spec b/ruby.spec
index 2cda315..abaa220 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -11,7 +11,7 @@
%bcond_without batteries # Don't include rubygems, json, rake, minitest
%bcond_with bootstrap # build bootstrap version
-%define rel 1
+%define rel 1
%define ruby_version 1.9
%define basever 1.9.3
%define patchlevel 448
@@ -61,6 +61,7 @@ Patch5: site-and-vendor-arch-flags.patch
# Make mkmf verbose by default
Patch6: mkmf-verbose.patch
Patch7: strip-ccache.patch
+Patch8: bison3.patch
URL: http://www.ruby-lang.org/
BuildRequires: autoconf >= 2.60
BuildRequires: automake
@@ -402,6 +403,7 @@ Biblioteka JSON dla języka Ruby.
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
# must be regenerated with new bison
%{__rm} parse.{c,h}
diff --git a/bison3.patch b/bison3.patch
new file mode 100644
index 0000000..b1db7fd
--- /dev/null
+++ b/bison3.patch
@@ -0,0 +1,21 @@
+--- ruby-1.9.3-p448/parse.y~ 2013-04-11 04:21:43.000000000 +0200
++++ ruby-1.9.3-p448/parse.y 2013-08-18 20:36:49.832045588 +0200
+@@ -277,8 +277,6 @@
+ static int parser_yyerror(struct parser_params*, const char*);
+ #define yyerror(msg) parser_yyerror(parser, (msg))
+
+-#define YYLEX_PARAM parser
+-
+ #define lex_strterm (parser->parser_lex_strterm)
+ #define lex_state (parser->parser_lex_state)
+ #define cond_stack (parser->parser_cond_stack)
+@@ -610,7 +608,8 @@
+ #endif
+ %}
+
+-%pure_parser
++%pure-parser
++%lex-param {struct parser_params *parser}
+ %parse-param {struct parser_params *parser}
+
+ %union {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby.git/commitdiff/0068d4a81eb0326c09fcee03958a55b65f0fc2a6
More information about the pld-cvs-commit
mailing list