commit: a4e2a5f77b7b39f3b6da276a6d3b76bf722b1ac4 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> AuthorDate: Mon Mar 11 10:42:35 2024 +0000 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> CommitDate: Mon Mar 11 11:17:48 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4e2a5f7
sci-electronics/ghdl: bump to 4.0.0 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> sci-electronics/ghdl/Manifest | 1 + sci-electronics/ghdl/ghdl-4.0.0.ebuild | 90 ++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) diff --git a/sci-electronics/ghdl/Manifest b/sci-electronics/ghdl/Manifest index 854f17174cb9..f4d7f2d221bc 100644 --- a/sci-electronics/ghdl/Manifest +++ b/sci-electronics/ghdl/Manifest @@ -1 +1,2 @@ +DIST ghdl-4.0.0.tar.gz 7683124 BLAKE2B 2b43f1a24c9fb30f754ae6326b21fd52991f3bd69fc1c2dfbd3064d950cef74f7e66f2a846778e6429fbfae07d349f913993d91c52ec53cdad894b06f810cb03 SHA512 95b08274f2ed54556fbe2e72ce52605d9ca8269b535306348d25a259615a0610b59a61fb4458e0c1e548570361af15d45d89941bf4ab4afd2fafb10b07e69cae DIST ghdl-4.0.0_pre20231218.tar.gz 7761842 BLAKE2B d5b3ae4c28b245881681695cee74eca1d69092d8089cb1ec042f42d26e62aa420ace8f04899023d98259d845ea89700d77c453b892c176d4d1b367ac7a8237a6 SHA512 6b9ac7221bee5b8ec2cc7971fbad5aff615839aa3c3170fa39079c68e65da8b4a8d60f5c53d9fa88146c9f865b0d8a059fd03358e20b660b6543cf1b0c0b0c84 diff --git a/sci-electronics/ghdl/ghdl-4.0.0.ebuild b/sci-electronics/ghdl/ghdl-4.0.0.ebuild new file mode 100644 index 000000000000..fb194d074563 --- /dev/null +++ b/sci-electronics/ghdl/ghdl-4.0.0.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ADA_COMPAT=( gnat_2021 ) +LLVM_MAX_SLOT=17 # Check "configure" script for supported LLVM versions. + +inherit ada edo llvm toolchain-funcs + +DESCRIPTION="Open-source analyzer, compiler, and simulator for VHDL 2008/93/87" +HOMEPAGE="https://ghdl.github.io/ghdl/ + https://github.com/ghdl/ghdl/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/ghdl/${PN}.git" +else + SRC_URI="https://github.com/ghdl/${PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2+" +SLOT="0" +IUSE="llvm" +REQUIRED_USE="${ADA_REQUIRED_USE}" + +RDEPEND=" + ${ADA_DEPS} + llvm? ( <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= ) +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + dev-util/patchelf +" + +PATCHES=( "${FILESDIR}/${PN}-4.0.0_pre20231218-no-pyunit.patch" ) + +pkg_setup() { + ada_pkg_setup + + use llvm && llvm_pkg_setup +} + +src_prepare() { + default + + sed -i "s|ar rc|$(tc-getAR) rc|g" Makefile.in || die +} + +src_configure() { + tc-export CC CXX + + local -a myconf=( + # Build. + --disable-werror + + # Install location. + --libdir=$(get_libdir) + --prefix=/usr + + # Features. + --enable-libghdl + --enable-synth + ) + + if use llvm ; then + myconf+=( --with-llvm-config=llvm-config ) + fi + + # Not a autotools script! + edo sh ./configure "${myconf[@]}" +} + +src_compile() { + default + + patchelf --set-soname libghw.so lib/libghw.so || die +} + +src_install() { + default + + find "${ED}" -type f -name '*.a' -delete || die +}