From beda3b0916fea75e77f65f97a6ba307b215b9450e2643c68f0e2a83c0e97b60a Mon Sep 17 00:00:00 2001 From: Factory Maintainer Date: Wed, 21 Jan 2015 07:12:18 +0000 Subject: [PATCH] Accepting request 282091 from home:dimstar:branches:network:utilities Fix build with bison 3.0 OBS-URL: https://build.opensuse.org/request/show/282091 OBS-URL: https://build.opensuse.org/package/show/network:utilities/libsmi?expand=0&rev=14 --- libsmi-bison-3.0.patch | 84 ++++++++++++++++++++++++++++++++++++++++++ libsmi.changes | 5 +++ libsmi.spec | 4 +- 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 libsmi-bison-3.0.patch diff --git a/libsmi-bison-3.0.patch b/libsmi-bison-3.0.patch new file mode 100644 index 0000000..d5cad35 --- /dev/null +++ b/libsmi-bison-3.0.patch @@ -0,0 +1,84 @@ +Description: follow flex parameter specification change + Follow change from *_PARAM to %*-param after deprecation in flex. + Follow yyerror() parameterisation changes. +Author: Andy Whitcroft + +Index: libsmi-0.4.8/lib/parser-smi.y +=================================================================== +--- libsmi-0.4.8.orig/lib/parser-smi.y ++++ libsmi-0.4.8/lib/parser-smi.y +@@ -11,6 +11,9 @@ + * @(#) $Id: parser-smi.y 8090 2008-04-18 12:56:29Z strauss $ + */ + ++%parse-param { struct Parser *parserPtr } ++%lex-param { struct Parser *parserPtr } ++ + %{ + + #include +@@ -43,14 +46,6 @@ + + + +-/* +- * These arguments are passed to yyparse() and yylex(). +- */ +-#define YYPARSE_PARAM parserPtr +-#define YYLEX_PARAM parserPtr +- +- +- + #define thisParserPtr ((Parser *)parserPtr) + #define thisModulePtr (((Parser *)parserPtr)->modulePtr) + +Index: libsmi-0.4.8/lib/parser-sming.y +=================================================================== +--- libsmi-0.4.8.orig/lib/parser-sming.y ++++ libsmi-0.4.8/lib/parser-sming.y +@@ -11,6 +11,9 @@ + * @(#) $Id: parser-sming.y 7966 2008-03-27 21:25:52Z schoenw $ + */ + ++%parse-param { struct Parser *parserPtr } ++%lex-param { struct Parser *parserPtr } ++ + %{ + + #include +@@ -48,13 +51,6 @@ + #endif + + +-/* +- * These arguments are passed to yyparse() and yylex(). +- */ +-#define YYPARSE_PARAM parserPtr +-#define YYLEX_PARAM parserPtr +- +- + + #define thisParserPtr ((Parser *)parserPtr) + #define thisModulePtr (((Parser *)parserPtr)->modulePtr) +@@ -1556,7 +1552,7 @@ identityStatement: identityKeyword sep l + referenceStatement_stmtsep_01 + { + setIdentityReference(identityPtr, $14, +- thisParserPtr) ++ thisParserPtr); + } + '}' optsep ';' + { +Index: libsmi-0.4.8/lib/error.h +=================================================================== +--- libsmi-0.4.8.orig/lib/error.h ++++ libsmi-0.4.8/lib/error.h +@@ -22,7 +22,7 @@ + #ifdef yyerror + #undef yyerror + #endif +-#define yyerror(msg) smiyyerror(msg, parserPtr) ++#define yyerror(parserPtr, msg) smiyyerror(msg, parserPtr) + + + extern int smiErrorLevel; /* Higher levels produce more warnings */ diff --git a/libsmi.changes b/libsmi.changes index ce6145d..971862c 100644 --- a/libsmi.changes +++ b/libsmi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 20 14:17:06 UTC 2015 - dimstar@opensuse.org + +- Add libsmi-bison-3.0.patch: Fix build with bison 3.0. + ------------------------------------------------------------------- Mon Apr 15 13:54:52 UTC 2013 - mmeister@suse.com diff --git a/libsmi.spec b/libsmi.spec index a93413a..ea538ea 100644 --- a/libsmi.spec +++ b/libsmi.spec @@ -1,7 +1,7 @@ # # spec file for package libsmi # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,7 @@ Patch0: libsmi-0.4.8-parser.patch Patch1: libsmi-0.4.8-gnu-source.patch Patch2: libsmi-CVE-2010-2891.patch Patch3: libsmi-flex.patch +Patch4: libsmi-bison-3.0.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison BuildRequires: flex @@ -80,6 +81,7 @@ libsmi. %if 0%{?suse_version} > 1220 %patch3 -p1 %endif +%patch4 -p1 %build autoreconf --force --install