summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2021-10-06 10:15:27 +0200
committerJakov Smolić <jsmolic@gentoo.org>2021-10-06 10:31:39 +0200
commitbdbf129e37f7fe222719a3df2341f48d6f576e81 (patch)
tree7df60c0040290be6f964459236d396ec24dbd89e /sci-libs/ginkgo
parentsci-libs/io_lib: drop 1.14.14 (diff)
downloadgentoo-bdbf129e37f7fe222719a3df2341f48d6f576e81.tar.gz
gentoo-bdbf129e37f7fe222719a3df2341f48d6f576e81.tar.bz2
gentoo-bdbf129e37f7fe222719a3df2341f48d6f576e81.zip
sci-libs/ginkgo: Port to EAPI-8 and cmake.eclass
Closes: https://bugs.gentoo.org/811957 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'sci-libs/ginkgo')
-rw-r--r--sci-libs/ginkgo/ginkgo-1.4.0-r1.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/sci-libs/ginkgo/ginkgo-1.4.0-r1.ebuild b/sci-libs/ginkgo/ginkgo-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..84dae4aa427a
--- /dev/null
+++ b/sci-libs/ginkgo/ginkgo-1.4.0-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+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="+openmp cuda"
+
+RDEPEND="
+ cuda? ( dev-util/nvidia-cuda-sdk )
+"
+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_OMP=$(usex openmp)
+ -DGINKGO_BUILD_CUDA=$(usex cuda)
+ )
+ cmake_src_configure
+}