summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-21 01:35:28 +0000
committerSam James <sam@gentoo.org>2021-12-21 01:36:59 +0000
commit97929bfb6438ddaeaddf687b2d0efb5826ea23ef (patch)
treedd81564186e7532b0cfd7ccb8f543e51c52b28ad /sci-libs/ginkgo/ginkgo-1.4.0-r3.ebuild
parentapp-emulation/xen: drop vulnerable (diff)
downloadgentoo-97929bfb6438ddaeaddf687b2d0efb5826ea23ef.tar.gz
gentoo-97929bfb6438ddaeaddf687b2d0efb5826ea23ef.tar.bz2
gentoo-97929bfb6438ddaeaddf687b2d0efb5826ea23ef.zip
sci-libs/ginkgo: fix automagic hwloc dependency
It'll also try to download it if it can't find it on the system, so a revbump is worth it just for that as on some platforms we don't have network-sandbox (nor do we require it be used by users, even though they definitely should use it). But mainly for the automagic dep. Closes: https://bugs.gentoo.org/811384 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/ginkgo/ginkgo-1.4.0-r3.ebuild')
-rw-r--r--sci-libs/ginkgo/ginkgo-1.4.0-r3.ebuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/sci-libs/ginkgo/ginkgo-1.4.0-r3.ebuild b/sci-libs/ginkgo/ginkgo-1.4.0-r3.ebuild
new file mode 100644
index 000000000000..5092a73a706d
--- /dev/null
+++ b/sci-libs/ginkgo/ginkgo-1.4.0-r3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2021 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}"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] && \
+ use openmp && ! tc-has-openmp ; then
+ die "Need an OpenMP capable compiler"
+ fi
+}
+
+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
+}