commit:     1bd01e36759108c4b10de66e03718b6360c1b4b9
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  3 22:23:04 2024 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Wed Jul  3 22:43:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bd01e36

sci-libs/ginkgo: add 1.8.0

Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-libs/ginkgo/Manifest                           |  1 +
 ...nkgo-1.8.0-disable_automagic_dependencies.patch | 24 +++++++++
 sci-libs/ginkgo/ginkgo-1.8.0.ebuild                | 61 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)

diff --git a/sci-libs/ginkgo/Manifest b/sci-libs/ginkgo/Manifest
index 85fa14f2e7ef..4dbc70ea0a35 100644
--- a/sci-libs/ginkgo/Manifest
+++ b/sci-libs/ginkgo/Manifest
@@ -1,2 +1,3 @@
 DIST ginkgo-1.4.0.tar.gz 2574052 BLAKE2B 
99677d9d75831991cac40312095d32c44bef18cd05b120d80fdb9e64ea6dc15796c09b26f35dc8230db6b55c7be4dd76efd6d1cd8ca13c83e1f3087550db0dca
 SHA512 
9bfcb2c415c7a1a70cf8e49f20adf62d02cab83bb23b6fcecfeaeeb322b2d4e1ad8d8fa6582735073753f9a05eac8688b9bd1ff1d4203957c1a80702d117e807
 DIST ginkgo-1.6.0.tar.gz 12788830 BLAKE2B 
c452e20eddb3673b5863106d8a8d42aab253cb5a17cf0445194903ebadcffe53ef0df6b5f26e2602e137faaa4a23dddd0b192f3453b4bd440907385fc09d004a
 SHA512 
507a17bc9ad010c235c4ae49ac4bef3f4d5b65b4ea02bfa5cad5ea578fa65d28f564d1faf0a1f5618a6e72d744217f58bdff68c5f1fffc9cfb484800f7f84c50
+DIST ginkgo-1.8.0.tar.gz 13140660 BLAKE2B 
4b1800566ec2852b3dd7e58b01ec58e2cab45b55134fdf3d478832435c40b45320dc066d281a07127d1fc42e57c6f3d99440209d2286adc1294e44a1f660ad36
 SHA512 
9d121a5eec9f5d17d1bd4b8924ebb32985a68e8087addc7385b619e365ed260a40ab73eb7a8a16f46a590d3162a78c9311ff41dd3dc74a9117a61e0445d96c52

diff --git 
a/sci-libs/ginkgo/files/ginkgo-1.8.0-disable_automagic_dependencies.patch 
b/sci-libs/ginkgo/files/ginkgo-1.8.0-disable_automagic_dependencies.patch
new file mode 100644
index 000000000000..c37259e3294a
--- /dev/null
+++ b/sci-libs/ginkgo/files/ginkgo-1.8.0-disable_automagic_dependencies.patch
@@ -0,0 +1,24 @@
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index 653d52a..c56af59 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -41,8 +41,7 @@ if(GINKGO_BUILD_EXTLIB_EXAMPLE)
+     list(APPEND EXAMPLES_LIST external-lib-interfacing)
+ endif()
+ 
+-find_package(OpenCV QUIET)
+-if(OpenCV_FOUND)
++if(FALSE)
+     list(APPEND EXAMPLES_LIST heat-equation schroedinger-splitting)
+ else()
+     message(STATUS "No OpenCV found, disabling examples with video output")
+@@ -56,8 +55,7 @@ if(GINKGO_BUILD_MPI)
+     list(APPEND EXAMPLES_LIST distributed-solver)
+ endif()
+ 
+-find_package(Kokkos 4.1.00 QUIET)
+-if(Kokkos_FOUND)
++if(FALSE)
+     list(APPEND EXAMPLES_LIST kokkos-assembly)
+ else()
+     message(STATUS "No Kokkos found, disabling examples with Kokkos 
assembly.")

diff --git a/sci-libs/ginkgo/ginkgo-1.8.0.ebuild 
b/sci-libs/ginkgo/ginkgo-1.8.0.ebuild
new file mode 100644
index 000000000000..5b507b79f030
--- /dev/null
+++ b/sci-libs/ginkgo/ginkgo-1.8.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="Numerical linear algebra software package"
+HOMEPAGE="https://ginkgo-project.github.io/";
+
+if [[ ${PV} = *9999* ]]; then
+       EGIT_REPO_URI="https://github.com/ginkgo-project/ginkgo";
+       inherit git-r3
+else
+       SRC_URI="https://github.com/${PN}-project/${PN}/archive/v${PV}.tar.gz 
-> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD-with-attribution"
+SLOT="0"
+IUSE="cuda hwloc +openmp"
+
+RDEPEND="
+       cuda? ( dev-util/nvidia-cuda-toolkit )
+       hwloc? ( sys-apps/hwloc:= )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-disable_automagic_dependencies.patch
+)
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+       sed -i \
+               -e "s#\"lib\"#\"$(get_libdir)\"#g" \
+               -e "s#\"lib/#\"$(get_libdir)/#g" \
+               cmake/install_helpers.cmake || die "sed failed"
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DGINKGO_DEVEL_TOOLS=OFF
+               -DGINKGO_BUILD_TESTS=OFF
+               -DGINKGO_BUILD_BENCHMARKS=OFF
+               -DGINKGO_BUILD_REFERENCE=ON
+               -DGINKGO_BUILD_CUDA=$(usex cuda)
+               -DGINKGO_BUILD_HWLOC=$(usex hwloc)
+               -DGINKGO_BUILD_OMP=$(usex openmp)
+       )
+       cmake_src_configure
+}

Reply via email to