Files
haikuports/media-gfx/openvdb/openvdb-13.0.0.recipe
2025-11-17 09:03:23 +01:00

135 lines
3.7 KiB
Bash

SUMMARY="Libs for the efficient manipulation of volumetric data"
DESCRIPTION="The OpenVDB library comprises a hierarchical data structure and \
a suite of tools for the efficient manipulation of sparse, possibly \
time-varying, volumetric data discretized on a three-dimensional grid."
HOMEPAGE="https://www.openvdb.org/"
COPYRIGHT="2012-2019 DreamWorks Animation LLC"
LICENSE="MPL v2.0"
REVISION="2"
SOURCE_URI="https://github.com/AcademySoftwareFoundation/openvdb/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="4d6a91df5f347017496fe8d22c3dbb7c4b5d7289499d4eb4d53dd2c75bb454e1"
# OOM on 32bit beta5!
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="!x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
boostVersion="1.88.0"
tbbVersion="12.17"
tbbmallocVersion="2.17"
PROVIDES="
openvdb$secondaryArchSuffix = $portVersion
lib:libopenvdb$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libblosc$secondaryArchSuffix
lib:libboost_iostreams$secondaryArchSuffix
lib:libboost_system$secondaryArchSuffix
lib:libboost_thread$secondaryArchSuffix
lib:libcppunit$secondaryArchSuffix
lib:libHalf_2_4$secondaryArchSuffix
lib:libtbb$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_tools="
openvdb${secondaryArchSuffix}_tools = $portVersion
cmd:vdb_print$commandSuffix
"
REQUIRES_tools="
haiku$secondaryArchSuffix
lib:libblosc$secondaryArchSuffix
lib:libboost_iostreams$secondaryArchSuffix
lib:libboost_regex$secondaryArchSuffix
lib:libboost_system$secondaryArchSuffix
lib:libHalf_2_4$secondaryArchSuffix
lib:libopenvdb$secondaryArchSuffix
lib:libtbb$secondaryArchSuffix
lib:libtbbmalloc$secondaryArchSuffix
lib:libtbbmalloc_proxy$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
CONFLICTS_tools="
openvdb7${secondaryArchSuffix}_tools
"
PROVIDES_devel="
openvdb${secondaryArchSuffix}_devel = $portVersion
devel:libopenvdb$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
openvdb$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
openvdb7${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libblosc$secondaryArchSuffix
devel:libboost_iostreams$secondaryArchSuffix >= $boostVersion
devel:libboost_system$secondaryArchSuffix >= $boostVersion
devel:libboost_thread$secondaryArchSuffix >= $boostVersion
devel:libcppunit$secondaryArchSuffix
# devel:libHalf_2_4$secondaryArchSuffix
devel:libtbb$secondaryArchSuffix == $tbbVersion
devel:libtbbmalloc$secondaryArchSuffix == $tbbmallocVersion
devel:libtbbmalloc_proxy$secondaryArchSuffix == $tbbmallocVersion
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage openvdb$secondaryArchSuffix \
$libDir/libopenvdb.so.$libVersion
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
-DTBB_ROOT="$portPackageLinksDir/devel~libtbb$secondaryArchSuffix/$relativeDevelopDir/" \
-DTBB_INCLUDEDIR="$portPackageLinksDir/devel~libtbb$secondaryArchSuffix/$relativeIncludeDir/" \
-DTBB_LIBRARYDIR="$portPackageLinksDir/devel~libtbb$secondaryArchSuffix/$relativeDevelopLibDir/" \
-DOPENVDB_BUILD_PYTHON_MODULE=OFF \
-DOPENVDB_CORE_STATIC=OFF \
-Wno-dev
make -C build
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libopenvdb
packageEntries devel \
$developDir \
$libDir/cmake
packageEntries tools $prefix/bin
}
TEST()
{
cd haiku_build
make test
}