[133896] trunk/dports/gnome/libgnomeprint

larryv at macports.org larryv at macports.org
Sat Mar 14 23:47:04 PDT 2015


Revision: 133896
          https://trac.macports.org/changeset/133896
Author:   larryv at macports.org
Date:     2015-03-14 23:47:04 -0700 (Sat, 14 Mar 2015)
Log Message:
-----------
libgnomeprint: Fix build with Bison 3 (comment:47:ticket:41600)

Modified Paths:
--------------
    trunk/dports/gnome/libgnomeprint/Portfile

Added Paths:
-----------
    trunk/dports/gnome/libgnomeprint/files/bison3.patch

Modified: trunk/dports/gnome/libgnomeprint/Portfile
===================================================================
--- trunk/dports/gnome/libgnomeprint/Portfile	2015-03-15 02:56:18 UTC (rev 133895)
+++ trunk/dports/gnome/libgnomeprint/Portfile	2015-03-15 06:47:04 UTC (rev 133896)
@@ -37,7 +37,8 @@
 # missing-stdio: https://bugzilla.gnome.org/show_bug.cgi?id=653388
 # patch-freetype-2.5.1: https://bugzilla.gnome.org/show_bug.cgi?id=719592
 patchfiles          missing-stdio.patch \
-                    patch-freetype-2.5.1.diff
+                    patch-freetype-2.5.1.diff \
+                    bison3.patch
 
 # autoreconf to reconfigure with our intltool.m4
 use_autoreconf      yes

Added: trunk/dports/gnome/libgnomeprint/files/bison3.patch
===================================================================
--- trunk/dports/gnome/libgnomeprint/files/bison3.patch	                        (rev 0)
+++ trunk/dports/gnome/libgnomeprint/files/bison3.patch	2015-03-15 06:47:04 UTC (rev 133896)
@@ -0,0 +1,45 @@
+Bison 3 requires that instances of YYPARSE_PARAM be replaced with
+%parse-param. This in turn alters the arguments of the generated
+yyerror function, so relevant function prototypes have to be updated.
+
+Index: libgnomeprint/grammar.y
+===================================================================
+--- libgnomeprint/grammar.y.orig
++++ libgnomeprint/grammar.y
+@@ -6,8 +6,6 @@
+ #include <libgnomeprint/types.h>
+ #include <libgnomeprint/gnome-print-filter.h>
+ 
+-#define YYPARSE_PARAM graph
+-
+ static void
+ set_value_from_string (GParamSpec *pspec, GValue *v, const gchar *s)
+ {
+@@ -99,7 +97,7 @@ gnome_print_filter_parse_prop (GnomePrin
+ }
+ 
+ static int yylex (void *lvalp);
+-static int yyerror (const char *s);
++static int yyerror (void *graph, const char *s);
+ %}
+ 
+ %union {
+@@ -116,7 +114,8 @@ static int yyerror (const char *s);
+ %type <f> filter
+ %type <p> pool
+ 
+-%pure_parser
++%define api.pure
++%parse-param {void *graph}
+ 
+ %start graph
+ %%
+@@ -185,7 +184,7 @@ graph: filter {
+ %%
+ 
+ static int
+-yyerror (const char *s)
++yyerror (void *graph, const char *s)
+ {
+ 	return -1;
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150314/e2ed4a08/attachment.html>


More information about the macports-changes mailing list