From 4c2565649ac3b1ec88af78c821948557a0cca481 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Sun, 26 Jul 2015 15:20:30 +0100 Subject: development/xxdiff: Updated SlackBuild. Patched for building with bison-3 on -current. Signed-off-by: David Spencer --- ...f-e3cdca0088916446b019dcbf8ea7164cc5f788ac.diff | 115 +++++++++++++++++++++ development/xxdiff/xxdiff.SlackBuild | 4 + 2 files changed, 119 insertions(+) create mode 100644 development/xxdiff/xxdiff-e3cdca0088916446b019dcbf8ea7164cc5f788ac.diff (limited to 'development') diff --git a/development/xxdiff/xxdiff-e3cdca0088916446b019dcbf8ea7164cc5f788ac.diff b/development/xxdiff/xxdiff-e3cdca0088916446b019dcbf8ea7164cc5f788ac.diff new file mode 100644 index 0000000000..fc39adbc7e --- /dev/null +++ b/development/xxdiff/xxdiff-e3cdca0088916446b019dcbf8ea7164cc5f788ac.diff @@ -0,0 +1,115 @@ +# HG changeset patch +# User Martin Blais +# Date 1407690283 14400 +# Node ID e3cdca0088916446b019dcbf8ea7164cc5f788ac +# Parent 5ebaec3d8cb9bb8eaf0600acee495a1ffc28b67c +Applied patch from for bison 3.0.2 + +diff --git a/src/resParser.cpp b/src/resParser.cpp +--- a/src/resParser.cpp ++++ b/src/resParser.cpp +@@ -73,7 +73,7 @@ + + //------------------------------------------------------------------------------ + // +-void resParsererror( const char* msg ) ++void resParsererror( XxResources *, const char* msg ) + { + // Send errors to stdout so we can filter out the debug info shmeglu while + // debugging parser. +@@ -794,7 +794,7 @@ + QString os; + QTextStream oss( &os ); + oss << "Unknown " << errmsg << ": " << name << flush; +- resParsererror( os.toLatin1().constData() ); ++ resParsererror( NULL, os.toLatin1().constData() ); + } + num = ERROR_TOKEN; + return ERROR_TOKEN; +diff --git a/src/resParser.l b/src/resParser.l +--- a/src/resParser.l ++++ b/src/resParser.l +@@ -76,7 +76,7 @@ + result = YY_NULL; \ + } \ + else { \ +- int ii = 0; \ ++ unsigned ii = 0; \ + for ( ; (ii < max_size) && (!input_stream_ptr->atEnd()); ++ii ) { \ + (*input_stream_ptr) >> buf[ii]; \ + } \ +diff --git a/src/resParser.y b/src/resParser.y +--- a/src/resParser.y ++++ b/src/resParser.y +@@ -20,11 +20,6 @@ + * + ******************************************************************************/ + +-%union +-{ +- int num; +- char* str; +-} + %{ + + // xxdiff imports +@@ -39,12 +34,22 @@ + + // The parser input is the resources object to fill in. + #define RESOURCES ( static_cast(resources) ) +-#define YYPARSE_PARAM resources ++%} + ++%define api.pure full ++%parse-param {XxResources * resources} ++ ++%union ++{ ++ int num; ++ char* str; ++} ++ ++%{ + // Declare lexer from other compilation unit. + int resParserlex( YYSTYPE* yylval ); + +-void resParsererror( const char* msg ); ++void resParsererror( XxResources *, const char* msg ); + + // Declare some parser functions and data defined in resParser.cpp + namespace XxResParserNS { +@@ -144,7 +149,6 @@ + %type boolkwd + + %start xxdiffrc +-%pure_parser + + %% + xxdiffrc : stmts +@@ -188,7 +192,7 @@ + RESOURCES->setPreferredGeometry( geometry ); + } + else { +- yyerror( "Bad geometry specification." ); ++ yyerror( NULL, "Bad geometry specification." ); + // Should never happen, the lexer regexp should be tough + // enough. + } +@@ -212,7 +216,7 @@ + QString err = QString( "Requested style key does not exist." ); + err += QString( "\nValid styles are: " ); + err += styles.join( ", " ); +- yyerror( err.toLatin1().constData() ); ++ yyerror( NULL, err.toLatin1().constData() ); + } + } + ; +@@ -224,7 +228,7 @@ + char buf[2048]; + ::snprintf( buf, 2048, + "Unrecognized accelerator: %s\n", $5 ); +- yyerror( buf ); ++ yyerror( NULL, buf ); + } + } + ; diff --git a/development/xxdiff/xxdiff.SlackBuild b/development/xxdiff/xxdiff.SlackBuild index 479511df34..eaf1563b36 100644 --- a/development/xxdiff/xxdiff.SlackBuild +++ b/development/xxdiff/xxdiff.SlackBuild @@ -51,6 +51,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Fix for bison-3 +# https://bitbucket.org/blais/xxdiff/commits/e3cdca0088916446b019dcbf8ea7164cc5f788ac/raw/ +patch -p1 < $CWD/xxdiff-e3cdca0088916446b019dcbf8ea7164cc5f788ac.diff + cd src QMAKE=`which qmake` make -f Makefile.bootstrap Makefile make -- cgit v1.2.3