summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-12-22 00:52:02 +0100
committerMaciej Barć <xgqt@gentoo.org>2023-12-22 02:03:26 +0100
commit91ce88ddb5740ff8249239955bb71a4aca61bc52 (patch)
tree44cff8f68b6055b4ac4495accf395092c01d55c9 /sci-electronics
parentdev-dotnet/omnisharp-roslyn: new package, add 1.39.11 (diff)
downloadgentoo-91ce88ddb5740ff8249239955bb71a4aca61bc52.tar.gz
gentoo-91ce88ddb5740ff8249239955bb71a4aca61bc52.tar.bz2
gentoo-91ce88ddb5740ff8249239955bb71a4aca61bc52.zip
sci-electronics/nvc: bump to 1.11.1
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'sci-electronics')
-rw-r--r--sci-electronics/nvc/Manifest1
-rw-r--r--sci-electronics/nvc/nvc-1.11.1.ebuild113
2 files changed, 114 insertions, 0 deletions
diff --git a/sci-electronics/nvc/Manifest b/sci-electronics/nvc/Manifest
index 7e746af7f820..1d04eaf0cc3c 100644
--- a/sci-electronics/nvc/Manifest
+++ b/sci-electronics/nvc/Manifest
@@ -1 +1,2 @@
DIST nvc-1.11.0.tar.gz 1839019 BLAKE2B f21317bd4941621d5bcbe5dda43b3b1a0e37e15b5783474c33d2ad840cfd1c6d5aea4873cbf2e41b1dd3fe816eebca6b4dae994f93468ce42437368b953a22a6 SHA512 8f05fbc889f766f6005bbd85ed927b258df15b940208ef330b0c29b4d3b7d35f5a201d301d141be498b2072fa5752e5ce260fb64ee314504585902b69b53a621
+DIST nvc-1.11.1.tar.gz 1839664 BLAKE2B fe5bb05f7590158a04af8b5e8b748b742f6a624b73add0953ae456a32084301a5a7301cf64593db7827c454678825151165fca720f53bff4bf098728f29f8fd6 SHA512 b77350fa7897105dc6dd850dbf3033a43557f73d17bd7cb36b49c493bc896bb74e47f5daa2b771b7796a64a80f377df56aafd4306bbdbe9a7756b6086ac45b49
diff --git a/sci-electronics/nvc/nvc-1.11.1.ebuild b/sci-electronics/nvc/nvc-1.11.1.ebuild
new file mode 100644
index 000000000000..6dd03d3a04b4
--- /dev/null
+++ b/sci-electronics/nvc/nvc-1.11.1.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2023 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"
+}