You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=8
|
||
3 years ago
|
|
||
3 years ago
|
inherit cmake toolchain-funcs
|
||
3 years ago
|
|
||
|
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"
|
||
3 years ago
|
IUSE="cuda hwloc +openmp"
|
||
3 years ago
|
|
||
|
RDEPEND="
|
||
3 years ago
|
cuda? ( dev-util/nvidia-cuda-toolkit )
|
||
|
hwloc? ( sys-apps/hwloc:= )
|
||
3 years ago
|
"
|
||
3 years ago
|
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"
|
||
|
|
||
3 years ago
|
cmake_src_prepare
|
||
3 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local mycmakeargs=(
|
||
|
-DGINKGO_DEVEL_TOOLS=OFF
|
||
|
-DGINKGO_BUILD_TESTS=OFF
|
||
|
-DGINKGO_BUILD_BENCHMARKS=OFF
|
||
|
-DGINKGO_BUILD_REFERENCE=ON
|
||
3 years ago
|
-DGINKGO_BUILD_CUDA=$(usex cuda)
|
||
3 years ago
|
-DGINKGO_BUILD_HWLOC=$(usex hwloc)
|
||
|
-DGINKGO_BUILD_OMP=$(usex openmp)
|
||
3 years ago
|
)
|
||
3 years ago
|
cmake_src_configure
|
||
3 years ago
|
}
|