]> git.pld-linux.org Git - packages/ruby.git/commitdiff
- fix building with bison 3.0
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 18 Aug 2013 18:44:07 +0000 (20:44 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 18 Aug 2013 18:44:07 +0000 (20:44 +0200)
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 [new file with mode: 0644]
ruby.spec

diff --git a/bison3.patch b/bison3.patch
new file mode 100644 (file)
index 0000000..b1db7fd
--- /dev/null
@@ -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 {
index 2cda31553f3246eb961676347899a47014036df6..abaa2200dd7b9895377b376120143ab5804e230e 100644 (file)
--- 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}
This page took 0.03684 seconds and 4 git commands to generate.