1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake flag-o-matic
8 DESCRIPTION="A library for storing voxel data"
9 HOMEPAGE="http://opensource.imageworks.com/?p=field3d"
10 SRC_COMMIT="b0ff0cd67893a4cbfa322676eb3eef10100d904d"
11 SRC_URI="https://github.com/imageworks/Field3D/archive/${SRC_COMMIT}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="amd64 ~arm ~arm64 x86"
18 RESTRICT="!test? ( test )"
22 >=dev-libs/imath-3.1.4-r2:=
23 >=media-libs/openexr-3:0=
25 doc? ( app-text/doxygen )
31 "${FILESDIR}/${PN}-1.7.2-openexr-3-imath.patch"
32 "${FILESDIR}/${PN}-1.7.2-boost-1.83-timer-header-deprecated.patch"
35 S="${WORKDIR}/${PN}-${SRC_COMMIT}"
38 sed -e "s#auto_ptr#unique_ptr#g" -i include/*.h || die
40 -e "s#DESTINATION \${CMAKE_INSTALL_PREFIX}#DESTINATION \${CMAKE_INSTALL_DOCDIR}#" \
41 -e "s#CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )#CMAKE_MINIMUM_REQUIRED( VERSION 3.5 )#" \
42 -i CMakeLists.txt || die
48 # Needed for now ("fix" compatibility with >=sci-libs/hdf5-1.12)
50 append-cppflags -DH5_USE_110_API
53 -DCMAKE_CXX_STANDARD=11
55 -DINSTALL_DOCS="$(usex doc)" # Docs are not finished yet.
56 -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen="$(usex !doc)"
58 "$(cmake_use_find_package mpi MPI)"
65 cd "${BUILD_DIR}" || die