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

commit:     8e68c375c5637e926b7a16c2b3196ee7bf0cee38
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Sat Oct 22 17:22:17 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Oct 22 23:25:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e68c375

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 <AT> gmail.com, irc: Dracwyrm)
Signed off by: Adrian Grigo (agrigo2001 <AT> yahoo.com.au)
Closes: https://github.com/gentoo/gentoo/pull/2531

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-libs/opensubdiv/Manifest                     |  1 +
 .../opensubdiv-3.1.0-skip-osd-regression.patch     | 34 ++++++++++++
 media-libs/opensubdiv/metadata.xml                 | 39 ++++++++++++++
 media-libs/opensubdiv/opensubdiv-3.1.0.ebuild      | 62 ++++++++++++++++++++++
 4 files changed, 136 insertions(+)

diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest
new file mode 100644
index 00000000..74e0750
--- /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 00000000..2ebb638
--- /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 00000000..1bff353
--- /dev/null
+++ b/media-libs/opensubdiv/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer restrict="&gt;=media-libs/opensubdiv-3.0.5" type="person">
+		<email>j.scruggs@gmail.com</email>
+		<name>Jonathan Scruggs</name>
+        </maintainer>
+	<maintainer restrict="&gt;=media-libs/opensubdiv-3.0.5" type="person">
+		<email>agrigo2001@yahoo.com.au</email>
+		<name>Adrian Grigo</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<longdescription>
+		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="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>
+		<flag name="tutorials">
+		</flag>
+	</use>
+</pkgmetadata>

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 00000000..94a1b00
--- /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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/files/, media-libs/opensubdiv/
@ 2017-09-23  8:38 David Seifert
  0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2017-09-23  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     072d9adafab829b7f934637f7ba8a8f29c2ea3db
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Thu Sep 21 09:14:47 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Sep 23 08:36:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=072d9ada

media-libs/opensubdiv: Version bump to 3.3 and remove ati-drivers

* Fixed compile error about stray quotes
* Changed hardcoded paths to GNUInstallDirs which
  fixed multilib-strict check fail

Closes: https://bugs.gentoo.org/605958
Closes: https://bugs.gentoo.org/611844
Closes: https://github.com/gentoo/gentoo/pull/5751

 media-libs/opensubdiv/Manifest                     |  1 +
 .../files/opensubdiv-3.3.0-fix-quotes.patch        | 13 ++++++++
 .../opensubdiv-3.3.0-use-gnuinstalldirs.patch      | 39 ++++++++++++++++++++++
 media-libs/opensubdiv/opensubdiv-3.1.0.ebuild      |  2 --
 media-libs/opensubdiv/opensubdiv-3.1.1.ebuild      |  9 +++--
 ...subdiv-3.1.1.ebuild => opensubdiv-3.3.0.ebuild} | 22 +++++++-----
 6 files changed, 73 insertions(+), 13 deletions(-)

diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest
index a86411c5c8d..26ccdac0e65 100644
--- a/media-libs/opensubdiv/Manifest
+++ b/media-libs/opensubdiv/Manifest
@@ -1,2 +1,3 @@
 DIST opensubdiv-3.1.0.tar.gz 18014579 SHA256 ff3f2cdeeaa8ac4abe83394b1fea27ea3ade8258aff86da5fdfba37415485aba SHA512 9b59cb4e5b124e222b67a48986251cff91bcdc2aee9f71c4b653ad7bb089e860c5954c251a91c0004fa5c28fc4524a0dcbf51d3ae51ea86ee7665ba05d8ec97f WHIRLPOOL 0765a01209781b237df9f51717d7e14dcde57b5e00e7cfaa81e02d6fd409bb2df3bc7c95f26b5ed20bb8cbd6c2b3aaa9ad28861198c25ffd3ec3c6b699a32444
 DIST opensubdiv-3.1.1.tar.gz 18014871 SHA256 6a2043c0c8b6e85bdc34dbd6d05e6bc7504a4d01dcfb165b4abe180c50d41164 SHA512 700db7e1dde3e916011721a5b42d5e32ea4ae355ab5e3e415541d62efa2059d56d5f30cef853285e95a93f3a3b5fe24a906547a52cce94d47b101ae20021d5b5 WHIRLPOOL b36136cc88e2f68d6ddb94ad500b449fb8ea9c0104b864d873ac7fd2966ac8ee44d7f4296ad96bcb65ae9f7858f1c6a9703f6d90754bd0dd1ad27db1b9fc1628
+DIST opensubdiv-3.3.0.tar.gz 19263469 SHA256 93d364340518515129fe199c80c4030f666ff71414d9c543e1526f14b5ffc8d0 SHA512 7c17d847187d46182d08fbee9396fd8793ac04591821084d40da475c9d25560d01575282946e1a30252bba12db9ea06cbf50ff649f91adce72f6127ad6a36418 WHIRLPOOL a1915d3fff1bce076f22bdc64efc0c07c372614d6ee0b36548bad9310da7a1c9a8863a3f638e07091cef28b99c01b6d77f0a9301415044806976674f434a7195

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
new file mode 100644
index 00000000000..2b5c71a37cb
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.3.0-fix-quotes.patch
@@ -0,0 +1,13 @@
+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.0-use-gnuinstalldirs.patch b/media-libs/opensubdiv/files/opensubdiv-3.3.0-use-gnuinstalldirs.patch
new file mode 100644
index 00000000000..02027763f5c
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.3.0-use-gnuinstalldirs.patch
@@ -0,0 +1,39 @@
+diff -purN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	2017-07-25 21:58:09.000000000 +0100
++++ b/CMakeLists.txt	2017-08-15 14:51:36.771044414 +0100
+@@ -23,6 +23,7 @@
+ #
+ 
+ project(OpenSubdiv)
++include(GNUInstallDirs)
+ 
+ cmake_minimum_required(VERSION 2.8.6)
+ 
+@@ -63,15 +64,15 @@ if (NOT DEFINED CMAKE_INSTALL_PREFIX)
+ endif()
+ 
+ if (NOT DEFINED CMAKE_INCDIR_BASE)
+-    set( CMAKE_INCDIR_BASE include/opensubdiv )
++    set( CMAKE_INCDIR_BASE ${CMAKE_INSTALL_INCLUDEDIR}/opensubdiv )
+ endif()
+ 
+ if (NOT DEFINED CMAKE_BINDIR_BASE)
+-    set( CMAKE_BINDIR_BASE bin )
++    set( CMAKE_BINDIR_BASE ${CMAKE_INSTALL_BINDIR} )
+ endif()
+ 
+ if (NOT DEFINED CMAKE_LIBDIR_BASE)
+-    set( CMAKE_LIBDIR_BASE lib )
++    set( CMAKE_LIBDIR_BASE ${CMAKE_INSTALL_LIBDIR} )
+ endif()
+ 
+ if (NOT DEFINED CMAKE_FRAMEWORKDIR_BASE)
+@@ -83,7 +84,7 @@ if (NOT DEFINED CMAKE_PLUGINDIR_BASE)
+ endif()
+ 
+ if (NOT DEFINED CMAKE_DOCDIR_BASE)
+-    set( CMAKE_DOCDIR_BASE share/doc/opensubdiv )
++    set( CMAKE_DOCDIR_BASE ${CMAKE_INSTALL_DOCDIR} )
+ else()
+     if (IS_ABSOLUTE ${CMAKE_DOCDIR_BASE})
+         set( CMAKE_DOCDIR_BASE "${CMAKE_DOCDIR_BASE}" )

diff --git a/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild
index c729c1d7990..d822c40cc99 100644
--- a/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild
+++ b/media-libs/opensubdiv/opensubdiv-3.1.0.ebuild
@@ -15,10 +15,8 @@ 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 )"
 

diff --git a/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild b/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild
index df840a1c275..0003926a6d4 100644
--- a/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild
+++ b/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild
@@ -15,10 +15,8 @@ LICENSE="ZLIB"
 SLOT="0"
 IUSE="cuda doc examples opencl openmp ptex tbb tutorials"
 
-# OpenCL does not work with Open Source drivers or nVidia binaries.
 RDEPEND="media-libs/glew:=
 	media-libs/glfw:=
-	opencl? ( x11-drivers/ati-drivers:* )
 	cuda? ( dev-util/nvidia-cuda-toolkit:* )
 	ptex? ( media-libs/ptex )"
 
@@ -38,6 +36,13 @@ 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

diff --git a/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild b/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
similarity index 81%
copy from media-libs/opensubdiv/opensubdiv-3.1.1.ebuild
copy to media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
index df840a1c275..b73f2a25deb 100644
--- a/media-libs/opensubdiv/opensubdiv-3.1.1.ebuild
+++ b/media-libs/opensubdiv/opensubdiv-3.3.0.ebuild
@@ -4,31 +4,34 @@
 EAPI=6
 inherit cmake-utils toolchain-funcs versionator
 
+MY_PV="$(replace_all_version_separators '_')"
 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"
+KEYWORDS="~amd64 ~x86"
 IUSE="cuda doc examples opencl openmp ptex tbb tutorials"
 
-# OpenCL does not work with Open Source drivers or nVidia binaries.
 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 )"
+	doc? ( 
+		dev-python/docutils
+		app-doc/doxygen
+	)"
 
-KEYWORDS="~amd64 ~x86"
+S="${WORKDIR}/OpenSubdiv-${MY_PV}"
 
-S="${WORKDIR}"/OpenSubdiv-${MY_PV}
+PATCHES=(
+	"${FILESDIR}/${P}-fix-quotes.patch"
+	"${FILESDIR}/${P}-use-gnuinstalldirs.patch"
+)
 
 pkg_pretend() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
@@ -48,11 +51,12 @@ src_configure() {
 		-DNO_OMP=$(usex !openmp)
 		-DNO_OPENCL=$(usex !opencl)
 		-DNO_CUDA=$(usex !cuda)
-		-DNO_REGRESSION=1 # The don't work with certain settings
+		-DNO_REGRESSION=1 # They don't work with certain settings
 		-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}"
 	)
 
 	cmake-utils_src_configure


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/files/, media-libs/opensubdiv/
@ 2021-11-22 14:11 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2021-11-22 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     fc0a2d9cd04c458e48543abea41bba7882913e93
Author:     Alexander Golubev <fatzer2 <AT> gmail <DOT> com>
AuthorDate: Sat Nov  6 23:14:33 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 14:10:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc0a2d9c

media-libs/opensubdiv: use cuda eclass

* Utilize cuda eclass and let it handle gcc selection instead of forcing
  an outdated version.
* Add a fix to provide sane defaults when compiling against a recent
  enough CUDA versions.
* Add an option to pass user-specified NVCCFLAGS and prevent cmake from
  overriding them.

Closes: https://bugs.gentoo.org/744517
Closes: https://bugs.gentoo.org/751382
Signed-off-by: Alexander Golubev <fatzer2 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22852
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...opensubdiv-3.4.4-add-CUDA11-compatibility.patch | 19 +++++
 media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild   | 93 ++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch b/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch
new file mode 100644
index 000000000000..8f5bfab43a92
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch
@@ -0,0 +1,19 @@
+From: "Alexander Golubev" <fatzer2@gmail.com>
+
+Set correct default minimal -arch for CUDA 9 and 11
+--- OpenSubdiv-3_4_4/CMakeLists.txt     2021-11-07 02:01:07.899484952 +0300
++++ OpenSubdiv-3_4_4/CMakeLists.txt.new 2021-11-07 02:01:23.402764409 +0300
+@@ -587,8 +587,12 @@
+         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 )
++            elseif (CUDA_VERSION_MAJOR LESS 11)
++                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_30 )
++            else()
++                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_35 )
+             endif()
+         endif()
+     endif()

diff --git a/media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild b/media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild
new file mode 100644
index 000000000000..e175e9f49681
--- /dev/null
+++ b/media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2021 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-2021.4.0:= )
+"
+
+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"
+)
+
+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
* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/files/, media-libs/opensubdiv/
@ 2022-03-20 17:01 David Seifert
  0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2022-03-20 17:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d6da82759343230f6dcb8a3e07c8e1faf06bde57
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 17:01:22 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 17:01:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6da8275

media-libs/opensubdiv: drop 3.4.3-r1, 3.4.4-r1, 3.4.4-r2

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-libs/opensubdiv/Manifest                     |  1 -
 .../opensubdiv-3.3.0-add-CUDA9-compatibility.patch | 25 ------
 ...ocumentation-CMakeLists.txt-force-python2.patch | 51 ------------
 media-libs/opensubdiv/opensubdiv-3.4.3-r1.ebuild   | 90 ---------------------
 media-libs/opensubdiv/opensubdiv-3.4.4-r1.ebuild   | 85 --------------------
 media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild   | 93 ----------------------
 6 files changed, 345 deletions(-)

diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest
index ab281bfc665a..7d76fbc02ece 100644
--- a/media-libs/opensubdiv/Manifest
+++ b/media-libs/opensubdiv/Manifest
@@ -1,2 +1 @@
-DIST opensubdiv-3.4.3.tar.gz 39225589 BLAKE2B adb3a3e786999029e5b71659425ed49ea1939a92e2d8ba39ae6abf25ec02c873b8b1bdd34d2e32f843911c7acf5e277a779f82621863fbe0641f772e7603beed SHA512 44fd1361d9e7f48c3fa84f3420ed34743571220602aefb082a42f769ca5b8e9ac21907ce8714f6e3a2caadd75adae03c535a1949a8e6450dfea9ae7a2247cfc2
 DIST opensubdiv-3.4.4.tar.gz 39228037 BLAKE2B 53bada3ff2652c6041a3becaf037b593c0e1e4c1bd57a285e6c068c11060b06f9ab0617284a57d0e8974f80082abd6563930ede8b1d6bfb801bfa61dd3256445 SHA512 fc8f28b79347015c8991150535c1339e695d96947c72fadd4fa27b546a0813c1125cd175ee03bed5aacdb3609f74c4e526ef70103d1195ba9f7df041e73ea9fb

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
deleted file mode 100644
index 9fe81c4ee199..000000000000
--- a/media-libs/opensubdiv/files/opensubdiv-3.3.0-add-CUDA9-compatibility.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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/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
deleted file mode 100644
index 5455ba98e317..000000000000
--- a/media-libs/opensubdiv/files/opensubdiv-3.4.0-0001-documentation-CMakeLists.txt-force-python2.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-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/opensubdiv-3.4.3-r1.ebuild b/media-libs/opensubdiv/opensubdiv-3.4.3-r1.ebuild
deleted file mode 100644
index f9593b44235b..000000000000
--- a/media-libs/opensubdiv/opensubdiv-3.4.3-r1.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2021 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 ~arm ~arm64 ~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-2021.4.0:= )
-"
-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.4.4-r1.ebuild b/media-libs/opensubdiv/opensubdiv-3.4.4-r1.ebuild
deleted file mode 100644
index fe2e02e7075d..000000000000
--- a/media-libs/opensubdiv/opensubdiv-3.4.4-r1.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake 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-2021.4.0:= )
-"
-BDEPEND="
-	cuda? ( <sys-devel/gcc-9[cxx] )
-"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-3.3.0-use-gnuinstalldirs.patch"
-	"${FILESDIR}/${PN}-3.3.0-add-CUDA9-compatibility.patch"
-	"${FILESDIR}/${PN}-3.4.3-install-tutorials-into-bin.patch"
-)
-
-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
-	# 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)
-	)
-
-	# Fails with building cuda kernels when using multiple jobs
-	export MAKEOPTS="-j1"
-
-	cmake_src_configure
-}

diff --git a/media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild b/media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild
deleted file mode 100644
index e175e9f49681..000000000000
--- a/media-libs/opensubdiv/opensubdiv-3.4.4-r2.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2021 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-2021.4.0:= )
-"
-
-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"
-)
-
-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
* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/files/, media-libs/opensubdiv/
@ 2023-04-07 12:50 Miroslav Šulc
  0 siblings, 0 replies; 6+ messages in thread
From: Miroslav Šulc @ 2023-04-07 12:50 UTC (permalink / raw
  To: gentoo-commits

commit:     e9ae2ede7ce7d131fb64c1ccf2805c1bbdae5a91
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  7 12:46:19 2023 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Fri Apr  7 12:50:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9ae2ede

media-libs/opensubdiv: bump to 3.5.0, added support for cuda 12 to 3.4.4 & 3.5.0 + scrubbed patches

Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 media-libs/opensubdiv/Manifest                     |  1 +
 .../opensubdiv-3.3.0-use-gnuinstalldirs.patch      |  5 +-
 ...ensubdiv-3.4.3-install-tutorials-into-bin.patch | 25 +++---
 ...opensubdiv-3.4.4-add-CUDA11-compatibility.patch | 13 ++-
 .../files/opensubdiv-3.4.4-tbb-2021.patch          | 12 ---
 media-libs/opensubdiv/opensubdiv-3.5.0.ebuild      | 94 ++++++++++++++++++++++
 6 files changed, 113 insertions(+), 37 deletions(-)

diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest
index 7d76fbc02ece..f158e1b146bd 100644
--- a/media-libs/opensubdiv/Manifest
+++ b/media-libs/opensubdiv/Manifest
@@ -1 +1,2 @@
 DIST opensubdiv-3.4.4.tar.gz 39228037 BLAKE2B 53bada3ff2652c6041a3becaf037b593c0e1e4c1bd57a285e6c068c11060b06f9ab0617284a57d0e8974f80082abd6563930ede8b1d6bfb801bfa61dd3256445 SHA512 fc8f28b79347015c8991150535c1339e695d96947c72fadd4fa27b546a0813c1125cd175ee03bed5aacdb3609f74c4e526ef70103d1195ba9f7df041e73ea9fb
+DIST opensubdiv-3.5.0.tar.gz 40740801 BLAKE2B 08ad5cdc4b38b9862e62a8871fa1ed9ee5d9ff3b617c1f5627c2b773804d207028e29517d3e7015c8712b5f8ac378f3e35811de2c67711ff4a320d00bd6ce1a7 SHA512 7ede8f3f335a6306486d649199117401ab4285d360a3b53a536f25046d94741b5e7eacbc06a55d8a0bd5798c810c1b3cfd7964859f04f95363ad26411310b320

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.3.0-use-gnuinstalldirs.patch b/media-libs/opensubdiv/files/opensubdiv-3.3.0-use-gnuinstalldirs.patch
index 02027763f5ca..024d2f7138f0 100644
--- a/media-libs/opensubdiv/files/opensubdiv-3.3.0-use-gnuinstalldirs.patch
+++ b/media-libs/opensubdiv/files/opensubdiv-3.3.0-use-gnuinstalldirs.patch
@@ -1,6 +1,5 @@
-diff -purN a/CMakeLists.txt b/CMakeLists.txt
---- a/CMakeLists.txt	2017-07-25 21:58:09.000000000 +0100
-+++ b/CMakeLists.txt	2017-08-15 14:51:36.771044414 +0100
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -23,6 +23,7 @@
  #
  

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
index f042967a01af..ff7b7b6563f5 100644
--- 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
@@ -1,6 +1,5 @@
-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
+--- a/tutorials/far/CMakeLists.txt
++++ b/tutorials/far/CMakeLists.txt
 @@ -30,7 +30,7 @@
          $<TARGET_OBJECTS:far_obj>
       )
@@ -10,9 +9,8 @@ diff -Naur a/tutorials/far/CMakeLists.txt b/tutorials/far/CMakeLists.txt
  
  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
+--- a/tutorials/hbr/tutorial_0/CMakeLists.txt
++++ b/tutorials/hbr/tutorial_0/CMakeLists.txt
 @@ -30,5 +30,5 @@
      ${SOURCE_FILES}
  )
@@ -20,9 +18,8 @@ diff -Naur a/tutorials/hbr/tutorial_0/CMakeLists.txt b/tutorials/hbr/tutorial_0/
 -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
+--- a/tutorials/hbr/tutorial_1/CMakeLists.txt
++++ b/tutorials/hbr/tutorial_1/CMakeLists.txt
 @@ -30,5 +30,5 @@
      ${SOURCE_FILES}
  )
@@ -30,9 +27,8 @@ diff -Naur a/tutorials/hbr/tutorial_1/CMakeLists.txt b/tutorials/hbr/tutorial_1/
 -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
+--- a/tutorials/hbr/tutorial_2/CMakeLists.txt
++++ b/tutorials/hbr/tutorial_2/CMakeLists.txt
 @@ -30,5 +30,5 @@
      ${SOURCE_FILES}
  )
@@ -40,9 +36,8 @@ diff -Naur a/tutorials/hbr/tutorial_2/CMakeLists.txt b/tutorials/hbr/tutorial_2/
 -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
+--- a/tutorials/osd/tutorial_0/CMakeLists.txt
++++ b/tutorials/osd/tutorial_0/CMakeLists.txt
 @@ -35,5 +35,5 @@
      osd_static_cpu
  )

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch b/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch
index 8f5bfab43a92..c1cf2981e2ea 100644
--- a/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch
+++ b/media-libs/opensubdiv/files/opensubdiv-3.4.4-add-CUDA11-compatibility.patch
@@ -1,9 +1,6 @@
-From: "Alexander Golubev" <fatzer2@gmail.com>
-
-Set correct default minimal -arch for CUDA 9 and 11
---- OpenSubdiv-3_4_4/CMakeLists.txt     2021-11-07 02:01:07.899484952 +0300
-+++ OpenSubdiv-3_4_4/CMakeLists.txt.new 2021-11-07 02:01:23.402764409 +0300
-@@ -587,8 +587,12 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -590,8 +590,14 @@ 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 )
@@ -12,8 +9,10 @@ Set correct default minimal -arch for CUDA 9 and 11
                  set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_20 )
 +            elseif (CUDA_VERSION_MAJOR LESS 11)
 +                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_30 )
-+            else()
++            elseif (CUDA_VERSION_MAJOR LESS 12)
 +                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_35 )
++            else()
++                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_50 )
              endif()
          endif()
      endif()

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
index bae9c4a9d1f1..e14780ec139c 100644
--- a/media-libs/opensubdiv/files/opensubdiv-3.4.4-tbb-2021.patch
+++ b/media-libs/opensubdiv/files/opensubdiv-3.4.4-tbb-2021.patch
@@ -6,12 +6,6 @@ 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 {
@@ -29,12 +23,6 @@ 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 @@

diff --git a/media-libs/opensubdiv/opensubdiv-3.5.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.5.0.ebuild
new file mode 100644
index 000000000000..2c8da240d86e
--- /dev/null
+++ b/media-libs/opensubdiv/opensubdiv-3.5.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2023 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}/${PN}-3.4.4-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
* [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/files/, media-libs/opensubdiv/
@ 2024-02-14  9:29 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2024-02-14  9:29 UTC (permalink / raw
  To: gentoo-commits

commit:     5b9cb4db94d5520e018a1a99d38d444c9c95d159
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sun Jan 21 18:01:51 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Feb 14 09:26:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b9cb4db

media-libs/opensubdiv: 3.6.0 update

Removed all automagic dependencies.

Changed CUDA interaction as a test-case for better binpkg support.
  - We adhere to CUDAARCHS or NVCCFLAGS.
  - For `MERGE_TYPE=source` we fall back to native.
  - For `MERGE_TYPE=buildonly` we fall back to all-major.
  - Removed clunky OSD_CUDA_NVCC_FLAGS which defaulted to ancient ARCHS.

Replace src_install logic that removed extra files in favour of never installing them via src_prepare.

Closes: https://bugs.gentoo.org/922952
Closes: https://bugs.gentoo.org/922950
Closes: https://bugs.gentoo.org/904070
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35029
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/opensubdiv-3.6.0-cudaflags.patch         |  20 ++
 .../opensubdiv-3.6.0-use-gnuinstalldirs.patch      |  38 ++++
 media-libs/opensubdiv/metadata.xml                 |   9 +
 media-libs/opensubdiv/opensubdiv-3.6.0.ebuild      | 222 +++++++++++++++------
 4 files changed, 232 insertions(+), 57 deletions(-)

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.6.0-cudaflags.patch b/media-libs/opensubdiv/files/opensubdiv-3.6.0-cudaflags.patch
new file mode 100644
index 000000000000..0202c47d13a4
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.6.0-cudaflags.patch
@@ -0,0 +1,20 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -595,7 +595,7 @@ if(CUDA_FOUND)
+     )
+     set(OSD_GPU TRUE)
+ 
+-    if (UNIX)
++    if (FALSE)
+         list( APPEND CUDA_NVCC_FLAGS -Xcompiler -fPIC )
+         # Use OSD_CUDA_NVCC_FLAGS to specify --gpu-architecture or other CUDA
+         # compilation options. The overrides here are only for compatibility
+@@ -609,7 +609,7 @@ if(CUDA_FOUND)
+         endif()
+     endif()
+ 
+-    if (DEFINED OSD_CUDA_NVCC_FLAGS)
++    if (FALSE)
+         list( APPEND CUDA_NVCC_FLAGS ${OSD_CUDA_NVCC_FLAGS})
+     endif()
+ 

diff --git a/media-libs/opensubdiv/files/opensubdiv-3.6.0-use-gnuinstalldirs.patch b/media-libs/opensubdiv/files/opensubdiv-3.6.0-use-gnuinstalldirs.patch
new file mode 100644
index 000000000000..5beb5bc49664
--- /dev/null
+++ b/media-libs/opensubdiv/files/opensubdiv-3.6.0-use-gnuinstalldirs.patch
@@ -0,0 +1,38 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,6 +25,7 @@
+ cmake_minimum_required(VERSION 3.12)
+ 
+ project(OpenSubdiv)
++include(GNUInstallDirs)
+ 
+ # Set C++ standard requirements, allowing overrides
+ if (NOT DEFINED CMAKE_CXX_STANDARD)
+@@ -81,15 +82,15 @@ if (NOT DEFINED CMAKE_INSTALL_PREFIX)
+ endif()
+ 
+ if (NOT DEFINED CMAKE_INCDIR_BASE)
+-    set( CMAKE_INCDIR_BASE include/opensubdiv )
++    set( CMAKE_INCDIR_BASE ${CMAKE_INSTALL_INCLUDEDIR}/opensubdiv )
+ endif()
+ 
+ if (NOT DEFINED CMAKE_BINDIR_BASE)
+-    set( CMAKE_BINDIR_BASE bin )
++    set( CMAKE_BINDIR_BASE ${CMAKE_INSTALL_BINDIR} )
+ endif()
+ 
+ if (NOT DEFINED CMAKE_LIBDIR_BASE)
+-    set( CMAKE_LIBDIR_BASE lib )
++    set( CMAKE_LIBDIR_BASE ${CMAKE_INSTALL_LIBDIR} )
+ endif()
+ 
+ if (NOT DEFINED CMAKE_FRAMEWORKDIR_BASE)
+@@ -101,7 +102,7 @@ if (NOT DEFINED CMAKE_PLUGINDIR_BASE)
+ endif()
+ 
+ if (NOT DEFINED CMAKE_DOCDIR_BASE)
+-    set( CMAKE_DOCDIR_BASE share/doc/opensubdiv )
++    set( CMAKE_DOCDIR_BASE ${CMAKE_INSTALL_DOCDIR} )
+ else()
+     if (IS_ABSOLUTE ${CMAKE_DOCDIR_BASE})
+         set( CMAKE_DOCDIR_BASE "${CMAKE_DOCDIR_BASE}" )

diff --git a/media-libs/opensubdiv/metadata.xml b/media-libs/opensubdiv/metadata.xml
index f88292b52159..261fb3ca34b8 100644
--- a/media-libs/opensubdiv/metadata.xml
+++ b/media-libs/opensubdiv/metadata.xml
@@ -10,10 +10,19 @@
 		<name>Proxy Maintainers</name>
 	</maintainer>
 	<use>
+		<flag name="glew">
+			Enable support for OpenGL Extension Wrangler Library (<pkg>media-libs/glew</pkg>)
+		</flag>
+		<flag name="glfw">
+			Enable support for OpenGL FrameWork (<pkg>media-libs/glfw</pkg>)
+		</flag>
 		<flag name="ptex">
 			Adds support for faster per-face texture mapping through
 			<pkg>media-libs/ptex</pkg>
 		</flag>
+		<flag name="python">
+			Use <pkg>dev-lang/python</pkg> to process source and documentation source files
+			</flag>
 		<flag name="tbb">
 			Enable multithreading with the Intel Threads Building Blocks through
 			<pkg>dev-cpp/tbb</pkg>

diff --git a/media-libs/opensubdiv/opensubdiv-3.6.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.6.0.ebuild
index 571914ada18c..b5155b620bee 100644
--- a/media-libs/opensubdiv/opensubdiv-3.6.0.ebuild
+++ b/media-libs/opensubdiv/opensubdiv-3.6.0.ebuild
@@ -3,7 +3,9 @@
 
 EAPI=8
 
-inherit cmake cuda toolchain-funcs
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake cuda flag-o-matic python-any-r1 toolchain-funcs virtualx
 
 MY_PV="$(ver_rs "1-3" '_')"
 
@@ -17,28 +19,58 @@ S="${WORKDIR}/OpenSubdiv-${MY_PV}"
 LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-IUSE="cuda examples opencl openmp ptex tbb test tutorials"
+IUSE="X cuda doc examples +glew +glfw opencl +opengl openmp ptex python tbb test tutorials"
 RESTRICT="!test? ( test )"
 
+# TODO needed for stringify due to unwrapped KERNEL_FILES in opensubdiv/{far,osd}/CMakeLists.txt
+REQUIRED_USE="
+	|| ( opencl opengl )
+"
+
+BDEPEND="
+	doc? (
+		app-text/doxygen
+		dev-python/docutils
+	)
+	python? ( ${PYTHON_DEPS} )
+"
+
 RDEPEND="
-	examples? (
-		media-libs/glew:=
-		media-libs/glfw:=
-		x11-libs/libXinerama
+	opengl? (
+		media-libs/libglvnd
+		glew? (
+			media-libs/glew:=
+		)
+		glfw? (
+			media-libs/glfw:=
+			X? (
+				x11-libs/libX11
+				x11-libs/libXcursor
+				x11-libs/libXi
+				x11-libs/libXinerama
+				x11-libs/libXrandr
+				x11-libs/libXxf86vm
+			)
+		)
 	)
-	cuda? ( dev-util/nvidia-cuda-toolkit:* )
 	opencl? ( virtual/opencl )
+	openmp? ( || (
+		sys-devel/gcc:*[openmp]
+		sys-libs/libomp
+	) )
 	ptex? ( media-libs/ptex )
+	tbb? ( dev-cpp/tbb:= )
 "
+
+# CUDA_RUNTIME is statically linked
 DEPEND="
 	${RDEPEND}
-	tbb? ( dev-cpp/tbb:= )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 "
 
 PATCHES=(
-	"${FILESDIR}/${PN}-3.3.0-use-gnuinstalldirs.patch"
-	"${FILESDIR}/${PN}-3.4.3-install-tutorials-into-bin.patch"
-	# "${FILESDIR}/${PN}-3.4.4-tbb-2021.patch"
+	"${FILESDIR}/${PN}-3.6.0-use-gnuinstalldirs.patch"
+	"${FILESDIR}/${PN}-3.6.0-cudaflags.patch"
 )
 
 pkg_pretend() {
@@ -47,47 +79,124 @@ pkg_pretend() {
 
 pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	if use cuda; then
+		# When building binary packages we build all major targets unless specified otherwise
+		if [[ -z "${CUDAARCHS+x}" ]]; then
+			case ${MERGE_TYPE} in
+				source)    CUDAARCHS="native" ;;
+				# buildonly) CUDAARCHS="all" ;;
+				buildonly) CUDAARCHS="all-major" ;;
+			esac
+		fi
+
+		# check if user provided --gpu-architecture/-arch flag instead of CUDAARCHS
+		for f in ${NVCCFLAGS}; do
+			if [[ ${f} == -arch* || ${f} == --gpu-architecture* ]]; then
+				CUDAARCHS="NVCC"
+				break
+			fi
+		done
+
+		if [[ "${CUDAARCHS}" == "NVCC" ]]; then
+			unset  CUDAARCHS
+		else
+			export CUDAARCHS
+		fi
+	fi
 }
 
 src_prepare() {
 	cmake_src_prepare
 
+	sed \
+		-e "/install(/s/^/#DONOTINSTALL /g" \
+		-i \
+			regression/*/CMakeLists.txt \
+			tools/stringify/CMakeLists.txt \
+		|| die
+
+	sed \
+		-e "/install( TARGETS osd_static_[cg]pu/s/^/#DONOTINSTALL /g" \
+		-i \
+			opensubdiv/CMakeLists.txt \
+		|| die
+
 	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)
+		-DCMAKE_INSTALL_BINDIR="share/${PN}/bin"
+
+		# DirectX
+		-DNO_DX="yes"
+
+		# MacOS
+		-DNO_MACOS_FRAMEWORK="yes"
+		-DNO_METAL="yes"
+
+		-DNO_DOC="$(usex !doc)"
+		-DNO_EXAMPLES="$(usex !examples)"
+		-DNO_TUTORIALS="$(usex !tutorials)"
+		-DNO_REGRESSION="$(usex !test)"
+		-DNO_TESTS="$(usex !test)"
+
+		-DNO_PTEX="$(usex !ptex)"
+
+		# GUI
+		-DNO_OPENGL="$(usex !opengl)"
+
+		# Backends
+		-DNO_CUDA="$(usex !cuda)"
+		-DNO_OMP="$(usex !openmp)"
+		-DNO_TBB="$(usex !tbb)"
+		-DNO_OPENCL="$(usex !opencl)"
 	)
 
 	if use cuda; then
-		# old cmake CUDA module doesn't use environment variable to initialize flags
-		mycmakeargs+=( -DCUDA_NVCC_FLAGS="${NVCCFLAGS}" )
+		# The old cmake CUDA module doesn't use environment variable to initialize flags
+		mycmakeargs+=(
+			-DCUDA_NVCC_FLAGS="-forward-unknown-opts ${NVCCFLAGS}"
+		)
+	fi
 
-		# 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
+	if use opencl; then
+		mycmakeargs+=(
+			# not packaged https://github.com/martijnberger/clew
+			-DNO_CLEW="yes"
+		)
+	fi
+
+	if use opengl; then
+		mycmakeargs+=(
+			-DNO_GLTESTS="$(usex !test)"
+			-DNO_GLEW="$(usex !glew)"
+			-DNO_GLFW="$(usex !glfw)"
+		)
+		if use glew; then
+			mycmakeargs+=(
+				-DGLEW_LOCATION="${ESYSROOT}/usr/$(get_libdir)"
+			)
+		fi
+		if use glfw; then
+			mycmakeargs+=(
+				-DGLFW_LOCATION="${ESYSROOT}/usr/$(get_libdir)"
+				-DNO_GLFW_X11="$(usex !X)"
+			)
+		fi
+	fi
+
+	if use ptex; then
+		mycmakeargs+=(
+			-DPTEX_LOCATION="${ESYSROOT}/usr/$(get_libdir)"
+		)
+	fi
+
+	if ! use python; then
+		mycmakeargs+=(
+			-DCMAKE_DISABLE_FIND_PACKAGE_Python="yes"
+		)
 	fi
 
 	cmake_src_configure
@@ -95,27 +204,26 @@ src_configure() {
 
 src_test() {
 	CMAKE_SKIP_TESTS=(
-		"far_tutorial_1_2"
+		# Fails due to for CL & CUDA kernels, works outside
+		"glImaging"
 	)
 
-	cmake_src_test
-}
+	# "far_tutorial_1_2 breaks with gcc and > -O1"
+	tc-is-gcc && is-flagq '-O@(2|3|fast)' && CMAKE_SKIP_TESTS+=( "far_tutorial_1_2" )
 
-src_install() {
-	cmake_src_install
+	use cuda && cuda_add_sandbox -w
 
-	rm -f "${ED}/usr/$(get_libdir)/libosdCPU.a" || die
-	if use cuda || use opencl ; then
-		rm -f "${ED}/usr/$(get_libdir)/libosdGPU.a" || die
-	fi
-	if use test; then
-		rm -f \
-			"${ED}/usr/bin/bfr_evaluate" \
-			"${ED}/usr/bin/far_perf" \
-			"${ED}/usr/bin/far_regression" \
-			"${ED}/usr/bin/hbr_baseline" \
-			"${ED}/usr/bin/hbr_regression" \
-			"${ED}/usr/bin/osd_regression" \
-			|| die
-	fi
+	virtx cmake_src_test
+
+	local KERNELS=( CPU )
+	use openmp && KERNELS+=( OPENMP )
+	use tbb && KERNELS+=( TBB )
+
+	# use cuda && KERNELS+=( CUDA )
+	# use opencl && KERNELS+=( CL )
+
+	use opengl && use X && KERNELS+=( XFB )
+	use opengl && KERNELS+=( GLSL )
+
+	virtx "${BUILD_DIR}/bin/glImaging" -w test -l 3 -s 256 256 -a -k "$(IFS=","; echo "${KERNELS[*]}")"
 }


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

end of thread, other threads:[~2024-02-14  9:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-22 23:26 [gentoo-commits] repo/gentoo:master commit in: media-libs/opensubdiv/files/, media-libs/opensubdiv/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2017-09-23  8:38 David Seifert
2021-11-22 14:11 Joonas Niilola
2022-03-20 17:01 David Seifert
2023-04-07 12:50 Miroslav Šulc
2024-02-14  9:29 Joonas Niilola

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