mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
123 lines
3.2 KiB
Bash
123 lines
3.2 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:libglu$secondaryArchSuffix
|
|
lib:libglew$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:libglu$secondaryArchSuffix
|
|
devel:libglew$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:make
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:python2
|
|
"
|
|
|
|
defineDebugInfoPackage opensubdiv$secondaryArchSuffix \
|
|
$libDir/libosdCPU.so.$libVersion \
|
|
$libDir/libosdGPU.so.$libVersion
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p build
|
|
cd build
|
|
|
|
local GLEW_SUBDIR=
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
GLEW_SUBDIR="$secondaryArchSuffix/"
|
|
fi
|
|
|
|
export GLEW_LOCATION="$portPackageLinksDir/glew${secondaryArchSuffix}_devel/develop"
|
|
export GLEW_INC_LOCATION="$portPackageLinksDir/glew${secondaryArchSuffix}_devel/develop/headers$UNITTEST_SUBDIR"
|
|
|
|
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
|
|
}
|