blob: b003f224d680a621f31d5ee4b706e60b4b9efc5d (
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
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
#DOCS_BUILDER="sphinx"
#DOCS_DIR="docs/source"
PYTHON_COMPAT=( python3_{13..14} )
inherit cmake fortran-2 python-single-r1 #docs
DESCRIPTION="Compressed numerical arrays that support high-speed random access"
HOMEPAGE="
https://computing.llnl.gov/projects/zfp
https://zfp.io
https://github.com/LLNL/ZFP
"
SRC_URI="https://github.com/LLNL/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="aligned cfp fasthash examples fortran openmp profile python strided test twoway +utilities" #doc cuda
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
RDEPEND="python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="utilities? ( app-admin/chrpath )"
pkg_setup() {
FORTRAN_NEED_OPENMP=0
use openmp && FORTRAN_NEED_OPENMP=1
use fortran && fortran-2_pkg_setup
python-single-r1_pkg_setup
}
src_configure() {
#I can't test for cuda stuff
#-DZFP_WITH_CUDA=$(usex cuda)
local mycmakeargs=(
-DBUILD_CFP=$(usex cfp)
-DBUILD_EXAMPLES=$(usex examples)
-DBUILD_TESTING=$(usex test)
-DBUILD_UTILITIES=$(usex utilities)
-DBUILD_ZFORP=$(usex fortran)
-DBUILD_ZFPY=$(usex python)
-DZFP_WITH_ALIGNED_ALLOC=$(usex aligned)
-DZFP_WITH_BIT_STREAM_STRIDED=$(usex strided)
-DZFP_WITH_CACHE_FAST_HASH=$(usex fasthash)
-DZFP_WITH_CACHE_PROFILE=$(usex profile)
-DZFP_WITH_CACHE_TWOWAY=$(usex twoway)
-DZFP_WITH_OPENMP=$(usex openmp)
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
#docs only available starting from the next release
#docs_compile
}
src_install() {
cmake_src_install
use python && python_optimize "${D}/$(python_get_sitedir)"
use test && rm "${BUILD_DIR}/bin/testzfp"
if use utilities; then
pushd "${BUILD_DIR}/bin" || die
dobin zfp
rm zfp
popd || die
chrpath -d "${ED}/usr/bin/zfp" || die
fi
if use examples; then
pushd "${BUILD_DIR}/bin" || die
exeinto "/usr/libexec/zfp"
doexe *
chrpath -d "${ED}"/usr/libexec/zfp/* || die
fi
}
|