public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Rui Huang" <vowstar@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-electronics/verilator/
Date: Mon, 18 Mar 2024 13:20:05 +0000 (UTC)	[thread overview]
Message-ID: <1710767949.01e3aec7e7e42a3ff27a057482656b825e1648ed.vowstar@gentoo> (raw)

commit:     01e3aec7e7e42a3ff27a057482656b825e1648ed
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Mon Mar 18 13:19:09 2024 +0000
Commit:     Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Mon Mar 18 13:19:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=01e3aec7

sci-electronics/verilator: fix compile bugs

- fix fails to compile with dev-lang/python-exec[-native-symlinks]
- fix adds debug flags (-g/-ggdb) on its own

Closes: https://bugs.gentoo.org/785151
Closes: https://bugs.gentoo.org/887917
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>

 sci-electronics/verilator/verilator-5.022.ebuild | 29 +++++++++++++++++++++-
 sci-electronics/verilator/verilator-9999.ebuild  | 31 ++++++++++++++++++++++--
 2 files changed, 57 insertions(+), 3 deletions(-)

diff --git a/sci-electronics/verilator/verilator-5.022.ebuild b/sci-electronics/verilator/verilator-5.022.ebuild
index a71b2db38c..b5557f2f17 100644
--- a/sci-electronics/verilator/verilator-5.022.ebuild
+++ b/sci-electronics/verilator/verilator-5.022.ebuild
@@ -3,7 +3,9 @@
 
 EAPI="8"
 
-inherit autotools
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit autotools python-single-r1
 
 DESCRIPTION="The fast free Verilog/SystemVerilog simulator"
 HOMEPAGE="
@@ -21,8 +23,12 @@ fi
 
 LICENSE="|| ( Artistic-2 LGPL-3 )"
 SLOT="0"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
 
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 RDEPEND="
+	${PYTHON_DEPS}
 	dev-lang/perl
 	sys-libs/zlib
 "
@@ -34,13 +40,34 @@ DEPEND="
 BDEPEND="
 	sys-devel/bison
 	sys-devel/flex
+	test? (
+		dev-build/cmake
+	)
 "
 
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
 src_prepare() {
 	default
 	if [[ ! "${PV}" == "9999" ]] ; then
 		# https://github.com/verilator/verilator/issues/3352
 		sed -i "s/UNKNOWN_REV/(Gentoo ${PVR})/g" "${S}"/src/config_rev || die
 	fi
+	# https://bugs.gentoo.org/785151
+	sed -i "s/python3/${EPYTHON}/g" "${S}"/configure.ac || die
+	find . -name "Makefile" -exec sed -i "s/python3/${EPYTHON}/g" {} + || die
+	find test_regress -type f -exec sed -i "s/python3/${EPYTHON}/g" {} + || die
+	python_fix_shebang .
+	# https://bugs.gentoo.org/887917
+	if ! use debug; then
+		sed -i '/AC_SUBST(CFG_CXXFLAGS_DEBUG)/i CFG_CXXFLAGS_DEBUG=""' "${S}"/configure.ac || die
+		sed -i '/AC_SUBST(CFG_LDFLAGS_DEBUG)/i CFG_LDFLAGS_DEBUG=""' "${S}"/configure.ac || die
+	fi
 	eautoconf --force
 }
+
+src_test() {
+	emake test
+}

diff --git a/sci-electronics/verilator/verilator-9999.ebuild b/sci-electronics/verilator/verilator-9999.ebuild
index 644cb0bfca..b5557f2f17 100644
--- a/sci-electronics/verilator/verilator-9999.ebuild
+++ b/sci-electronics/verilator/verilator-9999.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="8"
 
-inherit autotools
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit autotools python-single-r1
 
 DESCRIPTION="The fast free Verilog/SystemVerilog simulator"
 HOMEPAGE="
@@ -21,8 +23,12 @@ fi
 
 LICENSE="|| ( Artistic-2 LGPL-3 )"
 SLOT="0"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
 
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 RDEPEND="
+	${PYTHON_DEPS}
 	dev-lang/perl
 	sys-libs/zlib
 "
@@ -34,13 +40,34 @@ DEPEND="
 BDEPEND="
 	sys-devel/bison
 	sys-devel/flex
+	test? (
+		dev-build/cmake
+	)
 "
 
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
 src_prepare() {
 	default
 	if [[ ! "${PV}" == "9999" ]] ; then
 		# https://github.com/verilator/verilator/issues/3352
 		sed -i "s/UNKNOWN_REV/(Gentoo ${PVR})/g" "${S}"/src/config_rev || die
 	fi
+	# https://bugs.gentoo.org/785151
+	sed -i "s/python3/${EPYTHON}/g" "${S}"/configure.ac || die
+	find . -name "Makefile" -exec sed -i "s/python3/${EPYTHON}/g" {} + || die
+	find test_regress -type f -exec sed -i "s/python3/${EPYTHON}/g" {} + || die
+	python_fix_shebang .
+	# https://bugs.gentoo.org/887917
+	if ! use debug; then
+		sed -i '/AC_SUBST(CFG_CXXFLAGS_DEBUG)/i CFG_CXXFLAGS_DEBUG=""' "${S}"/configure.ac || die
+		sed -i '/AC_SUBST(CFG_LDFLAGS_DEBUG)/i CFG_LDFLAGS_DEBUG=""' "${S}"/configure.ac || die
+	fi
 	eautoconf --force
 }
+
+src_test() {
+	emake test
+}


             reply	other threads:[~2024-03-18 13:20 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 13:20 Rui Huang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-11  8:31 [gentoo-commits] repo/proj/guru:dev commit in: sci-electronics/verilator/ Rui Huang
2024-10-10  5:28 Rui Huang
2024-10-10  5:28 Rui Huang
2024-10-10  5:28 Rui Huang
2024-10-10  5:28 Rui Huang
2024-04-30  8:21 Rui Huang
2024-04-30  8:21 Rui Huang
2024-04-04 10:08 Florian Schmaus
2024-03-18 13:20 Rui Huang
2024-03-16  5:57 [gentoo-commits] repo/proj/guru:master " Rui Huang
2024-03-16  5:56 ` [gentoo-commits] repo/proj/guru:dev " Rui Huang
2024-03-16  5:56 Rui Huang
2023-11-15  6:53 Rui Huang
2023-11-03  9:47 Rui Huang
2023-11-03  9:47 Rui Huang
2023-08-09  6:22 Rui Huang
2023-03-31  5:18 Rui Huang
2023-03-31  5:18 Rui Huang
2023-01-31  4:22 Rui Huang
2023-01-31  4:22 Rui Huang
2023-01-31  4:22 Rui Huang
2023-01-06  8:37 Rui Huang
2023-01-06  8:37 Rui Huang
2022-11-21  7:47 Rui Huang
2022-10-25  1:26 Rui Huang
2022-10-25  1:24 Rui Huang
2022-09-06  3:10 Rui Huang
2022-09-06  3:09 Rui Huang
2022-07-08  5:00 Rui Huang
2022-07-08  5:00 Rui Huang
2022-07-08  5:00 Rui Huang
2022-07-08  5:00 Rui Huang
2022-04-01  3:24 Rui Huang
2022-04-01  3:24 Rui Huang
2022-02-15 10:51 Rui Huang
2021-07-28  2:41 Rui Huang
2021-07-12  3:24 Rui Huang
2021-07-12  3:22 Rui Huang
2021-06-28  3:51 Rui Huang
2021-04-29 10:52 Rui Huang
2021-04-05  1:50 Rui Huang
2021-04-05  1:49 Rui Huang
2021-03-10  3:52 Rui Huang
2021-03-10  3:52 Rui Huang
2021-01-21  6:39 Rui Huang
2021-01-21  6:39 Rui Huang
2021-01-01  9:55 Rui Huang
2020-12-06 11:04 Rui Huang
2020-12-06 11:04 Rui Huang
2020-11-16 10:21 Rui Huang
2020-11-16 10:21 Rui Huang
2020-10-20  6:58 Rui Huang
2020-10-20  6:54 Rui Huang
2020-09-18  9:22 Rui Huang
2020-07-24  2:19 Rui Huang
2020-06-13 13:29 Rui Huang
2020-05-14  7:47 Rui Huang
2020-05-13 13:57 Rui Huang
2020-05-12  4:00 Rui Huang
2020-05-12  4:00 Rui Huang
2020-04-27  7:46 Rui Huang
2020-04-27  7:46 Rui Huang
2020-04-26 22:39 Alessandro Barbieri
2020-04-11 14:43 Rui Huang
2020-04-07  8:01 Rui Huang
2020-04-07  7:08 Rui Huang
2020-04-07  7:06 Rui Huang
2020-03-27 12:40 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan
2020-03-27 12:40 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
2020-03-15 11:29 Andrew Ammerlaan
2020-02-23  6:55 Rui Huang
2020-02-23  6:55 Rui Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1710767949.01e3aec7e7e42a3ff27a057482656b825e1648ed.vowstar@gentoo \
    --to=vowstar@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox