diff options
author | Sam James <sam@gentoo.org> | 2022-02-12 03:45:23 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-02-12 03:55:36 +0000 |
commit | 2fc41152ac338bc847b0878ab276d3512ebf346f (patch) | |
tree | 98c633f010e4e00907770278ecdce1e17fc26cfb /media-libs/osl | |
parent | media-libs/osl: drop 1.12.0.2 (diff) | |
download | gentoo-2fc41152ac338bc847b0878ab276d3512ebf346f.tar.gz gentoo-2fc41152ac338bc847b0878ab276d3512ebf346f.tar.bz2 gentoo-2fc41152ac338bc847b0878ab276d3512ebf346f.zip |
media-libs/osl: add 1.12.4.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/osl')
-rw-r--r-- | media-libs/osl/Manifest | 1 | ||||
-rw-r--r-- | media-libs/osl/files/osl-1.12.4.1-openexr-3-imath.patch | 126 | ||||
-rw-r--r-- | media-libs/osl/osl-1.12.4.1.ebuild | 103 |
3 files changed, 230 insertions, 0 deletions
diff --git a/media-libs/osl/Manifest b/media-libs/osl/Manifest index 1c6d13087eb8..f3343cf6bdd1 100644 --- a/media-libs/osl/Manifest +++ b/media-libs/osl/Manifest @@ -1,3 +1,4 @@ DIST osl-1.11.15.0.tar.gz 14143372 BLAKE2B 7385d86417fd2666d7558eb459402a9720fc4b59287c2feb45c451bd1e413d102f3f286e6bc07bbeb320b9f5a96b4981851dddcf3a6eaa69d5869238811978a8 SHA512 d1df69349cb43690d0578b32caf92fe33ff570713fd87899e2ab312962c6474bd9c19df5b3b018a7498390e5933fcfbfdd3ecd450a4d91d64dd680ee74f492c5 DIST osl-1.11.16.0.tar.gz 14143407 BLAKE2B 0e6a20ee63a836bc268f03eb943731e8bf18909bf86041532de50e51ff9fb78f9be316be9b3677cb2b0e5fddd90defab95281e6597a52e61d982ffc9fcc52f79 SHA512 717a588bb371ff64d41dc34caad6a4e8483cba32d3b8fe7db9f98e422be050b1b89e4cf7f018e1106dfc9120d2485c3d8430a63cd80344050b00082fdd45fa1b DIST osl-1.12.0.2.tar.gz 16205315 BLAKE2B 543d120e981f093c121b4abb4c36d7d8c127555c8986df931a3040136e3ae3d84d602d73395604cd492f8d192e408f585cd6579fe6283c974778f0b99092985d SHA512 cdcd1fb348f6f2f1f889ed1895bac545e10b73e700959bc09b1df2a40cd86e69ba43a1dfaf26dedaec9c23aa17b74428d4bccc9cf7f4d27ae2fc5152adb6c010 +DIST osl-1.12.4.1.tar.gz 17716100 BLAKE2B eddd614ad4631446ff9de5e6c11cb8c19f9226b3306dca39a37827b4a03f7dc034b321ea3cce75e33dbe93dbb2d7dd09a0bf5ba222a693ad7acb6d96c529d2d9 SHA512 eaee1b539fa10ec6703db19acf0cd91cffcd44f4ce9aff3d4e00abd3ba7d8cd3557b37c57c902d435181bc983623828a06a778377b09f40ccac2e430addce4d4 diff --git a/media-libs/osl/files/osl-1.12.4.1-openexr-3-imath.patch b/media-libs/osl/files/osl-1.12.4.1-openexr-3-imath.patch new file mode 100644 index 000000000000..ffee5d8a543d --- /dev/null +++ b/media-libs/osl/files/osl-1.12.4.1-openexr-3-imath.patch @@ -0,0 +1,126 @@ +diff --git a/src/include/OSL/oslconfig.h.in b/src/include/OSL/oslconfig.h.in +index 29abe88..b9de57c 100644 +--- a/src/include/OSL/oslconfig.h.in ++++ b/src/include/OSL/oslconfig.h.in +@@ -12,9 +12,9 @@ + // All the things we need from Imath. + #define OSL_USING_IMATH @OSL_USING_IMATH@ + #if OSL_USING_IMATH >= 3 +-# include <Imath/ImathVec.h> +-# include <Imath/ImathMatrix.h> +-# include <Imath/ImathColor.h> ++# include <Imath-3/ImathVec.h> ++# include <Imath-3/ImathMatrix.h> ++# include <Imath-3/ImathColor.h> + #else + // OpenEXR 2.x lacks the Cuda decorators we need, so we replicated some + // Imath files in OSL/Imathx, adding the decorations needed for them to +diff --git a/src/include/OSL/Imathx/ImathColor.h b/src/include/OSL/Imathx/ImathColor.h +index d0b035f..1cbb28f 100644 +--- a/src/include/OSL/Imathx/ImathColor.h ++++ b/src/include/OSL/Imathx/ImathColor.h +@@ -44,7 +44,7 @@ + //---------------------------------------------------- + + #include "ImathVec.h" +-#include <OpenEXR/ImathNamespace.h> ++#include <OpenEXR-3/ImathNamespace.h> + // #include "half.h" + + #ifndef IMATH_HOSTDEVICE +diff --git a/src/include/OSL/Imathx/ImathFun.h b/src/include/OSL/Imathx/ImathFun.h +index 1413c48..576b588 100644 +--- a/src/include/OSL/Imathx/ImathFun.h ++++ b/src/include/OSL/Imathx/ImathFun.h +@@ -43,10 +43,10 @@ + // + //----------------------------------------------------------------------------- + +-#include <OpenEXR/ImathExport.h> ++#include <OpenEXR-3/ImathExport.h> + #include "ImathLimits.h" +-#include <OpenEXR/ImathInt64.h> +-#include <OpenEXR/ImathNamespace.h> ++#include <OpenEXR-3/ImathInt64.h> ++#include <OpenEXR-3/ImathNamespace.h> + + IMATH_INTERNAL_NAMESPACE_HEADER_ENTER + +diff --git a/src/include/OSL/Imathx/ImathLimits.h b/src/include/OSL/Imathx/ImathLimits.h +index 09fa419..ed19eaa 100644 +--- a/src/include/OSL/Imathx/ImathLimits.h ++++ b/src/include/OSL/Imathx/ImathLimits.h +@@ -43,7 +43,7 @@ + // + //---------------------------------------------------------------- + +-#include <OpenEXR/ImathNamespace.h> ++#include <OpenEXR-3/ImathNamespace.h> + #include <float.h> + #include <limits.h> + +diff --git a/src/include/OSL/Imathx/ImathMatrix.h b/src/include/OSL/Imathx/ImathMatrix.h +index a4063dd..678f970 100644 +--- a/src/include/OSL/Imathx/ImathMatrix.h ++++ b/src/include/OSL/Imathx/ImathMatrix.h +@@ -43,12 +43,12 @@ + // + //---------------------------------------------------------------- + +-#include <OpenEXR/ImathPlatform.h> ++#include <OpenEXR-3/ImathPlatform.h> + #include "ImathFun.h" +-#include <OpenEXR/ImathExc.h> ++#include <OpenEXR-3/ImathExc.h> + #include "ImathVec.h" +-#include <OpenEXR/ImathShear.h> +-#include <OpenEXR/ImathNamespace.h> ++#include <OpenEXR-3/ImathShear.h> ++#include <OpenEXR-3/ImathNamespace.h> + + #include <cstring> + #include <iostream> +diff --git a/src/include/OSL/Imathx/ImathVec.h b/src/include/OSL/Imathx/ImathVec.h +index e52af61..4cd696b 100644 +--- a/src/include/OSL/Imathx/ImathVec.h ++++ b/src/include/OSL/Imathx/ImathVec.h +@@ -43,10 +43,10 @@ + // + //---------------------------------------------------- + +-#include <OpenEXR/ImathExc.h> ++#include <OpenEXR-3/ImathExc.h> + #include "ImathLimits.h" +-#include <OpenEXR/ImathMath.h> +-#include <OpenEXR/ImathNamespace.h> ++#include <OpenEXR-3/ImathMath.h> ++#include <OpenEXR-3/ImathNamespace.h> + + #include <iostream> + #include <limits> +diff --git a/src/liboslexec/shadingsys.cpp b/src/liboslexec/shadingsys.cpp +index 74dc557..74762ab 100644 +--- a/src/liboslexec/shadingsys.cpp ++++ b/src/liboslexec/shadingsys.cpp +@@ -30,7 +30,7 @@ + using namespace OSL; + using namespace OSL::pvt; + +-#include <OpenEXR/ImfChannelList.h> // Just for OPENEXR_VERSION_STRING ++#include <OpenEXR-3/ImfChannelList.h> // Just for OPENEXR_VERSION_STRING + + // avoid naming conflicts with MSVC macros + #ifdef _MSC_VER +diff --git a/src/liboslquery/py_osl.h b/src/liboslquery/py_osl.h +index ee8284f..4988b44 100644 +--- a/src/liboslquery/py_osl.h ++++ b/src/liboslquery/py_osl.h +@@ -26,7 +26,7 @@ + #include <OSL/oslquery.h> + + #if OSL_USING_IMATH >= 3 +-# include <Imath/half.h> ++# include <Imath-3/half.h> + #else + # include <OpenEXR/half.h> + #endif diff --git a/media-libs/osl/osl-1.12.4.1.ebuild b/media-libs/osl/osl-1.12.4.1.ebuild new file mode 100644 index 000000000000..4237748e4f5e --- /dev/null +++ b/media-libs/osl/osl-1.12.4.1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8,9,10} ) + +# Check this on updates +LLVM_MAX_SLOT=13 + +inherit cmake llvm toolchain-funcs python-single-r1 + +DESCRIPTION="Advanced shading language for production GI renderers" +HOMEPAGE="http://opensource.imageworks.com/?p=osl" +SRC_URI="https://github.com/imageworks/OpenShadingLanguage/archive/v${PV}-dev.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/OpenShadingLanguage-${PV}-dev" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +X86_CPU_FEATURES=( + sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4.1 sse4_2:sse4.2 + avx:avx avx2:avx2 avx512f:avx512f f16c:f16c +) +CPU_FEATURES=( ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_} ) + +IUSE="doc partio qt5 test ${CPU_FEATURES[@]%:*} python" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# See bug #821202 for openimageio < dep +RDEPEND=" + dev-libs/boost:= + dev-libs/pugixml + media-libs/openexr:3= + media-libs/openimageio:= + <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):= + sys-libs/zlib:= + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/pybind11[${PYTHON_USEDEP}] + ') + ) + partio? ( media-libs/partio ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) +" + +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +# Restricting tests as Makefile handles them differently +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${PN}-1.12.4.1-openexr-3-imath.patch +) + +llvm_check_deps() { + has_version -r "sys-devel/clang:${LLVM_SLOT}" +} + +pkg_setup() { + use python && python-single-r1_pkg_setup + llvm_pkg_setup +} + +src_configure() { + local cpufeature + local mysimd=() + for cpufeature in "${CPU_FEATURES[@]}"; do + use "${cpufeature%:*}" && mysimd+=("${cpufeature#*:}") + done + + # If no CPU SIMDs were used, completely disable them + [[ -z ${mysimd} ]] && mysimd=("0") + + local gcc=$(tc-getCC) + # LLVM needs CPP11. Do not disable. + local mycmakeargs=( + -DCMAKE_CXX_STANDARD=14 + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}" + -DINSTALL_DOCS=$(usex doc) + -DUSE_CCACHE=OFF + -DLLVM_STATIC=OFF + -DOSL_BUILD_TESTS=$(usex test) + -DSTOP_ON_WARNING=OFF + -DUSE_PARTIO=$(usex partio) + -DUSE_QT=$(usex qt5) + -DUSE_PYTHON=$(usex python) + -DUSE_SIMD="$(IFS=","; echo "${mysimd[*]}")" + ) + + cmake_src_configure +} |