commit: 5f6cb896224af37d7907cc4844b7ae5bf7415483 Author: Huang Rui <vowstar <AT> gmail <DOT> com> AuthorDate: Sun Aug 23 07:10:12 2020 +0000 Commit: Rui Huang <vowstar <AT> gmail <DOT> com> CommitDate: Sun Aug 23 07:10:12 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5f6cb896
sci-electronics/verilator: backport patches from upstream Backport patches for old versions Package-Manager: Portage-3.0.3, Repoman-3.0.0 Signed-off-by: Huang Rui <vowstar <AT> gmail.com> sci-electronics/verilator/Manifest | 1 + .../files/verilator-4.034-fix-bison.patch | 30 ++++++++++------------ ...rilator-4.038.ebuild => verilator-4.032.ebuild} | 2 ++ sci-electronics/verilator/verilator-4.034.ebuild | 2 ++ sci-electronics/verilator/verilator-4.036.ebuild | 4 +-- sci-electronics/verilator/verilator-4.038.ebuild | 4 +-- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/sci-electronics/verilator/Manifest b/sci-electronics/verilator/Manifest index b383ef2..0966b7c 100644 --- a/sci-electronics/verilator/Manifest +++ b/sci-electronics/verilator/Manifest @@ -1,3 +1,4 @@ +DIST verilator-4.032.tar.gz 2497830 BLAKE2B eb318e0326be9f72b32bd98f8a6de74516bda4bdf2d21d572c72e92759a4ee64e514fdb3dae20c8bea40e72d493775a02766e7ea619dd8eb541f3450278b0b20 SHA512 2b34d0b6d94babb74b443b3f3ae4e6c9f15423a0b078df72930c4f75b4a831843a4d4b901dc586725a67a49c6f5308402fef4c9ca72b88b13b01746b36d2fb20 DIST verilator-4.034.tar.gz 1998271 BLAKE2B 456ee4c8e7d28dd979f74cd8c6b5e734d33267b5dba1926f82b6827fbc1b2625aafc4f4d088c961be1632957966ab350767f836ed7eee1f1f01b4315f1c8f2b2 SHA512 5651cf2c102df10b3784799968f8e554d0116487a962b99fd03526b71af67cb49c932eaaef260b19cbfc80a47747dd6e8d04b461f663522cd1f05ad9843002d3 DIST verilator-4.036.tar.gz 2064470 BLAKE2B 210d39747e132ce1de8673e971c8765a28eeb23f30902dd032acb67a6d5f9fce2eae8c4edec00b839c6e81ff0985a99e4b065b4a570531f393d47802121eea93 SHA512 2f83bf144346aed4ff6bd208af56ed19cbe562c51324b8dc3243419b63734ff15c805fd6e7d5c2109af9cf51f7d44e249d7f1cc1a383bab428503de317e1d60c DIST verilator-4.038.tar.gz 2085353 BLAKE2B 330162ed8786b6ac1127e844224ad4a3cfc20e6bc2bbf8f1662ae23e3b18b8b908b145390a2e284ff2b70299b9475d25da7eb23643c70b617d95061c7a4a79c3 SHA512 a963aeccd4bb36a3ac39a5e831ec2600b87c0b46c787fa38900b7bd0ae59fb75dbfaf6261d1050ae1bd29fdb8b0b6a1957f08559c36c498f49738819b4d56d68 diff --git a/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch b/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch index 56d680a..b7eb095 100644 --- a/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch +++ b/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch @@ -1,17 +1,13 @@ -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/src/bisonpre b/src/bisonpre +index 39597957..48cf26eb 100755 +--- a/src/bisonpre ++++ b/src/bisonpre +@@ -212,6 +212,8 @@ sub clean_output { + $line =~ s!\(YY_\("!(YY_((char*)"!g; + # Fix bison 2.3 glr-parser warning about yyerrorloc.YYTYPE::yydummy uninit + $line =~ s!(YYLTYPE yyerrloc;)!$1 yyerrloc.yydummy=0;/*bisonpre*/!g; ++ # Fix bison 3.6.1 unexpected nested-comment ++ $line =~ s!/\* "/\*.*\*/" \*/!!g; + $fh->write($line); + } + $fh->close; diff --git a/sci-electronics/verilator/verilator-4.038.ebuild b/sci-electronics/verilator/verilator-4.032.ebuild similarity index 90% copy from sci-electronics/verilator/verilator-4.038.ebuild copy to sci-electronics/verilator/verilator-4.032.ebuild index bf099b7..e308400 100644 --- a/sci-electronics/verilator/verilator-4.038.ebuild +++ b/sci-electronics/verilator/verilator-4.032.ebuild @@ -39,6 +39,8 @@ BDEPEND=" PATCHES=( # https://github.com/verilator/verilator/issues/2320 "${FILESDIR}"/${PN}-4.034-fix-bison.patch + # https://github.com/verilator/verilator/pull/2505 + "${FILESDIR}"/${PN}-4.040-fix-bison.patch ) src_prepare() { diff --git a/sci-electronics/verilator/verilator-4.034.ebuild b/sci-electronics/verilator/verilator-4.034.ebuild index bf099b7..e308400 100644 --- a/sci-electronics/verilator/verilator-4.034.ebuild +++ b/sci-electronics/verilator/verilator-4.034.ebuild @@ -39,6 +39,8 @@ BDEPEND=" PATCHES=( # https://github.com/verilator/verilator/issues/2320 "${FILESDIR}"/${PN}-4.034-fix-bison.patch + # https://github.com/verilator/verilator/pull/2505 + "${FILESDIR}"/${PN}-4.040-fix-bison.patch ) src_prepare() { diff --git a/sci-electronics/verilator/verilator-4.036.ebuild b/sci-electronics/verilator/verilator-4.036.ebuild index bf099b7..38ade43 100644 --- a/sci-electronics/verilator/verilator-4.036.ebuild +++ b/sci-electronics/verilator/verilator-4.036.ebuild @@ -37,8 +37,8 @@ BDEPEND=" " PATCHES=( - # https://github.com/verilator/verilator/issues/2320 - "${FILESDIR}"/${PN}-4.034-fix-bison.patch + # https://github.com/verilator/verilator/pull/2505 + "${FILESDIR}"/${PN}-4.040-fix-bison.patch ) src_prepare() { diff --git a/sci-electronics/verilator/verilator-4.038.ebuild b/sci-electronics/verilator/verilator-4.038.ebuild index bf099b7..38ade43 100644 --- a/sci-electronics/verilator/verilator-4.038.ebuild +++ b/sci-electronics/verilator/verilator-4.038.ebuild @@ -37,8 +37,8 @@ BDEPEND=" " PATCHES=( - # https://github.com/verilator/verilator/issues/2320 - "${FILESDIR}"/${PN}-4.034-fix-bison.patch + # https://github.com/verilator/verilator/pull/2505 + "${FILESDIR}"/${PN}-4.040-fix-bison.patch ) src_prepare() {