summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-electronics/nvc')
-rw-r--r--sci-electronics/nvc/Manifest1
-rw-r--r--sci-electronics/nvc/nvc-1.10.0.ebuild104
2 files changed, 105 insertions, 0 deletions
diff --git a/sci-electronics/nvc/Manifest b/sci-electronics/nvc/Manifest
index e72b4db912e4..468987d21985 100644
--- a/sci-electronics/nvc/Manifest
+++ b/sci-electronics/nvc/Manifest
@@ -1 +1,2 @@
+DIST nvc-1.10.0.tar.gz 1586847 BLAKE2B 109515c362a2f203104f9fdfb22b2e55795fbc17f6f52a2676834a34c26147de2fa1f6931ddb24cc8e12d71e7d9023fdb1fdb93d8ddeb150cd3a9ec1c7390779 SHA512 66a1884c6f38a2308264ae78c8c224a5028c931225b33ffc37f5dd056be6c06bf2936b1272970967311f095821aaf25da24688924ed3de5d48216d5f20a81833
DIST nvc-1.9.2.tar.gz 1487550 BLAKE2B 54105c3523e252ea4e157b352a702979297c6e45ff84f7e82d9a241d8ae6da1bb4393eb0efaec7a59c7f70631b8b5b1f511e1ef029523180e90d45a04b93af06 SHA512 b6033f1ce1017aeacccf15a0220ad0938f631ce5b7b43c6cb189d6f36fca3f4a930ff3304031b0628c133b5806a9dd1ffc087f439adf85f2fdca0954bb581174
diff --git a/sci-electronics/nvc/nvc-1.10.0.ebuild b/sci-electronics/nvc/nvc-1.10.0.ebuild
new file mode 100644
index 000000000000..f0d51228e05e
--- /dev/null
+++ b/sci-electronics/nvc/nvc-1.10.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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 jit llvm"
+REQUIRED_USE="jit? ( 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:= )
+"
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ dev-libs/check
+ 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() {
+ local ECONF_SOURCE="${NVC_SOURCEDIR}"
+ local -a myconf=(
+ --enable-verilog
+ --enable-vital
+ --with-bash-completion="$(get_bashcompdir)"
+ $(use_enable debug)
+ $(use_enable jit)
+ $(use_enable llvm)
+ )
+ econf "${myconf[@]}"
+
+ export V=1 # Verbose compilation and install.
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ mv "${ED}"/"$(get_bashcompdir)"/nvc{.bash,} || die
+
+ dostrip -x /usr/$(get_libdir)/nvc
+}