guru/sci-electronics/verilator/verilator-9999.ebuild
Anna (cybertailor) Vyalkova bb0aae8ad3
*/*: disable py3.10
Python 3.10 target is scheduled for removal in Gentoo:
https://public-inbox.gentoo.org/gentoo-dev/e6ca9f1f4ababb79ab2a3d005c39b483c3ecef6e.camel@gentoo.org/

Sphinx 8.2.0 already dropped support for CPython 3.10 and PyPy 3.10,
leading to multiple CI failures in ::guru.

We can safely remove this target, because GURU is "experimental" and
does not have stable keywords.

Let's not remove "pypy3" right now because
a) There are not many packages using it.
b) So we can see which packages supported PyPy 3.10, and test them with
   PyPy 3.11.

Closes: https://github.com/gentoo/guru/pull/291
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2025-02-21 17:51:14 +05:00

76 lines
1.7 KiB
Bash

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
PYTHON_COMPAT=( python3_{11..13} )
inherit autotools python-single-r1
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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
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
"
DEPEND="
${RDEPEND}
"
BDEPEND="
sys-devel/bison
sys-devel/flex
test? (
dev-build/cmake
dev-debug/gdb
)
"
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_configure() {
# https://bugs.gentoo.org/887919
econf CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
}
src_test() {
emake test
}