From 80b16996216b56db961607a1648c76e06d66f7a3 Mon Sep 17 00:00:00 2001 From: miqlas <5569059+extrowerk@users.noreply.github.com> Date: Tue, 12 Dec 2017 21:31:34 +0100 Subject: [PATCH] OpenSubdiv: new recipe (#1877) * OpenSubdiv: new recipe * Whitespace cleanup --- media-libs/opensubdiv/opensubdiv-3.3.0.recipe | 97 +++++++++++++++++++ .../patches/opensubdiv-3.3.0.patchset | 25 +++++ 2 files changed, 122 insertions(+) create mode 100644 media-libs/opensubdiv/opensubdiv-3.3.0.recipe create mode 100644 media-libs/opensubdiv/patches/opensubdiv-3.3.0.patchset diff --git a/media-libs/opensubdiv/opensubdiv-3.3.0.recipe b/media-libs/opensubdiv/opensubdiv-3.3.0.recipe new file mode 100644 index 000000000..b2d0b803e --- /dev/null +++ b/media-libs/opensubdiv/opensubdiv-3.3.0.recipe @@ -0,0 +1,97 @@ +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-2017 Pixar" +LICENSE="Apache v2" +REVISION="1" +SOURCE_URI="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_3_0.tar.gz" +CHECKSUM_SHA256="93d364340518515129fe199c80c4030f666ff71414d9c543e1526f14b5ffc8d0" +SOURCE_DIR="OpenSubdiv-3_3_0" +PATCHES="opensubdiv-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + opensubdiv$secondaryArchSuffix = $portVersion + cmd:far_perf = $portVersion + cmd:far_regression = $portVersion + cmd:hbr_baseline = $portVersion + cmd:hbr_regression = $portVersion + lib:libosdCPU$secondaryArchSuffix = 3.3.0 compat >= 3 + " +REQUIRES=" + haiku$secondaryArchSuffix +# cmd:python2 + lib:libgomp$secondaryArchSuffix + lib:libtbb$secondaryArchSuffix + lib:libtbbmalloc$secondaryArchSuffix + lib:libtbbmalloc_proxy$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + opensubdiv${secondaryArchSuffix}_devel = $portVersion + devel:libosdCPU$secondaryArchSuffix = 3.3.0 compat >= 3 + " +REQUIRES_devel=" + opensubdiv$secondaryArchSuffix == $portVersion + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgomp$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.$portVersion + +BUILD() +{ + mkdir -p build + cd build + cmake .. \ + -DNO_CUDA=ON \ + -DNO_OPENCL=OFF \ + -DNO_OPENGL=ON \ + -DNO_TUTORIALS=ON \ + -DNO_EXAMPLES=ON \ + $cmakeDirArgs +} + +INSTALL() +{ + cd build + make install + + mkdir -p $includeDir + mv $prefix/include/* $includeDir + rmdir $prefix/include/ + + prepareInstalledDevelLib libosdCPU + + fixPkgconfig + + packageEntries devel $developDir +} + +TEST() +{ + cd build + make test +} diff --git a/media-libs/opensubdiv/patches/opensubdiv-3.3.0.patchset b/media-libs/opensubdiv/patches/opensubdiv-3.3.0.patchset new file mode 100644 index 000000000..1bda5ea6a --- /dev/null +++ b/media-libs/opensubdiv/patches/opensubdiv-3.3.0.patchset @@ -0,0 +1,25 @@ +From d81e3fc27521b9b0e5bd9bf2ff1abbbcc25a3c8d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 10 Dec 2017 11:27:28 +0100 +Subject: [PATCH] Platform fixes + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4f3cd9d..84aafb6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -335,7 +335,7 @@ endif() + if(NOT NO_CUDA) + find_package(CUDA 4.0) + endif() +-if(NOT NO_OPENGL AND NOT ANDROID AND NOT IOS) ++if(NOT NO_OPENGL AND NOT ANDROID AND NOT IOS AND NOT HAIKU) + find_package(GLFW 3.0.0) + endif() + if(NOT NO_PTEX) +-- +2.15.0 +