diff options
Diffstat (limited to 'graphics/OpenSubdiv')
-rw-r--r-- | graphics/OpenSubdiv/CUDA-compatibility.patch | 18 | ||||
-rw-r--r-- | graphics/OpenSubdiv/OpenSubdiv.SlackBuild | 19 | ||||
-rw-r--r-- | graphics/OpenSubdiv/OpenSubdiv.info | 6 | ||||
-rw-r--r-- | graphics/OpenSubdiv/README | 12 |
4 files changed, 47 insertions, 8 deletions
diff --git a/graphics/OpenSubdiv/CUDA-compatibility.patch b/graphics/OpenSubdiv/CUDA-compatibility.patch new file mode 100644 index 0000000000..2db18f6413 --- /dev/null +++ b/graphics/OpenSubdiv/CUDA-compatibility.patch @@ -0,0 +1,18 @@ +--- CMakeLists.txt.orig 2023-08-29 11:13:57.755000000 +1000 ++++ CMakeLists.txt 2023-08-29 11:19:42.759000000 +1000 +@@ -605,8 +605,14 @@ + if (NOT DEFINED OSD_CUDA_NVCC_FLAGS) + if (CUDA_VERSION_MAJOR LESS 6) + set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_11 ) +- elseif (CUDA_VERSION_MAJOR LESS 8) ++ 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 ) ++ 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/graphics/OpenSubdiv/OpenSubdiv.SlackBuild b/graphics/OpenSubdiv/OpenSubdiv.SlackBuild index e0cb77c13b..c5d6c08cbd 100644 --- a/graphics/OpenSubdiv/OpenSubdiv.SlackBuild +++ b/graphics/OpenSubdiv/OpenSubdiv.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for Opensubdiv # Copyright 2019 J. "MUFTI" Scheurich Stuttgart/Germany -# Copyright 2021 Christoph Willing Brisbane/Australia +# Copyright 2021-2023 Christoph Willing Brisbane/Australia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -30,9 +30,9 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=OpenSubdiv -VERSION=${VERSION:-3.4.4} +VERSION=${VERSION:-3.6.0} SRCVER=$(echo $VERSION | tr . _) -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -74,6 +74,13 @@ cd $TMP rm -rf $PRGNAM-$SRCVER tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz cd $PRGNAM-$SRCVER +sed -i -e '/${OPENGL_gl_LIBRARY}/a${OPENGL_glx_LIBRARY}' CMakeLists.txt +patch -p0 < $CWD/CUDA-compatibility.patch +#if test -e /usr/include/tbb ; then cp $CWD/FindTBB.cmake cmake/ ; fi + +# Silence CL_TARGET_OPENCL_VERSION pragmas +sed -i -e '/opencl.h/i#define CL_TARGET_OPENCL_VERSION 300' opensubdiv/osd/opencl.h + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -81,6 +88,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ +cuda="-DNO_CUDA=ON"; +[ "${ENABLE_CUDA:-no}" = "yes" ] && cuda="" + mkdir -p build cd build cmake \ @@ -89,6 +99,9 @@ cd build -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_LIBDIR_BASE=lib${LIBDIRSUFFIX} \ -DCMAKE_DOCDIR_BASE=doc/$PRGNAM-$VERSION \ + -DNO_CLEW=ON \ + -DNO_EXAMPLES=ON \ + $cuda \ -DCMAKE_BUILD_TYPE=Release .. make diff --git a/graphics/OpenSubdiv/OpenSubdiv.info b/graphics/OpenSubdiv/OpenSubdiv.info index 80af2f00f3..da54c3d828 100644 --- a/graphics/OpenSubdiv/OpenSubdiv.info +++ b/graphics/OpenSubdiv/OpenSubdiv.info @@ -1,8 +1,8 @@ PRGNAM="OpenSubdiv" -VERSION="3.4.4" +VERSION="3.6.0" HOMEPAGE="http://graphics.pixar.com/opensubdiv" -DOWNLOAD="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_4_4/OpenSubdiv-3_4_4.tar.gz" -MD5SUM="39ecc5caf0abebc943d1ce131855e76e" +DOWNLOAD="https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_6_0/OpenSubdiv-3_6_0.tar.gz" +MD5SUM="cd03aaf8890bc0b8550eef62029cabe7" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/graphics/OpenSubdiv/README b/graphics/OpenSubdiv/README index 18aa13c063..3e64c556ac 100644 --- a/graphics/OpenSubdiv/README +++ b/graphics/OpenSubdiv/README @@ -5,5 +5,13 @@ for drawing deforming surfaces with static topology at interactive framerates. Additional utility is available in OpenSubdiv when the following SBo -packages are installed and detected at build time: tbb cudatoolkit -glfw +packages are installed and detected at build time: + tbb glfw3 ptex + +Some graphics cards are not supported with the existing version of +the cudatoolkit at SBo. Therefore CUDA backend support is not enabled +by default in this SlackBuild. It must be explicitly enabled (as well +as cudatoolkit being installed) to use it in the build e.g. + ENABLE_CUDA=yes bash OpenSubdiv.SlackBuild +N.B. Building with CUDA is currently unsupported (broken) - don't use! + |