Gentoo Archives: gentoo-commits

From: Rui Huang <vowstar@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-electronics/verilator/files/, sci-electronics/verilator/
Date: Wed, 13 May 2020 13:57:50
Message-Id: 1589378177.aa70ccd2c8168a680487d6693fbd9eb2dbbba839.vowstar@gentoo
1 commit: aa70ccd2c8168a680487d6693fbd9eb2dbbba839
2 Author: Huang Rui <vowstar <AT> gmail <DOT> com>
3 AuthorDate: Wed May 13 13:53:28 2020 +0000
4 Commit: Rui Huang <vowstar <AT> gmail <DOT> com>
5 CommitDate: Wed May 13 13:56:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=aa70ccd2
7
8 sci-electronics/verilator: fix compile problem
9
10 After bison upgrade to 3.6.1, caused compile error.
11 bison 3.6.1 generated unexpected nested-comment,
12 but 3.5.4 is no problem.
13 This fix workaround it by remove unexpected nested
14 comment. The test pass.
15
16 Issue: https://github.com/akimd/bison/issues/38
17 Issue: https://github.com/verilator/verilator/issues/2320
18 Package-Manager: Portage-2.3.99, Repoman-2.3.22
19 Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
20
21 .../verilator/files/verilator-4.034-fix-bison.patch | 17 +++++++++++++++++
22 sci-electronics/verilator/verilator-4.034.ebuild | 14 +++++++++++---
23 2 files changed, 28 insertions(+), 3 deletions(-)
24
25 diff --git a/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch b/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch
26 new file mode 100644
27 index 0000000..56d680a
28 --- /dev/null
29 +++ b/sci-electronics/verilator/files/verilator-4.034-fix-bison.patch
30 @@ -0,0 +1,17 @@
31 +diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in
32 +index 911f97e1..63799569 100644
33 +--- a/src/Makefile_obj.in
34 ++++ b/src/Makefile_obj.in
35 +@@ -323,6 +323,12 @@ V3ParseBison.h: V3ParseBison.c
36 + V3ParseBison.c: verilog.y $(BISONPRE)
37 + @echo "If you get errors from verilog.y below, try upgrading bison to version 1.875 or newer."
38 + $(PERL) $(BISONPRE) --yacc ${YACC} -d -v -o V3ParseBison.c $<
39 ++ # Unfortunately bison 3.6.1 have break changes caused compile error.
40 ++ # Workaround issue https://github.com/verilator/verilator/issues/2320
41 ++ # This workaround is safe for the old version of bison.
42 ++ # TODO: code should removed when bison fixed the problem.
43 ++ @sed -ie 's#/\* "/\*.*\*/" \*/##g' V3ParseBison.c
44 ++ @sed -ie 's#/\* "/\*.*\*/" \*/##g' V3ParseBison.h
45 +
46 + V3Lexer_pregen.yy.cpp: verilog.l V3ParseBison.h $(HEADERS)
47 + ${LEX} --version
48
49 diff --git a/sci-electronics/verilator/verilator-4.034.ebuild b/sci-electronics/verilator/verilator-4.034.ebuild
50 index 10df066..bf099b7 100644
51 --- a/sci-electronics/verilator/verilator-4.034.ebuild
52 +++ b/sci-electronics/verilator/verilator-4.034.ebuild
53 @@ -6,13 +6,16 @@ EAPI="7"
54 inherit autotools
55
56 DESCRIPTION="The fast free Verilog/SystemVerilog simulator"
57 -HOMEPAGE="https://www.veripool.org/wiki/verilator"
58 +HOMEPAGE="
59 + https://verilator.org
60 + https://github.com/verilator/verilator
61 +"
62
63 if [[ "${PV}" == "9999" ]] ; then
64 inherit git-r3
65 - EGIT_REPO_URI="https://git.veripool.org/git/${PN}"
66 + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
67 else
68 - SRC_URI="http://www.veripool.org/ftp/${P}.tgz -> ${P}.tar.gz"
69 + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
70 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
71 fi
72
73 @@ -33,6 +36,11 @@ BDEPEND="
74 sys-devel/flex
75 "
76
77 +PATCHES=(
78 + # https://github.com/verilator/verilator/issues/2320
79 + "${FILESDIR}"/${PN}-4.034-fix-bison.patch
80 +)
81 +
82 src_prepare() {
83 default
84 eautoconf --force