Files
haikuports/media-libs/opensubdiv/opensubdiv-3.3.3.recipe
2018-08-25 15:18:09 -04:00

117 lines
3.1 KiB
Bash

SUMMARY="An open-source subdivision surface library"
DESCRIPTION="OpenSubdiv is a set of open source libraries that implement high \
performance subdivision surface (subdiv) evaluation on massively parallel CPU \
and GPU architectures. This codepath is optimized for drawing deforming \
subdivs with static topology at interactive framerates. The resulting limit \
surface matches Pixar's Renderman to numerical precision."
HOMEPAGE="http://graphics.pixar.com/opensubdiv/"
COPYRIGHT="2013-2018 Pixar"
LICENSE="Apache v2"
REVISION="1"
SOURCE_URI="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${portVersion//\./_}.tar.gz"
CHECKSUM_SHA256="2dc81b3a085e692cca3166ac88751e4674a9ddf5b5d7935adf677bb2bd3f2d2f"
SOURCE_FILENAME="opensubdiv-$portVersion.tar.gz"
SOURCE_DIR="OpenSubdiv-${portVersion//\./_}"
PATCHES="opensubdiv-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
opensubdiv$secondaryArchSuffix = $portVersion
cmd:far_perf = $portVersion
cmd:far_regression = $portVersion
cmd:hbr_baseline = $portVersion
cmd:hbr_regression = $portVersion
cmd:stringify = $portVersion
lib:libosdCPU$secondaryArchSuffix = $libVersionCompat
lib:libosdGPU$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:python2
lib:libGl$secondaryArchSuffix
lib:libglew$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libopencl$secondaryArchSuffix
lib:libtbb$secondaryArchSuffix
lib:libtbbmalloc$secondaryArchSuffix
lib:libtbbmalloc_proxy$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
opensubdiv${secondaryArchSuffix}_devel = $portVersion
devel:libosdCPU$secondaryArchSuffix = $libVersionCompat
devel:libosdGPU$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
opensubdiv$secondaryArchSuffix == $portVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGl$secondaryArchSuffix
devel:libglew$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libgomp$secondaryArchSuffix
devel:libopencl$secondaryArchSuffix
devel:libopencl_headers$secondaryArchSuffix
devel:libtbb$secondaryArchSuffix
devel:libtbbmalloc$secondaryArchSuffix
devel:libtbbmalloc_proxy$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:python2
"
defineDebugInfoPackage opensubdiv$secondaryArchSuffix \
$libDir/libosdCPU.so.$libVersion \
$libDir/libosdGPU.so.$libVersion
BUILD()
{
mkdir -p build
cd build
export GLEW_LOCATION="$portPackageLinksDir/devel~libglew/$relativeDevelopDir/"
export GLEW_INC_LOCATION="$portPackageLinksDir/devel~libglew/$relativeIncludeDir/"
cmake .. \
-DNO_EXAMPLES=ON \
-DNO_TUTORIALS=ON \
$cmakeDirArgs
}
INSTALL()
{
cd build
make install
mkdir -p $includeDir
mv $prefix/include/* $includeDir
rmdir $prefix/include/
prepareInstalledDevelLibs \
libosdCPU \
libosdGPU
fixPkgconfig
packageEntries devel $developDir
}
TEST()
{
cd build
make test
}