mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
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@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
49
sci-electronics/verilator/verilator-4.032.ebuild
Normal file
49
sci-electronics/verilator/verilator-4.032.ebuild
Normal file
@@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="The fast free Verilog/SystemVerilog simulator"
|
||||
HOMEPAGE="
|
||||
https://verilator.org
|
||||
https://github.com/verilator/verilator
|
||||
"
|
||||
|
||||
if [[ "${PV}" == "9999" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
|
||||
else
|
||||
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
|
||||
|
||||
LICENSE="|| ( Artistic-2 LGPL-3 )"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
dev-lang/perl
|
||||
sys-libs/zlib
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
"
|
||||
|
||||
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() {
|
||||
default
|
||||
eautoconf --force
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user