diff options
author | Huang Rui <vowstar@gmail.com> | 2024-10-09 12:30:52 +0800 |
---|---|---|
committer | Huang Rui <vowstar@gmail.com> | 2024-10-09 12:30:52 +0800 |
commit | ac4e8a308cf12f8092ecb78328c7db6abbc0b77f (patch) | |
tree | 4465ad634d27a8d98cca53670a715e4e50d7dda3 /sci-electronics | |
parent | games-arcade/taisei: add 1.4.2 (diff) | |
download | guru-ac4e8a308cf12f8092ecb78328c7db6abbc0b77f.tar.gz guru-ac4e8a308cf12f8092ecb78328c7db6abbc0b77f.tar.bz2 guru-ac4e8a308cf12f8092ecb78328c7db6abbc0b77f.zip |
sci-electronics/slang: add 7.0
Signed-off-by: Huang Rui <vowstar@gmail.com>
Diffstat (limited to 'sci-electronics')
-rw-r--r-- | sci-electronics/slang/Manifest | 1 | ||||
-rw-r--r-- | sci-electronics/slang/slang-7.0.ebuild | 71 |
2 files changed, 72 insertions, 0 deletions
diff --git a/sci-electronics/slang/Manifest b/sci-electronics/slang/Manifest index b37ddbc2f..79d507e11 100644 --- a/sci-electronics/slang/Manifest +++ b/sci-electronics/slang/Manifest @@ -1,3 +1,4 @@ DIST slang-4.0.tar.gz 1308308 BLAKE2B 99029a26b3fe86942abc33381f8f9ba050c09b390ed7fc54404f4054eb34a83e168d53096cad2e8f037954770a95009c701c86b1e59e1e9d02e1709fd120164c SHA512 043c053452b2d452875b2e3ed96be5b96275544e2a692bec8b170e01cefec6e5648a6681e3cac3afd2a68c8ec57f6461a9a73394d74abbc8627d49b66978808e DIST slang-5.0.tar.gz 1334032 BLAKE2B 08981f86d0be6a4a7d391a2b65d8f4e5bdab8e3ba50f6e847e2b25fec9d9345e806045faae3c74fd71db90f939d8668ff775465ea1e8433d660a0a53f20a358a SHA512 a1b7b9aac7357a9a7cc1818adbb5e9622234f607aba452ca57e3d28b31779339bb19557137cf37cdcc2abb2aba15eb6d2f580169322caf075a2518b3d8634a26 DIST slang-6.0.tar.gz 1401115 BLAKE2B 77c6359e8de39216bef553ec832a643397e83847146223acf2512efbbb2cd15eb0b874ff8f021adb72472ce5bb77ca33648ed8c392b21df7ed349110f5654d17 SHA512 bd9e24abc6e83ca2ca0527271754bd0312e094c040feccbf95852a84dba486addd2ed0a40e5a855c1b41918061a6a7c34ca1a4f6610b1e941e50e1b74402cb5c +DIST slang-7.0.tar.gz 1461841 BLAKE2B d4ba3abb891f3ebbc73f6d69ae78d180cef8dc8d4041f192be162d73664ba4dbe19d7deb65a0d4498c3e3df8b7412904724dab6c518c73f3541e90a8a9925da2 SHA512 657c2a12beac5fe190be77953836320903c4492004b6877e0e5ef1be42516184048e1caed30aa8d4f89a9a20651389d1baab76ccb82e9c7d9a6fdf4e29815239 diff --git a/sci-electronics/slang/slang-7.0.ebuild b/sci-electronics/slang/slang-7.0.ebuild new file mode 100644 index 000000000..19bb11845 --- /dev/null +++ b/sci-electronics/slang/slang-7.0.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +PYTHON_COMPAT=( python3_{10..13} ) +inherit cmake python-single-r1 + +DESCRIPTION="SystemVerilog compiler and language services" +HOMEPAGE=" + https://sv-lang.com + https://github.com/MikePopoloski/slang +" + +if [[ "${PV}" == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/MikePopoloski/${PN}.git" +else + SRC_URI="https://github.com/MikePopoloski/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~riscv ~x86" + S="${WORKDIR}/${P}" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="python test" +REQUIRED_USE=" ${PYTHON_REQUIRED_USE} " +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + >=dev-python/pybind11-2.10[${PYTHON_USEDEP}] + ') +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-libs/libfmt-9.1.0 + test? ( >=dev-cpp/catch-3.0.1 ) +" + +src_prepare() { + default + # In order to compile smoothly, the minimum version of fmt must be lowered. + sed -i \ + -e 's/set(fmt_min_version.*)/set(fmt_min_version "9.0")/' \ + "${S}/external/CMakeLists.txt" || die + cmake_src_prepare +} + +src_configure() { + python_setup + local mycmakeargs=( + -D CMAKE_INSTALL_LIBDIR="${EPREFIX}/usr/$(get_libdir)" + -D BUILD_SHARED_LIBS=ON + -D SLANG_INCLUDE_PYLIB=$(usex python) + -D SLANG_INCLUDE_TESTS=$(usex test) + -D SLANG_USE_MIMALLOC=OFF + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use python; then + # fix python unexpected paths QA + mkdir -p "${D}/$(python_get_sitedir)" || die + mv "${D}"/usr/pyslang* "${D}/$(python_get_sitedir)" || die + fi +} |