[133989] trunk/dports/security/openvas-libnasl

larryv at macports.org larryv at macports.org
Mon Mar 16 15:20:03 PDT 2015


Revision: 133989
          https://trac.macports.org/changeset/133989
Author:   larryv at macports.org
Date:     2015-03-16 15:20:03 -0700 (Mon, 16 Mar 2015)
Log Message:
-----------
openvas-libnasl: Fix build with Bison 3 (#47164)

Modified Paths:
--------------
    trunk/dports/security/openvas-libnasl/Portfile

Added Paths:
-----------
    trunk/dports/security/openvas-libnasl/files/bison3.patch

Modified: trunk/dports/security/openvas-libnasl/Portfile
===================================================================
--- trunk/dports/security/openvas-libnasl/Portfile	2015-03-16 21:03:27 UTC (rev 133988)
+++ trunk/dports/security/openvas-libnasl/Portfile	2015-03-16 22:20:03 UTC (rev 133989)
@@ -35,7 +35,8 @@
     path:bin/gpgme-config:gpgme \
     path:bin/libopenvas-config:openvas-libraries
 
-patchfiles              patch-configure.diff
+patchfiles              patch-configure.diff \
+                        bison3.patch
 
 use_parallel_build      yes
 

Added: trunk/dports/security/openvas-libnasl/files/bison3.patch
===================================================================
--- trunk/dports/security/openvas-libnasl/files/bison3.patch	                        (rev 0)
+++ trunk/dports/security/openvas-libnasl/files/bison3.patch	2015-03-16 22:20:03 UTC (rev 133989)
@@ -0,0 +1,41 @@
+Replace YYPARSE_PARAM (which Bison 3 no longer supports) with
+%parse-param and update function prototypes as necessary.
+Index: nasl/nasl_grammar.y
+===================================================================
+--- nasl/nasl_grammar.y.orig
++++ nasl/nasl_grammar.y
+@@ -1,4 +1,5 @@
+-%pure_parser
++%define api.pure
++%param {void * parm}
+ %expect 1
+ %{
+ /* Nessus Attack Scripting Language version 2
+@@ -19,9 +20,6 @@
+  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
+ 
+-#define YYPARSE_PARAM parm
+-#define YYLEX_PARAM parm
+-
+ #define LNB	(((naslctxt*)parm)->line_nb)
+ #include "includes.h"
+ #include "nasl_tree.h"
+@@ -32,7 +30,7 @@
+ #include "nasl_debug.h"
+ #include "nasl_signature.h"
+ 
+-static void naslerror(const char *);
++static void naslerror(void *, const char *);
+ #define YYERROR_VERBOSE
+ %}
+ 
+@@ -470,7 +468,7 @@ glob: GLOBAL arg_decl 
+ #include <stdlib.h>
+ 
+ static void 
+-naslerror(const char *s)
++naslerror(void *parm, const char *s)
+ {
+   fputs(s, stderr);
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150316/af372994/attachment.html>


More information about the macports-changes mailing list