summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonas Niilola <juippis@gentoo.org>2020-06-08 10:27:26 +0300
committerJoonas Niilola <juippis@gentoo.org>2020-06-08 10:45:21 +0300
commitd8b704713c1d3d78108d58c2b6aab617f59c4841 (patch)
tree9f9d5cd518a149a683e3147a5f7f7777211c339e
parentmedia-libs/opensubdiv: clean ebuilds (diff)
downloadgentoo-d8b704713c1d3d78108d58c2b6aab617f59c4841.tar.gz
gentoo-d8b704713c1d3d78108d58c2b6aab617f59c4841.tar.bz2
gentoo-d8b704713c1d3d78108d58c2b6aab617f59c4841.zip
media-libs/opensubdiv: undo changes to stable ebuild
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--media-libs/opensubdiv/opensubdiv-3.3.3.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild b/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild
new file mode 100644
index 000000000000..cbbf0be097d8
--- /dev/null
+++ b/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils toolchain-funcs eapi7-ver
+
+MY_PV="$(ver_rs "1-3" '_')"
+DESCRIPTION="An Open-Source subdivision surface library"
+HOMEPAGE="http://graphics.pixar.com/opensubdiv/"
+SRC_URI="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="cuda doc opencl openmp ptex tbb"
+
+RDEPEND="media-libs/glew:=
+ media-libs/glfw:=
+ cuda? ( dev-util/nvidia-cuda-toolkit:* )
+ opencl? ( virtual/opencl )
+ ptex? ( media-libs/ptex )"
+
+DEPEND="${RDEPEND}
+ doc? (
+ dev-python/docutils
+ app-doc/doxygen
+ )
+ tbb? ( dev-cpp/tbb )"
+
+S="${WORKDIR}/OpenSubdiv-${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.3.0-fix-quotes.patch"
+ "${FILESDIR}/${PN}-3.3.0-use-gnuinstalldirs.patch"
+ "${FILESDIR}/${PN}-3.3.0-add-CUDA9-compatibility.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_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=1 # They don't work with certain settings
+ -DNO_EXAMPLES=1 # Not needed.
+ -DNO_TUTORIALS=1 # They install illegally. Need to find a better solution.
+ -DGLEW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
+ -DGLFW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
+ )
+
+ cmake-utils_src_configure
+}