diff --git a/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch b/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch new file mode 100644 index 0000000000..56d680a7f2 --- /dev/null +++ b/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch @@ -0,0 +1,17 @@ +diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in +index 911f97e1..63799569 100644 +--- a/src/Makefile_obj.in ++++ b/src/Makefile_obj.in +@@ -323,6 +323,12 @@ V3ParseBison.h: V3ParseBison.c + V3ParseBison.c: verilog.y $(BISONPRE) + @echo "If you get errors from verilog.y below, try upgrading bison to version 1.875 or newer." + $(PERL) $(BISONPRE) --yacc ${YACC} -d -v -o V3ParseBison.c $< ++ # Unfortunately bison 3.6.1 have break changes caused compile error. ++ # Workaround issue https://github.com/verilator/verilator/issues/2320 ++ # This workaround is safe for the old version of bison. ++ # TODO: code should removed when bison fixed the problem. ++ @sed -ie 's#/\* "/\*.*\*/" \*/##g' V3ParseBison.c ++ @sed -ie 's#/\* "/\*.*\*/" \*/##g' V3ParseBison.h + + V3Lexer_pregen.yy.cpp: verilog.l V3ParseBison.h $(HEADERS) + ${LEX} --version diff --git a/sci-electronics/verilator/verilator-4.034.ebuild b/sci-electronics/verilator/verilator-4.034.ebuild index 10df06610e..bf099b7dc0 100644 --- a/sci-electronics/verilator/verilator-4.034.ebuild +++ b/sci-electronics/verilator/verilator-4.034.ebuild @@ -6,13 +6,16 @@ EAPI="7" inherit autotools DESCRIPTION="The fast free Verilog/SystemVerilog simulator" -HOMEPAGE="https://www.veripool.org/wiki/verilator" +HOMEPAGE=" + https://verilator.org + https://github.com/verilator/verilator +" if [[ "${PV}" == "9999" ]] ; then inherit git-r3 - EGIT_REPO_URI="https://git.veripool.org/git/${PN}" + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" else - SRC_URI="http://www.veripool.org/ftp/${P}.tgz -> ${P}.tar.gz" + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi @@ -33,6 +36,11 @@ BDEPEND=" sys-devel/flex " +PATCHES=( + # https://github.com/verilator/verilator/issues/2320 + "${FILESDIR}"/${PN}-4.034-fix-bison.patch +) + src_prepare() { default eautoconf --force