blob: f1679e017c23d28434e8a7b20c0fd4e5b0c83584 (
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
|
# 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 library for storing voxel data"
HOMEPAGE="http://opensource.imageworks.com/?p=field3d"
SRC_COMMIT="b0ff0cd67893a4cbfa322676eb3eef10100d904d"
SRC_URI="https://github.com/imageworks/Field3D/archive/${SRC_COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="doc mpi test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/boost:=
>=dev-libs/imath-3.1.4-r2:=
>=media-libs/openexr-3:0=
sci-libs/hdf5:=
doc? ( app-text/doxygen )
mpi? ( virtual/mpi )
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-1.7.2-openexr-3-imath.patch"
"${FILESDIR}/${PN}-1.7.2-boost-1.83-timer-header-deprecated.patch"
)
S="${WORKDIR}/${PN}-${SRC_COMMIT}"
src_prepare() {
sed -e "s#auto_ptr#unique_ptr#g" -i include/*.h || die
sed \
-e "s#DESTINATION \${CMAKE_INSTALL_PREFIX}#DESTINATION \${CMAKE_INSTALL_DOCDIR}#" \
-e "s#CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )#CMAKE_MINIMUM_REQUIRED( VERSION 3.5 )#" \
-i CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {
# Needed for now ("fix" compatibility with >=sci-libs/hdf5-1.12)
# bug #808731
append-cppflags -DH5_USE_110_API
local mycmakeargs=(
-DCMAKE_CXX_STANDARD=11
-DINSTALL_DOCS="$(usex doc)" # Docs are not finished yet.
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen="$(usex !doc)"
"$(cmake_use_find_package mpi MPI)"
)
cmake_src_configure
}
src_test() {
cd "${BUILD_DIR}" || die
./unitTest || die
}
|