diff options
author | 2023-12-08 15:19:10 +0100 | |
---|---|---|
committer | 2024-01-20 12:29:43 +0000 | |
commit | c645a8f22e320746e5111d59a500fe37acdd9179 (patch) | |
tree | 60e967ad0d21bdfac4a309a03f7896bb333c2f12 /media-libs/opensubdiv | |
parent | dev-perl/Alien-LibGumbo: subscribe to gumbo subslot (diff) | |
download | gentoo-c645a8f22e320746e5111d59a500fe37acdd9179.tar.gz gentoo-c645a8f22e320746e5111d59a500fe37acdd9179.tar.bz2 gentoo-c645a8f22e320746e5111d59a500fe37acdd9179.zip |
media-libs/opensubdiv: add 3.5.1, 3.6.0
Closes: https://bugs.gentoo.org/903982
Closes: https://bugs.gentoo.org/891301
Closes: https://bugs.gentoo.org/884463
Closes: https://bugs.gentoo.org/835589
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34546
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/opensubdiv')
-rw-r--r-- | media-libs/opensubdiv/Manifest | 2 | ||||
-rw-r--r-- | media-libs/opensubdiv/opensubdiv-3.5.1.ebuild | 121 | ||||
-rw-r--r-- | media-libs/opensubdiv/opensubdiv-3.6.0.ebuild | 121 |
3 files changed, 244 insertions, 0 deletions
diff --git a/media-libs/opensubdiv/Manifest b/media-libs/opensubdiv/Manifest index f158e1b146bd..819ea2eabdac 100644 --- a/media-libs/opensubdiv/Manifest +++ b/media-libs/opensubdiv/Manifest @@ -1,2 +1,4 @@ DIST opensubdiv-3.4.4.tar.gz 39228037 BLAKE2B 53bada3ff2652c6041a3becaf037b593c0e1e4c1bd57a285e6c068c11060b06f9ab0617284a57d0e8974f80082abd6563930ede8b1d6bfb801bfa61dd3256445 SHA512 fc8f28b79347015c8991150535c1339e695d96947c72fadd4fa27b546a0813c1125cd175ee03bed5aacdb3609f74c4e526ef70103d1195ba9f7df041e73ea9fb DIST opensubdiv-3.5.0.tar.gz 40740801 BLAKE2B 08ad5cdc4b38b9862e62a8871fa1ed9ee5d9ff3b617c1f5627c2b773804d207028e29517d3e7015c8712b5f8ac378f3e35811de2c67711ff4a320d00bd6ce1a7 SHA512 7ede8f3f335a6306486d649199117401ab4285d360a3b53a536f25046d94741b5e7eacbc06a55d8a0bd5798c810c1b3cfd7964859f04f95363ad26411310b320 +DIST opensubdiv-3.5.1.tar.gz 40743642 BLAKE2B 2e4cf93c38daccc383c9af0c8602e28920be92427ee3aa0eca58d698ce3768fd5a6b030a8942f128500b608ad97e95a8c2e675f4660ae373b3bf5f99084360ab SHA512 ac028a10de9ebe907f573d2a2c7f30cea8ffefbe8c4859035d1782d27128051f8753dba16f9478a0f4e8f1d03ddddcf12cece98031e19cabf24f98c0bda9058d +DIST opensubdiv-3.6.0.tar.gz 40746688 BLAKE2B 23f92fa028ae32b430350998299dab3fbb87b8530755abd435ce059223998a8f3d48de17c746028362fd1d2eee33e8a4c7a55b8cf4083202cfd0b6d27de008c7 SHA512 a976733a26e2c0f6510f59d4372b1b33f5404a9d536bcbd6ae3a1a0ffd1bba5495df7108bebc854d5c069575772c97c0d00f0f16f79e87611376ba84e9ae7a4b diff --git a/media-libs/opensubdiv/opensubdiv-3.5.1.ebuild b/media-libs/opensubdiv/opensubdiv-3.5.1.ebuild new file mode 100644 index 000000000000..8ddbb2e65dac --- /dev/null +++ b/media-libs/opensubdiv/opensubdiv-3.5.1.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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=" + examples? ( + 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-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 +} + +src_test() { + CMAKE_SKIP_TESTS=( + "far_tutorial_1_2" + ) + + cmake_src_test +} + +src_install() { + cmake_src_install + + rm -f "${ED}/usr/lib64/libosdCPU.a" || die + if use cuda || use opencl ; then + rm -f "${ED}/usr/lib64/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 +} diff --git a/media-libs/opensubdiv/opensubdiv-3.6.0.ebuild b/media-libs/opensubdiv/opensubdiv-3.6.0.ebuild new file mode 100644 index 000000000000..8670a76affd4 --- /dev/null +++ b/media-libs/opensubdiv/opensubdiv-3.6.0.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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=" + examples? ( + 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-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 +} + +src_test() { + CMAKE_SKIP_TESTS=( + "far_tutorial_1_2" + ) + + cmake_src_test +} + +src_install() { + cmake_src_install + + rm -f "${ED}/usr/lib64/libosdCPU.a" || die + if use cuda || use opencl ; then + rm -f "${ED}/usr/lib64/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 +} |