[packages/mysql/MYSQL_5_0] - fix bison/yacc related build problems
arekm
arekm at pld-linux.org
Thu Aug 29 12:34:21 CEST 2013
commit 29960eb08845f0aeaea975b8c47cb7dfcaa45d10
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Aug 29 12:33:54 2013 +0200
- fix bison/yacc related build problems
bison3.patch | 40 ++++++++++++++++++++++++++++++++++++++++
mysql-yacc.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
mysql.spec | 6 ++++--
3 files changed, 91 insertions(+), 2 deletions(-)
---
diff --git a/mysql.spec b/mysql.spec
index 16f264c..db5c84e 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -74,8 +74,9 @@ Patch21: %{name}-atomic.patch
Patch22: %{name}-fix-dummy-thread-race-condition.patch
# ourdelta
Patch23: big_tables_fixlp284123_fix%{name}35346.patch
-
+Patch24: bison3.patch
Patch25: %{name}-sslchain.patch
+Patch26: %{name}-yacc.patch
# <percona patches, http://www.percona.com/percona-lab.html>
Patch100: %{name}-show_patches.patch
Patch101: %{name}-microslow_innodb.patch
@@ -572,8 +573,9 @@ mv sphinx-*/mysqlse sql/sphinx
%patch21 -p0
%patch22 -p1
%patch23 -p1
-
+%patch24 -p1
%patch25 -p1
+%patch26 -p1
%{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
diff --git a/bison3.patch b/bison3.patch
new file mode 100644
index 0000000..ae889df
--- /dev/null
+++ b/bison3.patch
@@ -0,0 +1,40 @@
+--- Percona-Server-5.5.32-rel31.0/sql/sql_yacc.yy.orig 2013-07-01 05:16:34.000000000 +0200
++++ Percona-Server-5.5.32-rel31.0/sql/sql_yacc.yy 2013-08-18 21:33:19.181583895 +0200
+@@ -26,8 +26,6 @@
+ ** The type will be void*, so it must be cast to (THD*) when used.
+ ** Use the YYTHD macro for this.
+ */
+-#define YYPARSE_PARAM yythd
+-#define YYLEX_PARAM yythd
+ #define YYTHD ((THD *)yythd)
+ #define YYLIP (& YYTHD->m_parser_state->m_lip)
+ #define YYPS (& YYTHD->m_parser_state->m_yacc)
+@@ -50,7 +50,7 @@
+
+ const LEX_STRING null_lex_str={0,0};
+
+-#define yyoverflow(A,B,C,D,E,F) {ulong val= (ulong) *(F); if (my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
++#define yyoverflow(A,B,C,D,E,F) {ulong val= (ulong) *(F); if (my_yyoverflow((B), (D), &val)) { yyerror(yythd, (char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
+
+ #undef WARN_DEPRECATED /* this macro is also defined in mysql_priv.h */
+ #define WARN_DEPRECATED(A,B) \
+@@ -174,7 +172,7 @@
+ to abort from the parser.
+ */
+
+-void MYSQLerror(const char *s)
++void MYSQLerror(void *yythd, const char *s)
+ {
+ THD *thd= current_thd;
+
+@@ -490,7 +490,9 @@
+ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
+ %}
+
+-%pure_parser /* We have threads */
++%pure-parser /* We have threads */
++%parse-param { void *yythd }
++%lex-param { void *yythd }
+ /*
+ Currently there are 240 shift/reduce conflicts.
+ We should not introduce new conflicts any more.
diff --git a/mysql-yacc.patch b/mysql-yacc.patch
new file mode 100644
index 0000000..a107162
--- /dev/null
+++ b/mysql-yacc.patch
@@ -0,0 +1,47 @@
+--- mysql-5.0.96/configure.in 2013-08-29 12:23:55.810760951 +0200
++++ mysql-5.0.96.new/configure.in 2013-08-29 12:23:37.173464030 +0200
+@@ -269,6 +269,29 @@
+
+ AC_SUBST(NM)dnl
+
++##############################################################################
++# In automake 1.12, the extension on generated yacc/bison header files changed
++##############################################################################
++
++YACC_HEXT="h"
++MAKEFILE_1ST=`head -1 "$srcdir/Makefile.in"`
++AMAKE_MAJOR=`expr "$MAKEFILE_1ST" : '.*generated by automake \([[0-9]]*\).*'`
++if test $? -eq "0" ; then
++ if test "$AMAKE_MAJOR" -gt "1" ; then
++ YACC_HEXT="hh"
++ CXXFLAGS="$CXXFLAGS -DYACC_HEXT_HH"
++ elif test "$AMAKE_MAJOR" -eq "1" ; then
++ AMAKE_MINOR=`expr "$MAKEFILE_1ST" : '.*generated by automake 1.\([[0-9]]*\).*'`
++ if test $? -eq "0" ; then
++ if test "$AMAKE_MINOR" -ge "12" ; then
++ YACC_HEXT="hh"
++ CXXFLAGS="$CXXFLAGS -DYACC_HEXT_HH"
++ fi
++ fi
++ fi
++fi
++AC_SUBST(YACC_HEXT)
++
+ # NM= "$NM -X64"
+ #archive_expsym_cmds= `echo "$archive_expsym_cmds" | sed -e '/"$(CC)"//'`
+ #archive_expsym_cmds= "$CC -q64 $archive_expsym_cmds"
+--- mysql-5.0.96/sql/sql_lex.h 2013-08-29 12:23:55.444081885 +0200
++++ mysql-5.0.96.new/sql/sql_lex.h 2013-08-29 12:22:30.567877721 +0200
+@@ -37,7 +37,11 @@
+ #else
+ #include "lex_symbol.h"
+ #if MYSQL_LEX
+-#include "sql_yacc.h"
++# if YACC_HEXT_HH
++# include "sql_yacc.hh"
++# else
++# include "sql_yacc.h"
++# endif
+ #define LEX_YYSTYPE YYSTYPE *
+ #else
+ #define LEX_YYSTYPE void *
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mysql.git/commitdiff/29960eb08845f0aeaea975b8c47cb7dfcaa45d10
More information about the pld-cvs-commit
mailing list