summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2024-01-06 19:18:05 +0100
committerMaciej Barć <xgqt@gentoo.org>2024-01-06 19:42:01 +0100
commiteb659e28403037b0902f1ea864379f1884fde8c7 (patch)
treee7cb867702ca0425922099775aaa2effe76af4d7 /sci-electronics/nvc
parentsci-electronics/nvc: drop old 1.11.0 (diff)
downloadgentoo-eb659e28403037b0902f1ea864379f1884fde8c7.tar.gz
gentoo-eb659e28403037b0902f1ea864379f1884fde8c7.tar.bz2
gentoo-eb659e28403037b0902f1ea864379f1884fde8c7.zip
sci-electronics/nvc: bump to 1.11.2
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'sci-electronics/nvc')
-rw-r--r--sci-electronics/nvc/Manifest1
-rw-r--r--sci-electronics/nvc/nvc-1.11.2.ebuild113
2 files changed, 114 insertions, 0 deletions
diff --git a/sci-electronics/nvc/Manifest b/sci-electronics/nvc/Manifest
index 6ac812cf9c20..590cde3d6651 100644
--- a/sci-electronics/nvc/Manifest
+++ b/sci-electronics/nvc/Manifest
@@ -1 +1,2 @@
DIST nvc-1.11.1.tar.gz 1839664 BLAKE2B fe5bb05f7590158a04af8b5e8b748b742f6a624b73add0953ae456a32084301a5a7301cf64593db7827c454678825151165fca720f53bff4bf098728f29f8fd6 SHA512 b77350fa7897105dc6dd850dbf3033a43557f73d17bd7cb36b49c493bc896bb74e47f5daa2b771b7796a64a80f377df56aafd4306bbdbe9a7756b6086ac45b49
+DIST nvc-1.11.2.tar.gz 1842005 BLAKE2B e2d616f70088cfead82931f27ff346e0343b53181c1cd1257ae38790146a0927b5a650e575a91191174c472f2d877cfe596aad879f9af0c043361eb286846648 SHA512 a129ec6a845e956cc55b2158bb8913eedd0b5a3b866726992f2d249d29b268287b60a3e2a74709d146e2bc68696f6bd3db4f1a2003c78a161037d2ae12cfa3d5
diff --git a/sci-electronics/nvc/nvc-1.11.2.ebuild b/sci-electronics/nvc/nvc-1.11.2.ebuild
new file mode 100644
index 000000000000..5ed8a314d8ca
--- /dev/null
+++ b/sci-electronics/nvc/nvc-1.11.2.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_MAX_SLOT=16
+
+inherit autotools bash-completion-r1 llvm
+
+DESCRIPTION="NVC is a VHDL compiler and simulator"
+HOMEPAGE="https://www.nickg.me.uk/nvc/
+ https://github.com/nickg/nvc/"
+
+if [[ "${PV}" == *9999* ]] ; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/nickg/nvc.git"
+
+ NVC_SOURCEDIR="${WORKDIR}"/${PN}-${PV}
+else
+ SRC_URI="https://github.com/nickg/nvc/archive/r${PV}.tar.gz
+ -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+
+ NVC_SOURCEDIR="${WORKDIR}"/${PN}-r${PV}
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="debug llvm"
+RESTRICT="test" # Some tests fail.
+
+RDEPEND="
+ app-arch/bzip2:=
+ app-arch/zstd:=
+ dev-libs/capstone:=
+ dev-libs/elfutils
+ dev-libs/icu:=
+ dev-libs/libffi:=
+ dev-libs/libxml2:=
+ sys-libs/ncurses:=
+ sys-libs/zlib:=
+ llvm? ( <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= )
+"
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-libs/check
+ sys-devel/bison
+ sys-devel/flex
+"
+
+NVC_BUILDDIR="${NVC_SOURCEDIR}_BuildDir"
+S="${NVC_BUILDDIR}"
+
+PATCHES=( "${FILESDIR}/nvc-1.9.2-jit-code-capstone.patch" )
+
+# Special libraries for NVC.
+QA_FLAGS_IGNORED="usr/lib[0-9]*/nvc/preload[0-9]*.so"
+
+pkg_setup() {
+ use llvm && llvm_pkg_setup
+}
+
+src_unpack() {
+ default
+
+ mkdir -p "${S}" || die
+}
+
+src_prepare() {
+ pushd "${NVC_SOURCEDIR}" >/dev/null || die
+
+ default
+ eautoreconf
+
+ popd >/dev/null || die
+}
+
+src_configure() {
+ # Needs "bison" and "flex" exactly.
+ unset LEX
+ unset YACC
+
+ local ECONF_SOURCE="${NVC_SOURCEDIR}"
+ local -a myconf=(
+ --enable-verilog
+ --enable-vital
+ --with-bash-completion="$(get_bashcompdir)"
+ $(use_enable debug)
+ $(use_enable llvm)
+ )
+ econf "${myconf[@]}"
+
+ export V=1 # Verbose compilation and install.
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_test() {
+ PATH="${S}/bin:${PATH}" emake check
+}
+
+src_install() {
+ default
+
+ mv "${D}/$(get_bashcompdir)"/nvc{.bash,} || die
+
+ dostrip -x "/usr/$(get_libdir)/nvc"
+}