summaryrefslogtreecommitdiff
path: root/sys-cluster/legion/legion-23.03.0.ebuild
blob: 55259ad9c9a6c4ed47740f7385b3a821d7b8fae9 (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake flag-o-matic

DESCRIPTION="A data-centric parallel programming system"
HOMEPAGE="https://legion.stanford.edu/"
if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/StanfordLegion/legion.git"
else
	SRC_URI="https://github.com/StanfordLegion/legion/archive/${P}.tar.gz"
	S="${WORKDIR}"/${PN}-${P}

	KEYWORDS="~amd64"
fi

LICENSE="BSD"
SLOT="0"
IUSE="examples gasnet hwloc test"
RESTRICT="!test? ( test )"

# https://github.com/StanfordLegion/legion/issues/575 re <hwloc-2
# See bug #821424 for examples/mpi
DEPEND="examples? ( virtual/mpi[cxx] )
	gasnet? ( >=sys-cluster/gasnet-1.26.4-r1 )
	hwloc? ( <sys-apps/hwloc-2:= )"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}"/${PN}-23.03.0-gcc13.patch
)

src_configure() {
	# -Werror=odr
	# https://bugs.gentoo.org/863731
	# Fixed upstream / in live ebuild.
	filter-lto

	local mycmakeargs=(
		-DLegion_USE_HWLOC=$(usex hwloc)
		-DLegion_USE_GASNet=$(usex gasnet)
		-DLegion_ENABLE_TESTING=$(usex test)
		-DLegion_BUILD_EXAMPLES=$(usex examples)
		-DLegion_BUILD_TESTS=ON
		-DLegion_BUILD_TUTORIAL=ON
	)

	cmake_src_configure
}