From: Jonathan Scruggs Date: Sat, 22 Oct 2016 17:22:17 +0000 (+0100) Subject: media-libs/opensubdiv: New package X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8e68c375c5637e926b7a16c2b3196ee7bf0cee38;p=gentoo.git media-libs/opensubdiv: New package OpenSubdiv is a set of open source libraries that implement high performance subdivision surface (subdiv) evaluation on massively parallel CPU and GPU architectures. This code path is optimized for drawing deforming surfaces with static topology at interactive framerates. OpenSubdiv is an API ready to be integrated into 3rd party digital content creation tools. It is not an application, nor a tool that can be used directly to create digital assets. Gentoo-Bug: 586380 Signed off by: Jonathan Scruggs (j.scruggs@gmail.com, irc: Dracwyrm) Signed off by: Adrian Grigo (agrigo2001@yahoo.com.au) Closes: https://github.com/gentoo/gentoo/pull/2531 Signed-off-by: David Seifert --- diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest new file mode 100644 index 000000000000..74e075084d0c --- /dev/null +++ b/media-libs/opensubdiv/Manifest @@ -0,0 +1 @@ +DIST opensubdiv-3.1.0.tar.gz 18014579 SHA256 ff3f2cdeeaa8ac4abe83394b1fea27ea3ade8258aff86da5fdfba37415485aba SHA512 9b59cb4e5b124e222b67a48986251cff91bcdc2aee9f71c4b653ad7bb089e860c5954c251a91c0004fa5c28fc4524a0dcbf51d3ae51ea86ee7665ba05d8ec97f WHIRLPOOL 0765a01209781b237df9f51717d7e14dcde57b5e00e7cfaa81e02d6fd409bb2df3bc7c95f26b5ed20bb8cbd6c2b3aaa9ad28861198c25ffd3ec3c6b699a32444 diff --git a/media-libs/opensubdiv/files/opensubdiv-3.1.0-skip-osd-regression.patch b/media-libs/opensubdiv/files/opensubdiv-3.1.0-skip-osd-regression.patch new file mode 100644 index 000000000000..2ebb638e3838 --- /dev/null +++ b/media-libs/opensubdiv/files/opensubdiv-3.1.0-skip-osd-regression.patch @@ -0,0 +1,34 @@ +diff -purN a/regression/CMakeLists.txt b/regression/CMakeLists.txt +--- a/regression/CMakeLists.txt 2016-03-25 22:15:29.000000000 +0000 ++++ b/regression/CMakeLists.txt 2016-06-05 14:09:19.202849569 +0100 +@@ -32,30 +32,4 @@ if (NOT NO_REGRESSION) + + add_subdirectory(far_perf) + +- if(OPENGL_FOUND AND (GLEW_FOUND OR APPLE) AND GLFW_FOUND) +- add_subdirectory(osd_regression) +- else() +- set(MISSING "") +- +- if (NOT OPENGL_FOUND) +- list(APPEND MISSING OpenGL) +- endif() +- +- if (NOT GLEW_FOUND) +- list(APPEND MISSING glew) +- endif() +- +- if (NOT GLFW_FOUND) +- list(APPEND MISSING glfw) +- endif() +- +- message(WARNING +- "The following libraries could not be found : ${MISSING}. " +- "The osd regression test will not be available. " +- "If you have these libraries installed, please specify their " +- "path to cmake (through the GLEW_LOCATION and GLFW_LOCATION " +- "command line arguments or environment variables)." +- ) +- endif() +- + endif() diff --git a/media-libs/opensubdiv/metadata.xml b/media-libs/opensubdiv/metadata.xml new file mode 100644 index 000000000000..1bff35307644 --- /dev/null +++ b/media-libs/opensubdiv/metadata.xml @@ -0,0 +1,39 @@ + + + + + j.scruggs@gmail.com + Jonathan Scruggs + + + agrigo2001@yahoo.com.au + Adrian Grigo + + + proxy-maint@gentoo.org + Proxy Maintainers + + + An Open-Source subdivision surface library. + + + + Adds support for faster per-face texture mapping through + media-libs/ptex. + + + Enable NVIDIA CUDA Toolkit support through + dev-util/nvidia-cuda-toolkit. + + + Enable multithreading with the Intel Threads Building Blocks through + dev-cpp/tbb. + + + Enable OpenCL support through + virtual/opencl. + + + + + diff --git a/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild new file mode 100644 index 000000000000..94a1b00b1821 --- /dev/null +++ b/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +inherit cmake-utils toolchain-funcs versionator + +DESCRIPTION="An Open-Source subdivision surface library" +HOMEPAGE="http://graphics.pixar.com/opensubdiv/" + +MY_PV="$(replace_all_version_separators '_')" + +SRC_URI="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +IUSE="cuda doc examples opencl openmp ptex tbb test tutorials" + +# OpenCL does not work with Open Source drivers. +RDEPEND="media-libs/glew:= + media-libs/glfw:= + opencl? ( x11-drivers/ati-drivers:* ) + cuda? ( dev-util/nvidia-cuda-toolkit:* ) + ptex? ( media-libs/ptex )" + +DEPEND="${RDEPEND} + tbb? ( dev-cpp/tbb ) + doc? ( dev-python/docutils app-doc/doxygen )" + +KEYWORDS="~amd64 ~x86" + +S="${WORKDIR}"/OpenSubdiv-${MY_PV} + +PATCHES=( "${FILESDIR}"/${P}-skip-osd-regression.patch ) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_configure() { + local mycmakeargs=( + -DNO_MAYA=1 + -DNO_CLEW=1 + -DNO_DOC=$(usex !doc) + -DNO_TBB=$(usex !tbb) + -DNO_PTEX=$(usex !ptex) + -DNO_OMP=$(usex !openmp) + -DNO_OPENCL=$(usex !opencl) + -DNO_CUDA=$(usex !cuda) + -DNO_REGRESSION=$(usex !test) + -DNO_EXAMPLES=$(usex !examples) + -DNO_TUTORIALS=$(usex !tutorials) + -DGLEW_LOCATION="${EPREFIX}/usr/$(get_libdir)" + -DGLFW_LOCATION="${EPREFIX}/usr/$(get_libdir)" + ) + + cmake-utils_src_configure +}