public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/, media-libs/opensubdiv/files/
@ 2017-12-24 22:16 David Seifert
  0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2017-12-24 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     fb82335ceee9932c7b19e05dffb354e82c27d331
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Sun Dec 24 18:39:37 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 22:16:02 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb82335c

media-libs/opensubdiv: Remove old versions and patches

 media-libs/opensubdiv/Manifest                     |  2 -
 .../opensubdiv-3.1.0-skip-osd-regression.patch     | 34 ------------
 media-libs/opensubdiv/opensubdiv-3.1.0.ebuild      | 59 --------------------
 media-libs/opensubdiv/opensubdiv-3.1.1.ebuild      | 64 ----------------------
 media-libs/opensubdiv/opensubdiv-3.3.0.ebuild      |  6 +-
 5 files changed, 3 insertions(+), 162 deletions(-)

diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest
index ed3426db629..91635b62171 100644
--- a/media-libs/opensubdiv/Manifest
+++ b/media-libs/opensubdiv/Manifest
@@ -1,3 +1 @@
-DIST opensubdiv-3.1.0.tar.gz 18014579 BLAKE2B 88f16e81eda8c1626b161f94160d02cda7027dff1ac9c795dfe9694250e707dfa106e564dfa22a18bfd3f5e355337626349b6a162c999c10c4d8c8695d03b925 SHA512 9b59cb4e5b124e222b67a48986251cff91bcdc2aee9f71c4b653ad7bb089e860c5954c251a91c0004fa5c28fc4524a0dcbf51d3ae51ea86ee7665ba05d8ec97f
-DIST opensubdiv-3.1.1.tar.gz 18014871 BLAKE2B 5f3a8a7cfb3f2c4cebb8dab1ea65dde1ac3ef6f42a9603e0fa8c89b2ecdd0f16809510b7b03f6a4c3b0fe522e7b07536a09ab476720d44cc7e4289ba1931beb8 SHA512 700db7e1dde3e916011721a5b42d5e32ea4ae355ab5e3e415541d62efa2059d56d5f30cef853285e95a93f3a3b5fe24a906547a52cce94d47b101ae20021d5b5
 DIST opensubdiv-3.3.0.tar.gz 19263469 BLAKE2B f169b5c58877d1dd4ea45cb04d52567803da7c2d11edab072e2b65583109c7c2d52abe07f5bd2b03cba215cdb524a0468900419d8381e95c35eb2f3f4bebe02b SHA512 7c17d847187d46182d08fbee9396fd8793ac04591821084d40da475c9d25560d01575282946e1a30252bba12db9ea06cbf50ff649f91adce72f6127ad6a36418

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
deleted file mode 100644
index 2ebb638e383..00000000000
--- a/media-libs/opensubdiv/files/opensubdiv-3.1.0-skip-osd-regression.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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/opensubdiv-3.1.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild
deleted file mode 100644
index aa63d90eeda..00000000000
--- a/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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 opencl openmp ptex tbb test"
-
-RDEPEND="media-libs/glew:=
-	media-libs/glfw:=
-	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=1 # broken
-		-DNO_TUTORIALS=1 # broken
-		-DGLEW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
-		-DGLFW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
-	)
-
-	cmake-utils_src_configure
-}

diff --git a/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild b/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild
deleted file mode 100644
index 5c1768b6b37..00000000000
--- a/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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 opencl openmp ptex tbb"
-
-RDEPEND="media-libs/glew:=
-	media-libs/glfw:=
-	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}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	sed -e 's|"${OSD_SONAME}"|${OSD_SONAME}|' \
-	    -i CMakeLists.txt || die
-}
-
-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=1 # The don't work with certain settings
-		-DNO_EXAMPLES=1 # Broken
-		-DNO_TUTORIALS=1 # Broken
-		-DGLEW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
-		-DGLFW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
-	)
-
-	cmake-utils_src_configure
-}

diff --git a/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
index a85444ac261..f34298cd596 100644
--- a/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
+++ b/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${MY_PV}.t
 LICENSE="ZLIB"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="cuda doc examples opencl openmp ptex tbb tutorials"
+IUSE="cuda doc opencl openmp ptex tbb"
 
 RDEPEND="media-libs/glew:=
 	media-libs/glfw:=
@@ -54,8 +54,8 @@ src_configure() {
 		-DNO_OPENCL=$(usex !opencl)
 		-DNO_CUDA=$(usex !cuda)
 		-DNO_REGRESSION=1 # They don't work with certain settings
-		-DNO_EXAMPLES=$(usex !examples)
-		-DNO_TUTORIALS=$(usex !tutorials)
+		-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)"
 		-DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/, media-libs/opensubdiv/files/
@ 2017-12-24 22:16 David Seifert
  0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2017-12-24 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     02baca534283f0b8bfda69c603033418726a34b2
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Sun Dec 24 18:37:08 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 22:15:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02baca53

media-libs/opensubdiv: Add CUDA 9 compatibility patch

Closes: https://bugs.gentoo.org/641242
Closes: https://github.com/gentoo/gentoo/pull/6624

 .../opensubdiv-3.3.0-add-CUDA9-compatibility.patch | 25 ++++++++++++++++++++++
 media-libs/opensubdiv/opensubdiv-3.3.0.ebuild      |  7 +++---
 2 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.3.0-add-CUDA9-compatibility.patch b/media-libs/opensubdiv/files/opensubdiv-3.3.0-add-CUDA9-compatibility.patch
new file mode 100644
index 00000000000..9fe81c4ee19
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.3.0-add-CUDA9-compatibility.patch
@@ -0,0 +1,25 @@
+From 7b9157bca7138480c387ef3d5b69b6cf1eb498e5 Mon Sep 17 00:00:00 2001
+From: "Daniel M. Weeks" <dan@danweeks.net>
+Date: Fri, 15 Dec 2017 22:45:55 -0500
+Subject: [PATCH] CUDA 9 compatible gpu-architecture default
+
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4f3cd9d4..fa438b46 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -513,8 +513,10 @@ if(CUDA_FOUND)
+         if (NOT DEFINED OSD_CUDA_NVCC_FLAGS)
+             if (CUDA_VERSION_MAJOR LESS 6)
+                 set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_11 )
+-            else()
++            elseif (CUDA_VERSION_MAJOR LESS 9)
+                 set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_20 )
++            else()
++                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_30 )
+             endif()
+         endif()
+     endif()

diff --git a/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
index 1c1abebee36..a85444ac261 100644
--- a/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
+++ b/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${MY_PV}.t
 LICENSE="ZLIB"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="cuda doc opencl openmp ptex tbb"
+IUSE="cuda doc examples opencl openmp ptex tbb tutorials"
 
 RDEPEND="media-libs/glew:=
 	media-libs/glfw:=
@@ -32,6 +32,7 @@ S="${WORKDIR}/OpenSubdiv-${MY_PV}"
 PATCHES=(
 	"${FILESDIR}/${P}-fix-quotes.patch"
 	"${FILESDIR}/${P}-use-gnuinstalldirs.patch"
+	"${FILESDIR}/${P}-add-CUDA9-compatibility.patch"
 )
 
 pkg_pretend() {
@@ -53,8 +54,8 @@ src_configure() {
 		-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.
+		-DNO_EXAMPLES=$(usex !examples)
+		-DNO_TUTORIALS=$(usex !tutorials)
 		-DGLEW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
 		-DGLFW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
 		-DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/, media-libs/opensubdiv/files/
@ 2020-06-08  7:46 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2020-06-08  7:46 UTC (permalink / raw
  To: gentoo-commits

commit:     de16806017d00dbe9faaa203d086ce3b29b95919
Author:     Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Wed May 13 06:56:10 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Jun  8 07:45:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de168060

media-libs/opensubdiv: Update to EAPI 7

Update ebuild to use EAPI 7. Remove eapi7-ver from inherit.

Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...ensubdiv-3.3.3-install-tutorials-into-bin.patch | 130 +++++++++++++++++++++
 media-libs/opensubdiv/opensubdiv-3.3.3.ebuild      |  70 +++++++----
 2 files changed, 178 insertions(+), 22 deletions(-)

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.3.3-install-tutorials-into-bin.patch b/media-libs/opensubdiv/files/opensubdiv-3.3.3-install-tutorials-into-bin.patch
new file mode 100644
index 00000000000..ec63f47b440
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.3.3-install-tutorials-into-bin.patch
@@ -0,0 +1,130 @@
+diff -Naur a/tutorials/far/tutorial_0/CMakeLists.txt b/tutorials/far/tutorial_0/CMakeLists.txt
+--- a/tutorials/far/tutorial_0/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_0/CMakeLists.txt	2020-05-13 16:06:40.857855388 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_1/CMakeLists.txt b/tutorials/far/tutorial_1/CMakeLists.txt
+--- a/tutorials/far/tutorial_1/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_1/CMakeLists.txt	2020-05-13 16:06:53.137874901 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_1 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_1 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_2/CMakeLists.txt b/tutorials/far/tutorial_2/CMakeLists.txt
+--- a/tutorials/far/tutorial_2/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_2/CMakeLists.txt	2020-05-13 16:07:04.297892363 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_2 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_2 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_3/CMakeLists.txt b/tutorials/far/tutorial_3/CMakeLists.txt
+--- a/tutorials/far/tutorial_3/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_3/CMakeLists.txt	2020-05-13 16:07:20.377917078 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_3 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_3 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_4/CMakeLists.txt b/tutorials/far/tutorial_4/CMakeLists.txt
+--- a/tutorials/far/tutorial_4/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_4/CMakeLists.txt	2020-05-13 16:07:36.727941691 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_4 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_4 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_5/CMakeLists.txt b/tutorials/far/tutorial_5/CMakeLists.txt
+--- a/tutorials/far/tutorial_5/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_5/CMakeLists.txt	2020-05-13 16:07:44.797953646 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_5 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_5 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_6/CMakeLists.txt b/tutorials/far/tutorial_6/CMakeLists.txt
+--- a/tutorials/far/tutorial_6/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_6/CMakeLists.txt	2020-05-13 16:07:53.847966914 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_6 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_6 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_7/CMakeLists.txt b/tutorials/far/tutorial_7/CMakeLists.txt
+--- a/tutorials/far/tutorial_7/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_7/CMakeLists.txt	2020-05-13 16:08:02.047978804 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_7 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_7 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+diff -Naur a/tutorials/far/tutorial_8/CMakeLists.txt b/tutorials/far/tutorial_8/CMakeLists.txt
+--- a/tutorials/far/tutorial_8/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
++++ b/tutorials/far/tutorial_8/CMakeLists.txt	2020-05-13 16:08:16.287999162 +1000
+@@ -33,5 +33,5 @@
+     $<TARGET_OBJECTS:far_obj>
+ )
+ 
+-install(TARGETS far_tutorial_8 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
++install(TARGETS far_tutorial_8 DESTINATION "${CMAKE_BINDIR_BASE}")
+ 
+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-13 16:06:02.537792402 +1000
++++ b/tutorials/hbr/tutorial_0/CMakeLists.txt	2020-05-13 16:08:37.278028518 +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-13 16:06:02.537792402 +1000
++++ b/tutorials/hbr/tutorial_1/CMakeLists.txt	2020-05-13 16:08:45.028039168 +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-13 16:06:02.537792402 +1000
++++ b/tutorials/hbr/tutorial_2/CMakeLists.txt	2020-05-13 16:08:54.138051562 +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-13 16:06:02.537792402 +1000
++++ b/tutorials/osd/tutorial_0/CMakeLists.txt	2020-05-13 16:09:10.748073802 +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/opensubdiv-3.3.3.ebuild b/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild
index eedadea9985..c0ddde3439a 100644
--- a/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild
+++ b/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild
@@ -1,42 +1,63 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit cmake-utils toolchain-funcs eapi7-ver
+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="http://graphics.pixar.com/opensubdiv/"
+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"
 
-LICENSE="ZLIB"
+# 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 opencl openmp ptex tbb"
+IUSE="cuda doc examples opencl openmp ptex tbb test tutorials"
 
-RDEPEND="media-libs/glew:=
+RDEPEND="
+	${PYTHON_DEPENDS}
+	media-libs/glew:=
 	media-libs/glfw:=
 	cuda? ( dev-util/nvidia-cuda-toolkit:* )
 	opencl? ( virtual/opencl )
-	ptex? ( media-libs/ptex )"
-
-DEPEND="${RDEPEND}
+	ptex? ( media-libs/ptex )
+	x11-libs/libXinerama
+"
+DEPEND="
+	${RDEPEND}
+	tbb? ( dev-cpp/tbb )
+"
+BDEPEND="
 	doc? (
 		dev-python/docutils
 		app-doc/doxygen
 	)
-	tbb? ( dev-cpp/tbb )"
+	cuda? ( <sys-devel/gcc-9[cxx] )
+"
 
 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"
+	"${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
 }
 
@@ -45,20 +66,25 @@ pkg_setup() {
 }
 
 src_configure() {
+	# GLTESTS are disabled as portage is unable to open a display during test phase
 	local mycmakeargs=(
-		-DNO_CLEW=1
+		-DGLEW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
+		-DGLFW_LOCATION="${EPREFIX}/usr/$(get_libdir)"
+		-DNO_CLEW=ON
+		-DNO_CUDA=$(usex !cuda)
 		-DNO_DOC=$(usex !doc)
-		-DNO_TBB=$(usex !tbb)
-		-DNO_PTEX=$(usex !ptex)
+		-DNO_EXAMPLES=$(usex !examples)
+		-DNO_GLTESTS=ON
 		-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)"
+		-DNO_PTEX=$(usex !ptex)
+		-DNO_REGRESSION=$(usex !test)
+		-DNO_TBB=$(usex !tbb)
+		-DNO_TESTS=$(usex !test)
+		-DNO_TUTORIALS=$(usex !tutorials)
 	)
 
-	cmake-utils_src_configure
+	# fails with building cuda kernels when using multiple jobs
+	export MAKEOPTS="-j1"
+	cmake_src_configure
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/, media-libs/opensubdiv/files/
@ 2020-06-08  7:46 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2020-06-08  7:46 UTC (permalink / raw
  To: gentoo-commits

commit:     c280c98bb725da61f5b4af2cf872004aea60cc41
Author:     Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Wed May 13 01:58:26 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Jun  8 07:45:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c280c98b

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 <AT> 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 <AT> gentoo.org>

 media-libs/opensubdiv/Manifest                     |  1 +
 ...ocumentation-CMakeLists.txt-force-python2.patch | 51 ++++++++++++
 ...ensubdiv-3.4.3-install-tutorials-into-bin.patch | 52 +++++++++++++
 media-libs/opensubdiv/metadata.xml                 | 19 +++--
 media-libs/opensubdiv/opensubdiv-3.4.3.ebuild      | 90 ++++++++++++++++++++++
 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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/, media-libs/opensubdiv/files/
@ 2021-02-14 21:05 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2021-02-14 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     0df8bd135a48cd0c18cb82585d76ae947e8acc43
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 21:03:53 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 14 21:03:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0df8bd13

media-libs/opensubdiv: Drop 3.3.3 and 3.3.3-r1

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/opensubdiv/Manifest                     |   1 -
 .../files/opensubdiv-3.3.0-fix-quotes.patch        |  13 ---
 ...ensubdiv-3.3.3-install-tutorials-into-bin.patch | 130 ---------------------
 media-libs/opensubdiv/opensubdiv-3.3.3-r1.ebuild   |  90 --------------
 media-libs/opensubdiv/opensubdiv-3.3.3.ebuild      |  64 ----------
 5 files changed, 298 deletions(-)

diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest
index 3d73323cadb..9d551e63ade 100644
--- a/media-libs/opensubdiv/Manifest
+++ b/media-libs/opensubdiv/Manifest
@@ -1,2 +1 @@
-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.3.0-fix-quotes.patch b/media-libs/opensubdiv/files/opensubdiv-3.3.0-fix-quotes.patch
deleted file mode 100644
index 2b5c71a37cb..00000000000
--- a/media-libs/opensubdiv/files/opensubdiv-3.3.0-fix-quotes.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e02ce90c..6d4f5342 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -48,7 +48,7 @@ endif()
-     string(REGEX REPLACE "^v" "" OSD_SONAME ${OSD_SONAME})
- 
-     add_definitions(
--        -DOPENSUBDIV_VERSION_STRING="${OSD_SONAME}"
-+        -DOPENSUBDIV_VERSION_STRING=\\\"${OSD_SONAME}\\\"
-     )
- 
- #-------------------------------------------------------------------------------

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.3.3-install-tutorials-into-bin.patch b/media-libs/opensubdiv/files/opensubdiv-3.3.3-install-tutorials-into-bin.patch
deleted file mode 100644
index ec63f47b440..00000000000
--- a/media-libs/opensubdiv/files/opensubdiv-3.3.3-install-tutorials-into-bin.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-diff -Naur a/tutorials/far/tutorial_0/CMakeLists.txt b/tutorials/far/tutorial_0/CMakeLists.txt
---- a/tutorials/far/tutorial_0/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_0/CMakeLists.txt	2020-05-13 16:06:40.857855388 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_0 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_1/CMakeLists.txt b/tutorials/far/tutorial_1/CMakeLists.txt
---- a/tutorials/far/tutorial_1/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_1/CMakeLists.txt	2020-05-13 16:06:53.137874901 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_1 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_1 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_2/CMakeLists.txt b/tutorials/far/tutorial_2/CMakeLists.txt
---- a/tutorials/far/tutorial_2/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_2/CMakeLists.txt	2020-05-13 16:07:04.297892363 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_2 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_2 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_3/CMakeLists.txt b/tutorials/far/tutorial_3/CMakeLists.txt
---- a/tutorials/far/tutorial_3/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_3/CMakeLists.txt	2020-05-13 16:07:20.377917078 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_3 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_3 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_4/CMakeLists.txt b/tutorials/far/tutorial_4/CMakeLists.txt
---- a/tutorials/far/tutorial_4/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_4/CMakeLists.txt	2020-05-13 16:07:36.727941691 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_4 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_4 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_5/CMakeLists.txt b/tutorials/far/tutorial_5/CMakeLists.txt
---- a/tutorials/far/tutorial_5/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_5/CMakeLists.txt	2020-05-13 16:07:44.797953646 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_5 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_5 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_6/CMakeLists.txt b/tutorials/far/tutorial_6/CMakeLists.txt
---- a/tutorials/far/tutorial_6/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_6/CMakeLists.txt	2020-05-13 16:07:53.847966914 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_6 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_6 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_7/CMakeLists.txt b/tutorials/far/tutorial_7/CMakeLists.txt
---- a/tutorials/far/tutorial_7/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_7/CMakeLists.txt	2020-05-13 16:08:02.047978804 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_7 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_7 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-diff -Naur a/tutorials/far/tutorial_8/CMakeLists.txt b/tutorials/far/tutorial_8/CMakeLists.txt
---- a/tutorials/far/tutorial_8/CMakeLists.txt	2020-05-13 16:06:02.537792402 +1000
-+++ b/tutorials/far/tutorial_8/CMakeLists.txt	2020-05-13 16:08:16.287999162 +1000
-@@ -33,5 +33,5 @@
-     $<TARGET_OBJECTS:far_obj>
- )
- 
--install(TARGETS far_tutorial_8 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")
-+install(TARGETS far_tutorial_8 DESTINATION "${CMAKE_BINDIR_BASE}")
- 
-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-13 16:06:02.537792402 +1000
-+++ b/tutorials/hbr/tutorial_0/CMakeLists.txt	2020-05-13 16:08:37.278028518 +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-13 16:06:02.537792402 +1000
-+++ b/tutorials/hbr/tutorial_1/CMakeLists.txt	2020-05-13 16:08:45.028039168 +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-13 16:06:02.537792402 +1000
-+++ b/tutorials/hbr/tutorial_2/CMakeLists.txt	2020-05-13 16:08:54.138051562 +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-13 16:06:02.537792402 +1000
-+++ b/tutorials/osd/tutorial_0/CMakeLists.txt	2020-05-13 16:09:10.748073802 +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/opensubdiv-3.3.3-r1.ebuild b/media-libs/opensubdiv/opensubdiv-3.3.3-r1.ebuild
deleted file mode 100644
index 92f1b42c70a..00000000000
--- a/media-libs/opensubdiv/opensubdiv-3.3.3-r1.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# 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_DEPS}
-	media-libs/glew:=
-	media-libs/glfw:=
-	x11-libs/libXinerama
-	cuda? ( dev-util/nvidia-cuda-toolkit:* )
-	opencl? ( virtual/opencl )
-	ptex? ( media-libs/ptex )
-"
-DEPEND="
-	${RDEPEND}
-	tbb? ( dev-cpp/tbb )
-"
-BDEPEND="
-	doc? (
-		app-doc/doxygen
-		dev-python/docutils
-	)
-	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
-}

diff --git a/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild b/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild
deleted file mode 100644
index cbbf0be097d..00000000000
--- a/media-libs/opensubdiv/opensubdiv-3.3.3.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/, media-libs/opensubdiv/files/
@ 2022-02-12 15:15 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-02-12 15:15 UTC (permalink / raw
  To: gentoo-commits

commit:     2943d53a64fc9448e3a6431f8c56bb19f9e04c5b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 15:15:36 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 12 15:15:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2943d53a

media-libs/opensubdiv: add patch for >= TBB 2021

Bug: https://bugs.gentoo.org/820824
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/opensubdiv-3.4.4-tbb-2021.patch          | 65 +++++++++++++++
 media-libs/opensubdiv/opensubdiv-3.4.4-r3.ebuild   | 94 ++++++++++++++++++++++
 2 files changed, 159 insertions(+)

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.4.4-tbb-2021.patch b/media-libs/opensubdiv/files/opensubdiv-3.4.4-tbb-2021.patch
new file mode 100644
index 000000000000..bae9c4a9d1f1
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.4.4-tbb-2021.patch
@@ -0,0 +1,65 @@
+https://github.com/PixarAnimationStudios/OpenSubdiv/pull/1234
+https://bugs.gentoo.org/820824
+
+From 7375c99a4d1337f9b79775fb2c753e7865968642 Mon Sep 17 00:00:00 2001
+From: Artur Sinila <freesoftware@logarithmus.dev>
+Date: Sun, 25 Jul 2021 20:34:48 +0300
+Subject: [PATCH 1/2] Fix typo: schedular -> scheduler
+
+---
+ opensubdiv/osd/tbbEvaluator.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/opensubdiv/osd/tbbEvaluator.h b/opensubdiv/osd/tbbEvaluator.h
+index 6bd365bc5..886a94837 100644
+--- a/opensubdiv/osd/tbbEvaluator.h
++++ b/opensubdiv/osd/tbbEvaluator.h
+@@ -1226,7 +1226,7 @@ class TbbEvaluator {
+     /// \brief synchronize all asynchronous computation invoked on this device.
+     static void Synchronize(void *deviceContext = NULL);
+ 
+-    /// \brief initialize tbb task schedular
++    /// \brief initialize tbb task scheduler
+     ///        (optional: client may use tbb::task_scheduler_init)
+     ///
+     /// @param numThreads      how many threads
+
+From 9079a517f406afba9ea50657b0a0786ad7a7bdcb Mon Sep 17 00:00:00 2001
+From: Artur Sinila <freesoftware@logarithmus.dev>
+Date: Sun, 25 Jul 2021 20:58:27 +0300
+Subject: [PATCH 2/2] Support oneTBB 2021
+
+---
+ opensubdiv/osd/tbbEvaluator.cpp | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/opensubdiv/osd/tbbEvaluator.cpp b/opensubdiv/osd/tbbEvaluator.cpp
+index c98db9f6d..66c2ed58f 100644
+--- a/opensubdiv/osd/tbbEvaluator.cpp
++++ b/opensubdiv/osd/tbbEvaluator.cpp
+@@ -25,7 +25,8 @@
+ #include "../osd/tbbEvaluator.h"
+ #include "../osd/tbbKernel.h"
+ 
+-#include <tbb/task_scheduler_init.h>
++#define TBB_PREVIEW_GLOBAL_CONTROL true
++#include <tbb/global_control.h>
+ 
+ namespace OpenSubdiv {
+ namespace OPENSUBDIV_VERSION {
+@@ -215,10 +216,11 @@ TbbEvaluator::Synchronize(void *) {
+ /* static */
+ void
+ TbbEvaluator::SetNumThreads(int numThreads) {
+-    if (numThreads == -1) {
+-        tbb::task_scheduler_init init;
+-    } else {
+-        tbb::task_scheduler_init init(numThreads);
++    if (numThreads != -1) {
++		tbb::global_control tbb_global_control(
++			tbb::global_control::max_allowed_parallelism,
++			numThreads
++		);
+     }
+ }
+ 

diff --git a/media-libs/opensubdiv/opensubdiv-3.4.4-r3.ebuild b/media-libs/opensubdiv/opensubdiv-3.4.4-r3.ebuild
new file mode 100644
index 000000000000..524b64930836
--- /dev/null
+++ b/media-libs/opensubdiv/opensubdiv-3.4.4-r3.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake cuda 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"
+S="${WORKDIR}/OpenSubdiv-${MY_PV}"
+
+# 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 ~arm ~arm64 ~x86"
+IUSE="cuda examples opencl openmp ptex tbb test tutorials"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	media-libs/glew:=
+	media-libs/glfw:=
+	x11-libs/libXinerama
+	cuda? ( dev-util/nvidia-cuda-toolkit:* )
+	opencl? ( virtual/opencl )
+	ptex? ( media-libs/ptex )
+"
+DEPEND="
+	${RDEPEND}
+	tbb? ( dev-cpp/tbb:= )
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.3.0-use-gnuinstalldirs.patch"
+	"${FILESDIR}/${PN}-3.4.3-install-tutorials-into-bin.patch"
+	"${FILESDIR}/${P}-add-CUDA11-compatibility.patch"
+	"${FILESDIR}/${PN}-3.4.4-tbb-2021.patch"
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	use cuda && cuda_src_prepare
+}
+
+src_configure() {
+	# GLTESTS are disabled as portage is unable to open a display during test phase
+	# TODO: virtx work?
+	local mycmakeargs=(
+		-DGLEW_LOCATION="${ESYSROOT}/usr/$(get_libdir)"
+		-DGLFW_LOCATION="${ESYSROOT}/usr/$(get_libdir)"
+		-DNO_CLEW=ON
+		-DNO_CUDA=$(usex !cuda)
+		# Docs needed Python 2 so disabled
+		# bug #815172
+		-DNO_DOC=ON
+		-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)
+	)
+
+	if use cuda; then
+		# old cmake CUDA module doesn't use environment variable to initialize flags
+		mycmakeargs+=( -DCUDA_NVCC_FLAGS="${NVCCFLAGS}" )
+
+		# check if user provided --gpu-architecture/-arch flag and prevent cmake from overriding it if so
+		for f in ${NVCCFLAGS}; do
+			if [[ ${f} == -arch* || ${f} == --gpu-architecture* ]]; then
+				mycmakeargs+=( -DOSD_CUDA_NVCC_FLAGS="" )
+				break
+			fi
+		done
+	fi
+
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-12 15:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-24 22:16 [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/, media-libs/opensubdiv/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2022-02-12 15:15 Sam James
2021-02-14 21:05 Andreas Sturmlechner
2020-06-08  7:46 Joonas Niilola
2020-06-08  7:46 Joonas Niilola
2017-12-24 22:16 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox