blob: 0a4e3d5aea7140dee1a4bbdafeada7bed93f1e0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake flag-o-matic 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_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
src_configure() {
# -Werror=strict-aliasing
# https://bugs.gentoo.org/862705
# https://github.com/ginkgo-project/ginkgo/issues/1657
#
# Do not trust it with LTO either.
append-flags -fno-strict-aliasing
filter-lto
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
}
|