summaryrefslogtreecommitdiff
path: root/media-libs/osl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
commit7014a5a3ea0feffab9701fdd6b64cc7667a985af (patch)
treef2cbbaa8bb9209cd15208721103228336149b799 /media-libs/osl
parent7a86906b67693cc65671d3e1476835d3a7e13092 (diff)
gentoo resync : 30.06.2019
Diffstat (limited to 'media-libs/osl')
-rw-r--r--media-libs/osl/Manifest6
-rw-r--r--media-libs/osl/files/osl-1.10.5-fix-install-shaders.patch35
-rw-r--r--media-libs/osl/files/osl-1.10.5-upstream-patch-to-find-openexr-version.patch76
-rw-r--r--media-libs/osl/metadata.xml1
-rw-r--r--media-libs/osl/osl-1.10.5.ebuild88
5 files changed, 205 insertions, 1 deletions
diff --git a/media-libs/osl/Manifest b/media-libs/osl/Manifest
index 4678aaac68a9..4cf4151e0470 100644
--- a/media-libs/osl/Manifest
+++ b/media-libs/osl/Manifest
@@ -1,8 +1,12 @@
+AUX osl-1.10.5-fix-install-shaders.patch 1333 BLAKE2B daf7970a05ccc2b08139c385caf9c2a9291d2f7db30b2ed1dab99d1d8da25ad5487edc7961a62809811eca45066eaa4bfa0524d0e9c9daa25489fb84be2965b2 SHA512 bc7d5e2c1306fa540d51f425d4b1303c5ad9ab624ba7f44d03ed9d8df77f36a71c334b05049d0a880cabe068947f7936258e3e52479334987b7ae68f55631cc4
+AUX osl-1.10.5-upstream-patch-to-find-openexr-version.patch 3609 BLAKE2B 25951dd971f344d8c2233bb58d05f87ce77a12db182c19d16c346e41644c6cc64b4e20b631ab0e03b4a00a42de624693a61b04930beecea0fe0ed3dff1760fa6 SHA512 0c27bf26afbe5806565d3ad7617f35e66814695435e9c176e73faa09b5508830803709a040aea2901293a3fd2a2110b4daf622099a5c01e92fd2ee9d09b15cae
AUX osl-1.8.12-cmake-fixes.patch 14704 BLAKE2B dd7d37ae117c338aa72893a26e59f3046c89d5ddc57c7dfc90225d1e49f5bd4346869db7621e2ec0b7c082650d54987a4f6c1196a169828fa17388ad7a3a32e3 SHA512 14059eb68c520e90ed3217b0480929efa4b1ccfa6860649ca86285856d8f5efd07a563ad01dc8bb46dd42d277708b27a9a9f8833f60960502162df0fc1ee243c
+DIST osl-1.10.5.tar.gz 13543151 BLAKE2B 3c67834d9ab6d4d725ecde622c402707593b9aaf25f1e94f9ed6b004c28fa9b7b90cfd0d320cb2898f77f8883ac14a71310abaf63a5b06704565c5a3bdea09b4 SHA512 d704b623836edca4c3fe9c18f33b8d76f4625036228fc977732c600e23e16da4cb4bf311607019b251d734b63a184bde0f7726f144ecd5bcd7866938d95bfdff
DIST osl-1.8.12.tar.gz 14572814 BLAKE2B edf742b104e723e1e3e56b2fb28b1cd4c81921b04a00b8c0f58cf174105a78881283837b550fb4a67d38f5f0a37327fac7a17310974895ed747e8813e6c8ad7b SHA512 29bb0a23d9e1aa445e87b7080be056f939a1828fa87f001cc1503a8c76d21a5620c69146158d27800db71b1abee71a0c39804d85aea7b5899b0cb7ca1c617b56
DIST osl-1.9.6.tar.gz 14765052 BLAKE2B c6c82d02d49d263361b5b3ba03fca8f35f16199d7d30bbeb50a6b2ee16efcb06ddddc9ce515f749b38b2428365c27a23bf673e9be64d1453c7a49ab0f0d09002 SHA512 e2eb8487038795630bfb38cfb7a39f0cc6877f83689d1e00327b9d95c4b5270c263546a02dff1511272d1d2f429757e11fa28095f9d16cb170b777b531678961
DIST osl-1.9.9.tar.gz 14771575 BLAKE2B ffbfa935c0d6568c9b35048d5b05965abc75775f4a4f56a434a331a45f4963b3e5cb74fb965748a5fb94cdd3a4201a4745ce564646cbbe535ca2646a734dc33c SHA512 7f3a16bc654676f8e82bf87a2c33914997f1468772ad27bf284c848e9b02adddaf37cb6ef8bde16c81b9076247bca5463a1a5660023efd67d9ac20969ae99647
+EBUILD osl-1.10.5.ebuild 2062 BLAKE2B 167bf475ea3f3f3f3d25d434bf002b4f14335589bb71ec8b1814cbb99eca56a4955c537c89d6c15fe0f53cc7315da130a90edfe5a71708840199244706406692 SHA512 6368edc1cb48259111d8764cd36771ac4b519335a24990042d7fc0513ff4a27d081052d3b0e6261045ec7e943004dd10ec9e2a03f2ba31b755473584b600eaba
EBUILD osl-1.8.12.ebuild 1784 BLAKE2B c01cae7aec718f704fe017dc0f3273db7e3046fa276b4b82030dafc4a59ab641b7faa20a7ce2735d52347a30b1188458a9b9f6316bd96bc406e3363018a51350 SHA512 d5148e294ac96cfd06639927af0b3d03a00193d1ffbf55b65e51e717e8ed72fc15cb81b3e418bcd9bde102ad8ede59b92aff966ae0dbb3e366f120706b119fa4
EBUILD osl-1.9.6.ebuild 1748 BLAKE2B e6b99e1822ced26cf8d6e138f46d4c5e038f078e0b697ecd40e6cde3870efa945160af3cf83f675825fe5a878b5e5bd6a7ec8caea79d4961a0da23130d2d652b SHA512 d0ce4444dc300b869a520a7bc50ea1d95a0ac0342684495c0742a62e55a8f0cb9453ad71fa2ca0ba412970d7d0323409ae8eff99862908d80a24977ce3babaa5
EBUILD osl-1.9.9.ebuild 1720 BLAKE2B 22d51d110a3128ece31bc2f0155e94f996ae65f2adc42690053305d4b8304737b82a991431114f48524fe5c1ab6b8643899e02a99a341ff5bf653fbff7990b91 SHA512 914cbed1d6020934a8139d8b7a553a275c09c4fa89178237c7105845e6e3cec86c5e1b163ec261a82237d0505c04b624f75294868d2ab469656b639bcefdb0c5
-MISC metadata.xml 1081 BLAKE2B eabbb5a86e04eed46ee43e48be4317009c619259c79df95b376d457a07a3ed3557297cad5fbe45f0dd81ce33eee9032c95016b55321295b1c49e63de4f95298e SHA512 e2752051556751cb815a34c39fa5a85898417753d0d933db7a5b14162e26c98e46d7e106bce65f7284cacc1b33e3aa3bf75e9801245dcb2266d51e9ef9c50504
+MISC metadata.xml 1131 BLAKE2B f04c4ca5d3fbc47deeabcd07c48281ed0cfd4bc8d5653c66a5556af1c7ae5f43c7f2687e800999b0fb44666e81e6e94b6b5afc7898d65d0084b309d5bb2e3616 SHA512 c7f7bafda89d9b57854579179dd9d2b124b349ca3b96815a62b060a08a48686dd7e5adaad45bc3f24b0653fb0a76183a61dda25503271552d2a0f5a635120dd2
diff --git a/media-libs/osl/files/osl-1.10.5-fix-install-shaders.patch b/media-libs/osl/files/osl-1.10.5-fix-install-shaders.patch
new file mode 100644
index 000000000000..8e45efd96abc
--- /dev/null
+++ b/media-libs/osl/files/osl-1.10.5-fix-install-shaders.patch
@@ -0,0 +1,35 @@
+From 296ee89fcdec8ff6e514a3aebf5cb6c177f7f0c1 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Mon, 10 Jun 2019 13:02:14 +0200
+Subject: [PATCH] fix install location of shaders (Gentoo specific)
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ src/shaders/CMakeLists.txt | 2 +-
+ src/shaders/MaterialX/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/shaders/CMakeLists.txt b/src/shaders/CMakeLists.txt
+index 9b263ff..5c47918 100644
+--- a/src/shaders/CMakeLists.txt
++++ b/src/shaders/CMakeLists.txt
+@@ -63,4 +63,4 @@ add_custom_target (shaders ALL
+ SOURCES ${shader_source} ${shader_headers})
+
+ install (FILES ${shader_headers} ${shader_source} ${shader_objs}
+- DESTINATION shaders)
++ DESTINATION include/OSL/shaders)
+diff --git a/src/shaders/MaterialX/CMakeLists.txt b/src/shaders/MaterialX/CMakeLists.txt
+index 88b52f3..f0e0a23 100644
+--- a/src/shaders/MaterialX/CMakeLists.txt
++++ b/src/shaders/MaterialX/CMakeLists.txt
+@@ -258,5 +258,5 @@ add_custom_target (mxshaders ALL
+ SOURCES ${shader_source} ${mx_shader_headers})
+
+ install (FILES ${mx_shader_headers} ${mx_shader_objs} ${mx_shader_osls}
+- DESTINATION shaders/MaterialX)
++ DESTINATION include/OSL/shaders/MaterialX)
+
+--
+2.21.0
+
diff --git a/media-libs/osl/files/osl-1.10.5-upstream-patch-to-find-openexr-version.patch b/media-libs/osl/files/osl-1.10.5-upstream-patch-to-find-openexr-version.patch
new file mode 100644
index 000000000000..cc270ff52813
--- /dev/null
+++ b/media-libs/osl/files/osl-1.10.5-upstream-patch-to-find-openexr-version.patch
@@ -0,0 +1,76 @@
+From 9efdcfafcdfbb7666171b6016b725183a71fceb0 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Tue, 25 Jun 2019 19:44:14 +0200
+Subject: [PATCH] src/cmake/modules/FindOpenEXR.cmake: patch to find openexr
+
+This upstream patch (see
+https://github.com/imageworks/OpenShadingLanguage/pull/1022/files)
+uses pkg-config variables to get the correct versions for openexr
+on multilib installations.
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ src/cmake/modules/FindOpenEXR.cmake | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/src/cmake/modules/FindOpenEXR.cmake b/src/cmake/modules/FindOpenEXR.cmake
+index 6c6b39c..4a9de4b 100644
+--- a/src/cmake/modules/FindOpenEXR.cmake
++++ b/src/cmake/modules/FindOpenEXR.cmake
+@@ -25,8 +25,12 @@ endif ()
+ # Attempt to find OpenEXR with pkgconfig
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+- pkg_check_modules(_ILMBASE QUIET IlmBase>=2.0.0)
+- pkg_check_modules(_OPENEXR QUIET OpenEXR>=2.0.0)
++ if (NOT ILMBASE_ROOT_DIR)
++ pkg_check_modules(_ILMBASE QUIET QUIET IlmBase>=2.0.0)
++ endif()
++ if (NOT OPENEXR_ROOT_DIR)
++ pkg_check_modules(_OPENEXR QUIET OpenEXR>=2.0.0)
++ endif()
+ endif (PKG_CONFIG_FOUND)
+
+ # List of likely places to find the headers -- note priority override of
+@@ -60,7 +64,11 @@ find_path (OPENEXR_INCLUDE_PATH OpenEXR/OpenEXRConfig.h
+ find_path (OPENEXR_INCLUDE_PATH OpenEXR/OpenEXRConfig.h)
+
+ # Try to figure out version number
+-if (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h")
++if (DEFINED _OPENEXR_VERSION AND NOT "${_OPENEXR_VERSION}" STREQUAL "")
++ set (OPENEXR_VERSION "${_OPENEXR_VERSION}")
++ string (REGEX REPLACE "([0-9]+)\\.[0-9\\.]+" "\\1" OPENEXR_VERSION_MAJOR "${_OPENEXR_VERSION}")
++ string (REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" OPENEXR_VERSION_MINOR "${_OPENEXR_VERSION}")
++elseif (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h")
+ # Must be at least 2.0
+ file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_STRING .*$")
+ string (REGEX MATCHALL "[0-9]+[.0-9]+" OPENEXR_VERSION ${TMP})
+@@ -93,6 +101,8 @@ set (GENERIC_LIBRARY_PATHS
+ /opt/local/lib
+ $ENV{PROGRAM_FILES}/OpenEXR/lib/static )
+
++# message (STATUS "Generic lib paths: ${GENERIC_LIBRARY_PATHS}")
++
+ # Handle request for static libs by altering CMAKE_FIND_LIBRARY_SUFFIXES.
+ # We will restore it at the end of this file.
+ set (_openexr_orig_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
+@@ -114,14 +124,14 @@ foreach (COMPONENT ${_openexr_components})
+ # First try with the version embedded
+ set (FULL_COMPONENT_NAME ${COMPONENT}-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
+ find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME}
+- PATHS ${OPENEXR_LIBRARY_DIR}
++ PATHS ${OPENEXR_LIBRARY_DIR} $ENV{OPENEXR_LIBRARY_DIR}
+ ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)
+ # Again, with no directory restrictions
+ find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME})
+ # Try again without the version
+ set (FULL_COMPONENT_NAME ${COMPONENT})
+ find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME}
+- PATHS ${OPENEXR_LIBRARY_DIR}
++ PATHS ${OPENEXR_LIBRARY_DIR} $ENV{OPENEXR_LIBRARY_DIR}
+ ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)
+ # One more time, with no restrictions
+ find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME})
+--
+2.22.0
+
diff --git a/media-libs/osl/metadata.xml b/media-libs/osl/metadata.xml
index b20cc8855738..bc2afe661c3b 100644
--- a/media-libs/osl/metadata.xml
+++ b/media-libs/osl/metadata.xml
@@ -26,6 +26,7 @@
SIMD Optimization
</flag>
<flag name="partio">Use <pkg>media-libs/partio</pkg></flag>
+ <flag name="qt5">Build the osltoy binary</flag>
</use>
<upstream>
<remote-id type="github">imageworks/OpenShadingLanguage</remote-id>
diff --git a/media-libs/osl/osl-1.10.5.ebuild b/media-libs/osl/osl-1.10.5.ebuild
new file mode 100644
index 000000000000..c5326986b7a6
--- /dev/null
+++ b/media-libs/osl/osl-1.10.5.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake-utils llvm toolchain-funcs
+
+# check this on updates
+LLVM_MAX_SLOT=8
+
+DESCRIPTION="Advanced shading language for production GI renderers"
+HOMEPAGE="http://opensource.imageworks.com/?p=osl"
+SRC_URI="https://github.com/imageworks/OpenShadingLanguage/archive/Release-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~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[@]%:*}"
+
+# >=clang-3.4 is needed, but at least llvm:5 if both are installed
+RDEPEND="
+ >=dev-libs/boost-1.62:=
+ dev-libs/pugixml
+ >=media-libs/openexr-2.2.0:=
+ >=media-libs/openimageio-1.8.5
+ >=sys-devel/clang-5:=
+ sys-libs/zlib:=
+ 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
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-upstream-patch-to-find-openexr-version.patch"
+ "${FILESDIR}/${P}-fix-install-shaders.patch"
+)
+
+# Restricting tests as Make file handles them differently
+RESTRICT="test"
+
+S="${WORKDIR}/OpenShadingLanguage-Release-${PV}"
+
+llvm_check_deps() {
+ has_version -r "sys-devel/clang:${LLVM_SLOT}"
+}
+
+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_INSTALL_DOCDIR="share/doc/${PF}"
+ -DENABLERTTI=OFF
+ -DINSTALL_DOCS=$(usex doc)
+ -DLLVM_STATIC=ON
+ -DOSL_BUILD_TESTS=$(usex test)
+ -DSTOP_ON_WARNING=OFF
+ -DUSE_PARTIO=$(usex partio)
+ -DUSE_QT=$(usex qt5)
+ -DUSE_SIMD="$(IFS=","; echo "${mysimd[*]}")"
+ )
+
+ cmake-utils_src_configure
+}