diff options
author | 2023-04-07 14:46:19 +0200 | |
---|---|---|
committer | 2023-04-07 14:50:38 +0200 | |
commit | e9ae2ede7ce7d131fb64c1ccf2805c1bbdae5a91 (patch) | |
tree | 4af8a16efb98ae47d0da1ed1e7b399759b29013a /media-libs/opensubdiv | |
parent | net-mail/isync: add blocker on sci-chemistry/mdtraj (diff) | |
download | gentoo-e9ae2ede7ce7d131fb64c1ccf2805c1bbdae5a91.tar.gz gentoo-e9ae2ede7ce7d131fb64c1ccf2805c1bbdae5a91.tar.bz2 gentoo-e9ae2ede7ce7d131fb64c1ccf2805c1bbdae5a91.zip |
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@gentoo.org>
Diffstat (limited to 'media-libs/opensubdiv')
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 +} |