[133941] trunk/dports/devel/xxdiff
larryv at macports.org
larryv at macports.org
Sun Mar 15 17:17:12 PDT 2015
Revision: 133941
https://trac.macports.org/changeset/133941
Author: larryv at macports.org
Date: 2015-03-15 17:17:12 -0700 (Sun, 15 Mar 2015)
Log Message:
-----------
xxdiff: Fix build with Bison 3 (comment:47:ticket:41600)
Modified Paths:
--------------
trunk/dports/devel/xxdiff/Portfile
Added Paths:
-----------
trunk/dports/devel/xxdiff/files/
trunk/dports/devel/xxdiff/files/bison3.patch
Modified: trunk/dports/devel/xxdiff/Portfile
===================================================================
--- trunk/dports/devel/xxdiff/Portfile 2015-03-16 00:17:09 UTC (rev 133940)
+++ trunk/dports/devel/xxdiff/Portfile 2015-03-16 00:17:12 UTC (rev 133941)
@@ -27,6 +27,9 @@
sha1 ab2848fd9279f55b5db270f319ad4791154ecf82 \
rmd160 12e7527f39713b925f05b687c2ad8b60459bb670
+# https://trac.macports.org/ticket/41600#comment:47
+patchfiles bison3.patch
+
# "Configure" and build adapted from README.build.
build.type gnu
Added: trunk/dports/devel/xxdiff/files/bison3.patch
===================================================================
--- trunk/dports/devel/xxdiff/files/bison3.patch (rev 0)
+++ trunk/dports/devel/xxdiff/files/bison3.patch 2015-03-16 00:17:12 UTC (rev 133941)
@@ -0,0 +1,90 @@
+Replace YYPARSE_PARAM (which Bison 3 no longer supports) with
+%parse-param and update function prototypes as necessary.
+Index: src/resParser.y
+===================================================================
+--- src/resParser.y.orig
++++ src/resParser.y
+@@ -37,14 +37,10 @@
+ #include <qrect.h>
+ #include <qstylefactory.h>
+
+-// The parser input is the resources object to fill in.
+-#define RESOURCES ( static_cast<XxResources*>(resources) )
+-#define YYPARSE_PARAM resources
+-
+ // Declare lexer from other compilation unit.
+ int resParserlex( YYSTYPE* yylval );
+
+-void resParsererror( const char* msg );
++void resParsererror( XxResources* RESOURCES, const char* msg );
+
+ // Declare some parser functions and data defined in resParser.cpp
+ namespace XxResParserNS {
+@@ -144,7 +140,12 @@ using namespace XxResParserNS; // Make s
+ %type <num> boolkwd
+
+ %start xxdiffrc
+-%pure_parser
++%define api.pure
++
++%code requires {
++ #include <resources.h>
++}
++%parse-param {XxResources* RESOURCES}
+
+ %%
+ xxdiffrc : stmts
+@@ -188,7 +189,7 @@ prefgeometry : PREFGEOMETRY COLON GEOMSP
+ RESOURCES->setPreferredGeometry( geometry );
+ }
+ else {
+- yyerror( "Bad geometry specification." );
++ yyerror( RESOURCES, "Bad geometry specification." );
+ // Should never happen, the lexer regexp should be tough
+ // enough.
+ }
+@@ -216,7 +217,7 @@ style : STYLE COLON STRING
+ err += QString( "\nValid styles are: " );
+ err += styles.join( ", " );
+ #endif
+- yyerror( err.latin1() );
++ yyerror( RESOURCES, err.latin1() );
+ #if (QT_VERSION >= 0x030000)
+ }
+ #endif
+@@ -230,7 +231,7 @@ accel : ACCEL DOT ACCELNAME COLON STRIN
+ char buf[2048];
+ ::snprintf( buf, 2048,
+ "Unrecognized accelerator: %s\n", $5 );
+- yyerror( buf );
++ yyerror( RESOURCES, buf );
+ }
+ }
+ ;
+Index: src/resParser.cpp
+===================================================================
+--- src/resParser.cpp.orig
++++ src/resParser.cpp
+@@ -69,11 +69,11 @@
+ *============================================================================*/
+
+ // Parser routine defined in the yacc parser.
+-extern int resParserparse( void* );
++extern int resParserparse( XxResources* );
+
+ //------------------------------------------------------------------------------
+ //
+-void resParsererror( const char* msg )
++void resParsererror( XxResources* RESOURCES, const char* msg )
+ {
+ // Send errors to stdout so we can filter out the debug info shmeglu while
+ // debugging parser.
+@@ -786,7 +786,7 @@ int parseFromKeywordList(
+ QString os;
+ QTextOStream oss( &os );
+ oss << "Unknown " << errmsg << ": " << name << flush;
+- resParsererror( os.latin1() );
++ resParsererror( NULL, os.latin1() );
+ }
+ num = ERROR_TOKEN;
+ return ERROR_TOKEN;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150315/3fba4a6a/attachment.html>
More information about the macports-changes
mailing list