summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Grigo <agrigo2001@yahoo.com.au>2020-05-13 11:58:26 +1000
committerJoonas Niilola <juippis@gentoo.org>2020-06-08 10:45:20 +0300
commitc280c98bb725da61f5b4af2cf872004aea60cc41 (patch)
tree221057eb3037d06435f1c0c3d712c7c32d0d1637
parentsys-fs/xwmfs: removal of old version 0.84 (diff)
downloadgentoo-c280c98bb725da61f5b4af2cf872004aea60cc41.tar.gz
gentoo-c280c98bb725da61f5b4af2cf872004aea60cc41.tar.bz2
gentoo-c280c98bb725da61f5b4af2cf872004aea60cc41.zip
media-libs/opensubdiv: Version bump to 3.4.3
Version bump to media-libs/opensubdiv-3.4.3 This version has been updated to EAPI 7 and inherits from cmake rather than cmake-utils. The license has been corrected to modified apache-2 New USE flags are added to control installation of the docs, examples and tutorials. The build system is patched to install the tutorials into /usr/bin, and to use python 2.7 to build the documentation. The latter fixes bug 722570 for this ebuild. When using FEATURES="test", the basic and regression tests are enabled. However the GLTESTS are disabled as portage does not have access to an X11 display to run them during the build. A direct dependency on libXinerama was added as this is no longer included by glfw for wayland users. This fixes bug 708160 for this ebuild. For cuda users, the build will fail when using GCC 9+. If an incorrect version is selected, the ebuild will warn the user to run gcc-config. Others have found that cuda kernels fail to build with multiple jobs for previous versions of opensubdiv. I use MAKEOPTS="-j1" to prevent this, although it has not been an issue for me. Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au> Closes: https://bugs.gentoo.org/696592 Closes: https://bugs.gentoo.org/708160 Closes: https://bugs.gentoo.org/722570 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--media-libs/opensubdiv/Manifest1
-rw-r--r--media-libs/opensubdiv/files/opensubdiv-3.4.0-0001-documentation-CMakeLists.txt-force-python2.patch51
-rw-r--r--media-libs/opensubdiv/files/opensubdiv-3.4.3-install-tutorials-into-bin.patch52
-rw-r--r--media-libs/opensubdiv/metadata.xml19
-rw-r--r--media-libs/opensubdiv/opensubdiv-3.4.3.ebuild90
5 files changed, 205 insertions, 8 deletions
diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest
index 379d12df0ac..3d73323cadb 100644
--- a/media-libs/opensubdiv/Manifest
+++ b/media-libs/opensubdiv/Manifest
@@ -1 +1,2 @@
DIST opensubdiv-3.3.3.tar.gz 19286806 BLAKE2B 05e25f28a6f2194122d9d4e5299e6d68e236c1e78b4e8494a70191dfb37e45da30968322719bbb784a15d698206fea9e26e92d4689668592bc9ec9bccbc0201d SHA512 65cd72b4240eeb3fdb6d52497a2daa2fc68e10c25c41ffa0cf81449ebcb860e303539043c672265916267a0115f250566570b5705fd5da54f46abe7b9f7baf81
+DIST opensubdiv-3.4.3.tar.gz 39225589 BLAKE2B adb3a3e786999029e5b71659425ed49ea1939a92e2d8ba39ae6abf25ec02c873b8b1bdd34d2e32f843911c7acf5e277a779f82621863fbe0641f772e7603beed SHA512 44fd1361d9e7f48c3fa84f3420ed34743571220602aefb082a42f769ca5b8e9ac21907ce8714f6e3a2caadd75adae03c535a1949a8e6450dfea9ae7a2247cfc2
diff --git a/media-libs/opensubdiv/files/opensubdiv-3.4.0-0001-documentation-CMakeLists.txt-force-python2.patch b/media-libs/opensubdiv/files/opensubdiv-3.4.0-0001-documentation-CMakeLists.txt-force-python2.patch
new file mode 100644
index 00000000000..5455ba98e31
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.4.0-0001-documentation-CMakeLists.txt-force-python2.patch
@@ -0,0 +1,51 @@
+From dc9d14c97fc22ad5b00c9ffb0f83931e42cf2eb0 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Fri, 2 Aug 2019 19:27:17 +0200
+Subject: [PATCH] documentation/CMakeLists.txt: force python2
+
+The patch forces to use Python-2.x to build the documentation
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ documentation/CMakeLists.txt | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt
+index 32b12a3..a93414e 100644
+--- a/documentation/CMakeLists.txt
++++ b/documentation/CMakeLists.txt
+@@ -54,10 +54,10 @@ else()
+
+ endif()
+
+-find_package(PythonInterp 2.6)
++find_package(Python2 COMPONENTS Interpreter)
+
+ # ReST - HTML documentation
+-if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
++if (DOCUTILS_FOUND AND Python2_Interpreter_FOUND)
+
+ set(HTML_FILES
+ search.html
+@@ -198,7 +198,7 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
+ OUTPUT
+ "${rstfile}"
+ COMMAND
+- "${PYTHON_EXECUTABLE}"
++ "${Python2_EXECUTABLE}"
+ ARGS
+ "${CMAKE_CURRENT_SOURCE_DIR}/processTutorials.py"
+ "${infile}"
+@@ -291,7 +291,7 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
+ # build search index and insert navigation tab
+ add_custom_target(search_index
+ COMMAND
+- "${PYTHON_EXECUTABLE}"
++ "${Python2_EXECUTABLE}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/processHtml.py"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/nav_template.txt"
+--
+2.22.0
+
+
diff --git a/media-libs/opensubdiv/files/opensubdiv-3.4.3-install-tutorials-into-bin.patch b/media-libs/opensubdiv/files/opensubdiv-3.4.3-install-tutorials-into-bin.patch
new file mode 100644
index 00000000000..f042967a01a
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.4.3-install-tutorials-into-bin.patch
@@ -0,0 +1,52 @@
+diff -Naur a/tutorials/far/CMakeLists.txt b/tutorials/far/CMakeLists.txt
+--- a/tutorials/far/CMakeLists.txt 2020-05-11 14:48:35.145797436 +1000
++++ b/tutorials/far/CMakeLists.txt 2020-05-11 14:49:39.445969003 +1000
+@@ -30,7 +30,7 @@
+ $<TARGET_OBJECTS:far_obj>
+ )
+
+- install(TARGETS ${NAME} DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++ install(TARGETS ${NAME} DESTINATION "${CMAKE_BINDIR_BASE}")
+
+ endmacro()
+
+diff -Naur a/tutorials/hbr/tutorial_0/CMakeLists.txt b/tutorials/hbr/tutorial_0/CMakeLists.txt
+--- a/tutorials/hbr/tutorial_0/CMakeLists.txt 2020-05-11 14:48:35.145797436 +1000
++++ b/tutorials/hbr/tutorial_0/CMakeLists.txt 2020-05-11 14:50:38.076125987 +1000
+@@ -30,5 +30,5 @@
+ ${SOURCE_FILES}
+ )
+
+-install(TARGETS hbr_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS hbr_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}")
+
+diff -Naur a/tutorials/hbr/tutorial_1/CMakeLists.txt b/tutorials/hbr/tutorial_1/CMakeLists.txt
+--- a/tutorials/hbr/tutorial_1/CMakeLists.txt 2020-05-11 14:48:35.145797436 +1000
++++ b/tutorials/hbr/tutorial_1/CMakeLists.txt 2020-05-11 14:50:10.406051839 +1000
+@@ -30,5 +30,5 @@
+ ${SOURCE_FILES}
+ )
+
+-install(TARGETS hbr_tutorial_1 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS hbr_tutorial_1 DESTINATION "${CMAKE_BINDIR_BASE}")
+
+diff -Naur a/tutorials/hbr/tutorial_2/CMakeLists.txt b/tutorials/hbr/tutorial_2/CMakeLists.txt
+--- a/tutorials/hbr/tutorial_2/CMakeLists.txt 2020-05-11 14:48:35.145797436 +1000
++++ b/tutorials/hbr/tutorial_2/CMakeLists.txt 2020-05-11 14:50:20.706079428 +1000
+@@ -30,5 +30,5 @@
+ ${SOURCE_FILES}
+ )
+
+-install(TARGETS hbr_tutorial_2 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS hbr_tutorial_2 DESTINATION "${CMAKE_BINDIR_BASE}")
+
+diff -Naur a/tutorials/osd/tutorial_0/CMakeLists.txt b/tutorials/osd/tutorial_0/CMakeLists.txt
+--- a/tutorials/osd/tutorial_0/CMakeLists.txt 2020-05-11 14:48:35.145797436 +1000
++++ b/tutorials/osd/tutorial_0/CMakeLists.txt 2020-05-11 14:50:51.446161856 +1000
+@@ -35,5 +35,5 @@
+ osd_static_cpu
+ )
+
+-install(TARGETS osd_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS osd_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}")
+
diff --git a/media-libs/opensubdiv/metadata.xml b/media-libs/opensubdiv/metadata.xml
index 62cc4a9a211..bc4eae250ff 100644
--- a/media-libs/opensubdiv/metadata.xml
+++ b/media-libs/opensubdiv/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
@@ -13,21 +13,24 @@
An Open-Source subdivision surface library.
</longdescription>
<use>
- <flag name="ptex">
- Adds support for faster per-face texture mapping through
- <pkg>media-libs/ptex</pkg>.
- </flag>
<flag name="cuda">
Enable NVIDIA CUDA Toolkit support through
<pkg>dev-util/nvidia-cuda-toolkit</pkg>.
</flag>
+ <flag name="opencl">
+ Enable OpenCL support through
+ <pkg>virtual/opencl</pkg>.
+ </flag>
+ <flag name="ptex">
+ Adds support for faster per-face texture mapping through
+ <pkg>media-libs/ptex</pkg>.
+ </flag>
<flag name="tbb">
Enable multithreading with the Intel Threads Building Blocks through
<pkg>dev-cpp/tbb</pkg>.
</flag>
- <flag name="opencl">
- Enable OpenCL support through
- <pkg>virtual/opencl</pkg>.
+ <flag name="tutorials">
+ Install the tutorials.
</flag>
</use>
<upstream>
diff --git a/media-libs/opensubdiv/opensubdiv-3.4.3.ebuild b/media-libs/opensubdiv/opensubdiv-3.4.3.ebuild
new file mode 100644
index 00000000000..825694ee567
--- /dev/null
+++ b/media-libs/opensubdiv/opensubdiv-3.4.3.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR=emake
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake python-utils-r1 toolchain-funcs
+
+MY_PV="$(ver_rs "1-3" '_')"
+DESCRIPTION="An Open-Source subdivision surface library"
+HOMEPAGE="https://graphics.pixar.com/opensubdiv/docs/intro.html"
+SRC_URI="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+# Modfied Apache-2.0 license, where section 6 has been replaced.
+# See for example CMakeLists.txt for details.
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cuda doc examples opencl openmp ptex tbb test tutorials"
+
+RDEPEND="
+ ${PYTHON_DEPENDS}
+ media-libs/glew:=
+ media-libs/glfw:=
+ cuda? ( dev-util/nvidia-cuda-toolkit:* )
+ opencl? ( virtual/opencl )
+ ptex? ( media-libs/ptex )
+ x11-libs/libXinerama
+"
+DEPEND="
+ ${RDEPEND}
+ tbb? ( dev-cpp/tbb )
+"
+BDEPEND="
+ doc? (
+ dev-python/docutils
+ app-doc/doxygen
+ )
+ cuda? ( <sys-devel/gcc-9[cxx] )
+"
+
+S="${WORKDIR}/OpenSubdiv-${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.3.0-use-gnuinstalldirs.patch"
+ "${FILESDIR}/${PN}-3.3.0-add-CUDA9-compatibility.patch"
+ "${FILESDIR}/${PN}-3.4.0-0001-documentation-CMakeLists.txt-force-python2.patch"
+ "${FILESDIR}/${P}-install-tutorials-into-bin.patch"
+)
+
+RESTRICT="!test? ( test )"
+
+pkg_pretend() {
+ if use cuda; then
+ [[ $(gcc-major-version) -gt 8 ]] && \
+ eerror "USE=cuda requires gcc < 9. Run gcc-config to switch your default compiler" && \
+ die "Need gcc version earlier than 9"
+ fi
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ # GLTESTS are disabled as portage is unable to open a display during test phase
+ local mycmakeargs=(
+ -DGLEW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
+ -DGLFW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
+ -DNO_CLEW=ON
+ -DNO_CUDA=$(usex !cuda)
+ -DNO_DOC=$(usex !doc)
+ -DNO_EXAMPLES=$(usex !examples)
+ -DNO_GLTESTS=ON
+ -DNO_OMP=$(usex !openmp)
+ -DNO_OPENCL=$(usex !opencl)
+ -DNO_PTEX=$(usex !ptex)
+ -DNO_REGRESSION=$(usex !test)
+ -DNO_TBB=$(usex !tbb)
+ -DNO_TESTS=$(usex !test)
+ -DNO_TUTORIALS=$(usex !tutorials)
+ )
+
+ # fails with building cuda kernels when using multiple jobs
+ export MAKEOPTS="-j1"
+ cmake_src_configure
+}