Fix from upstream.

OK?

 - todd

Index: lang/verilator/Makefile
===================================================================
RCS file: /cvs/ports/lang/verilator/Makefile,v
retrieving revision 1.17
diff -u -p -u -r1.17 Makefile
--- lang/verilator/Makefile     12 Jul 2019 20:47:24 -0000      1.17
+++ lang/verilator/Makefile     9 May 2021 22:22:11 -0000
@@ -4,7 +4,7 @@ COMMENT=        very fast free Verilog HDL simu
 
 DISTNAME =     verilator-3.912
 CATEGORIES=    lang devel
-REVISION =     2
+REVISION =     3
 
 HOMEPAGE=      https://www.veripool.org/wiki/verilator/Intro
 
Index: lang/verilator/patches/patch-src_verilog_y
===================================================================
RCS file: lang/verilator/patches/patch-src_verilog_y
diff -N lang/verilator/patches/patch-src_verilog_y
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lang/verilator/patches/patch-src_verilog_y  9 May 2021 22:21:06 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+Fix build with Bison 3.7 and newer
+https://github.com/verilator/verilator/commit/aa39d020d88dd1d5beb3810cf551ff879b7f88a4
+
+Index: src/verilog.y
+--- src/verilog.y.orig
++++ src/verilog.y
+@@ -207,6 +207,15 @@ static void ERRSVKWD(FileLine* fileline, const string&
+ class AstSenTree;
+ %}
+ 
++// We run bison with the -d argument. This tells it to generate a
++// header file with token names. Old versions of bison pasted the
++// contents of that file into the generated source as well; newer
++// versions just include it.
++//
++// Since we run bison through ../bisonpre, it doesn't know the correct
++// header file name, so we need to tell it.
++BISONPRE_VERSION(3.7,%define api.header.include {"V3ParseBison.h"})
++
+ // When writing Bison patterns we use yTOKEN instead of "token",
+ // so Bison will error out on unknown "token"s.
+ 

Reply via email to