commit:     ad2aed251c541c3850fb5dc1471ad19962b483ff
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  8 04:15:27 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov  8 04:52:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad2aed25

dev-lang/ispc: Bump to 1.25.3

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/ispc/Manifest           |  1 +
 dev-lang/ispc/ispc-1.25.3.ebuild | 95 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)

diff --git a/dev-lang/ispc/Manifest b/dev-lang/ispc/Manifest
index f66835fed224..18256b5445d0 100644
--- a/dev-lang/ispc/Manifest
+++ b/dev-lang/ispc/Manifest
@@ -1,2 +1,3 @@
 DIST ispc-1.24.0.gh.tar.gz 19674211 BLAKE2B 
246a079f03fa17f1ab4d80c55b992e92f44d5395e3f1feadee90c773771496ead4de0671b3869c70d5a93038d7c0ccaf9ed3ad5b5e40eb156d605a73150b15d9
 SHA512 
ad9feab1b5986471a52c775c1220ae46904ae952b33a14299f525eb03e004c6e1395dd171ddedee833892d57ad195ffddb234b26a2df42138fb1b2364b62803e
 DIST ispc-1.25.2.gh.tar.gz 19805407 BLAKE2B 
d4722725778f06a963a9bbc2fa691707e51b907fcc6cabac5987a7dcd65cc6855f27d4bd2559f6e79185067de7211ec9da48635c29d146c6525963db2f0fa11a
 SHA512 
29c0adb0d28be280ef6223253f34eaeae6530d4ab63f67c94791837144eb20a2d596b0bd450188841b86f277d9f7d68a96b3c1e9e25297590e496d7f04ad55c3
+DIST ispc-1.25.3.gh.tar.gz 19805596 BLAKE2B 
6e98d2297b2b9b7da32c74328c0b3883a7bd7dc997624ed5c5eff1193779b28a29b6e505ec09f6ba471f0b3ba4b3c603561717311a370bad5350d7e898b9d5f1
 SHA512 
12bbf7b15d6ec97658d46d65d1c02103bdada4101dcaa2ebb5c8477c39934a588d1035371ae09636c0fa73267f4d714579b8fffcd8690d4f3d95eb12436908ab

diff --git a/dev-lang/ispc/ispc-1.25.3.ebuild b/dev-lang/ispc/ispc-1.25.3.ebuild
new file mode 100644
index 000000000000..d19ed81775c4
--- /dev/null
+++ b/dev-lang/ispc/ispc-1.25.3.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( {17..19} )
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit cmake llvm-r1 multiprocessing python-any-r1 toolchain-funcs
+
+DESCRIPTION="Intel SPMD Program Compiler"
+HOMEPAGE="
+       https://ispc.github.io/
+       https://github.com/ispc/ispc/
+"
+SRC_URI="
+       https://github.com/ispc/ispc/archive/v${PV}.tar.gz
+               -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD BSD-2 UoI-NCSA"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="examples gpu openmp test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       $(llvm_gen_dep '
+               sys-devel/clang:${LLVM_SLOT}
+       ')
+       sys-libs/ncurses:=
+       gpu? ( dev-libs/level-zero:= )
+       !openmp? ( dev-cpp/tbb:= )
+"
+RDEPEND="
+       ${DEPEND}
+"
+BDEPEND="
+       app-alternatives/yacc
+       app-alternatives/lex
+       ${PYTHON_DEPS}
+"
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+       llvm-r1_pkg_setup
+       python-any-r1_pkg_setup
+}
+
+src_prepare() {
+       # do not require bundled gtest
+       mkdir -p ispcrt/tests/vendor/google/googletest || die
+       cat > ispcrt/tests/vendor/google/googletest/CMakeLists.txt <<-EOF || die
+               find_package(GTest)
+       EOF
+       # remove hacks that break unbundling
+       sed -i -e '/gmock/d' -e '/install/,$d' ispcrt/tests/CMakeLists.txt || 
die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DARM_ENABLED=$(usex arm)
+               -DCMAKE_SKIP_RPATH=ON
+               -DISPC_INCLUDE_EXAMPLES=OFF
+               -DISPC_INCLUDE_TESTS=$(usex test)
+               -DISPC_INCLUDE_UTILS=OFF
+               -DISPCRT_BUILD_GPU=$(usex gpu)
+               -DISPCRT_BUILD_TASK_MODEL=$(usex openmp OpenMP TBB)
+               # prevent it from trying to find the git repo
+               -DGIT_BINARY=GIT_BINARY-NOTFOUND
+       )
+       cmake_src_configure
+}
+
+src_test() {
+       # Inject path to prevent using system ispc
+       local -x PATH="${BUILD_DIR}/bin:${PATH}"
+       "${EPYTHON}" ./scripts/run_tests.py "-j$(makeopts_jobs)" -v ||
+               die "Testing failed under ${EPYTHON}"
+}
+
+src_install() {
+       cmake_src_install
+
+       if use examples; then
+               docompress -x /usr/share/doc/${PF}/examples
+               dodoc -r examples
+       fi
+}

Reply via email to