blob: 74bb2c580467fa8c55a632c405f82f7918e7881c (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
DOCS_BUILDER="sphinx"
DOCS_DEPEND="
dev-python/breathe
dev-python/sphinx_rtd_theme
"
DOCS_DIR="${S}/docs/source"
FORTRAN_NEEDED="fortran"
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit cmake python-any-r1 docs fortran-2
DESCRIPTION="Fault Tolerance Interface"
HOMEPAGE="https://github.com/leobago/fti"
SRC_URI="https://github.com/leobago/fti/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc examples fi-io hdf5 fortran openssl sionlib test tutorial"
#TODO: unbundle jerasure bpp iniparser
RDEPEND="
sys-libs/zlib
virtual/mpi
hdf5? ( sci-libs/hdf5[mpi] )
openssl? ( dev-libs/openssl )
sionlib? ( sys-cluster/sionlib )
"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( app-doc/doxygen )"
PATCHES=(
"${FILESDIR}/${PN}-sionlib-includedir.patch"
"${FILESDIR}/${PN}-add-spinx-ext-autodoc.patch"
)
#RESTRICT="!test? ( test )"
RESTRICT="test"
pkg_setup() {
fortran-2_pkg_setup
}
src_configure() {
local mycmakeargs=(
-DSIONLIBBASE="${EPREFIX}/usr/$(get_libdir)"
-DENABLE_COVERAGE=OFF
-DENABLE_IME_NATIVE=OFF
-DENABLE_DOCU=$(usex doc)
-DENABLE_EXAMPLES=$(usex examples)
-DENABLE_FI_IO=$(usex fi-io)
-DENABLE_FORTRAN=$(usex fortran)
-DENABLE_HDF5=$(usex hdf5)
-DENABLE_OPENSSL=$(usex openssl)
-DENABLE_SIONLIB=$(usex sionlib)
-DENABLE_TESTS=$(usex test)
-DENABLE_TUTORIAL=$(usex tutorial)
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
docs_compile
}
src_install() {
cmake_src_install
einstalldocs
if use examples; then
mkdir -p "${ED}/usr/libexec/${PN}" || die
mv "${ED}/usr/bin/examples" "${ED}/usr/libexec/${PN}/examples" || die
fi
if use tutorial; then
mkdir -p "${ED}/usr/libexec/${PN}" || die
mv "${ED}/usr/bin/tutorial" "${ED}/usr/libexec/${PN}/tutorial" || die
fi
find "${ED}" -name '*.a' -delete || die
}
|