Date: Friday, October 8, 2021 @ 22:55:50
  Author: foutrelis
Revision: 425496

Fix build with bison 3.8

Added:
  libreoffice-still/trunk/bison-3.8.patch
Modified:
  libreoffice-still/trunk/PKGBUILD

-----------------+
 PKGBUILD        |    5 +++++
 bison-3.8.patch |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2021-10-08 22:51:15 UTC (rev 425495)
+++ PKGBUILD    2021-10-08 22:55:50 UTC (rev 425496)
@@ -60,6 +60,7 @@
        
${_additional_source_url2}/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf
        
${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
        make-pyuno-work-with-system-wide-module-install.diff
+       bison-3.8.patch
        soffice-template.desktop.in
        libreoffice-still.sh libreoffice-still.csh)
 noextract=(35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
@@ -109,6 +110,7 @@
             'f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140'
             'eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6'
             'c463654a73ecfbc242ff109726fb4faecdbfb3d91affafe919b24bea65afb563'
+            'e1f46d84deb0c4e7ddbd1c5422e015940aa5ae43a5e2b8f10e88a0317aaa4ed0'
             'd0be8099cbee3c9dfda694a828149b881c345b204ab68826f317580aafb50879'
             'cd1b25ff390e436c6bffa65c6e12382236e3ccbf8d3aae51b1b59bcaed79fd8a'
             'de20f36d45f0fecc2d94176dd3ec7226ab07fa8ffb9b0bc73c200349a9273de1')
@@ -132,6 +134,9 @@
        # fix not upstreamable pyuno paths - FS#54250
        patch -Np1 -i 
"${srcdir}"/make-pyuno-work-with-system-wide-module-install.diff
 
+       # fix build with bison 3.8
+       patch -Np1 -i "${srcdir}"/bison-3.8.patch
+
        #use the CFLAGS but remove the LibO overridden ones
        for i in $CFLAGS; do
                case "$i" in

Added: bison-3.8.patch
===================================================================
--- bison-3.8.patch                             (rev 0)
+++ bison-3.8.patch     2021-10-08 22:55:50 UTC (rev 425496)
@@ -0,0 +1,50 @@
+From 45227d9b79dc4f2a2aa6874cd4e3c02b7934b197 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sberg...@redhat.com>
+Date: Tue, 14 Sep 2021 12:20:48 +0200
+Subject: [PATCH] Adapt to Bison 3.8 internal yyn -> yyrule rename
+
+see
+<https://git.savannah.gnu.org/cgit/bison.git/commit/?id=f30067ed51f23802fc91761ede1506dfa72b2865>
+"glr2.cc: log the execution of deferred actions" including "Rename argument yyn
+as yyrule for clarity."
+
+YYBISON was defined as 1 rather than as a representation of the Bison version
+prior to
+<https://git.savannah.gnu.org/cgit/bison.git/commit/?id=21c147b6e5372563b7c4741deadaddb9354f4b09>
+"yacc.c: provide the Bison version as an integral macro", which shouldn't be a
+problem here.  And YYBISON is apparently completely undefined with
+/usr/bin/bison on macOS.
+
+(The preceding comment always mentioned "yyi" and "yyrmap" in apparent mismatch
+with the actually used "yyn" and "yyr1" ever since
+c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just leave it
+untouched.)
+
+Change-Id: I4f901407aa21ed4abec84e661d813ee7599f02f0
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122082
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
+---
+ connectivity/source/parse/sqlbison.y | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
+index d14f36e7794f0..c4be0bc00bd04 100644
+--- a/connectivity/source/parse/sqlbison.y
++++ b/connectivity/source/parse/sqlbison.y
+@@ -74,9 +74,15 @@ inline connectivity::OSQLInternalNode* newNode(const 
OUString& _newValue,
+ 
+ // yyi is the internal number of the rule that is currently being reduced
+ // This can be mapped to external rule number via the yyrmap.
++#if defined YYBISON && YYBISON >= 30800
++#define SQL_NEW_RULE                  newNode("", SQLNodeType::Rule, 
yyr1[yyrule])
++#define SQL_NEW_LISTRULE              newNode("", SQLNodeType::ListRule, 
yyr1[yyrule])
++#define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyrule])
++#else
+ #define SQL_NEW_RULE                  newNode("", SQLNodeType::Rule, 
yyr1[yyn])
+ #define SQL_NEW_LISTRULE              newNode("", SQLNodeType::ListRule, 
yyr1[yyn])
+ #define SQL_NEW_COMMALISTRULE   newNode("", SQLNodeType::CommaListRule, 
yyr1[yyn])
++#endif
+ 
+ 
+ extern connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER;

Reply via email to