summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl@gmail.com>2019-06-18 13:19:00 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2019-06-25 20:54:24 +0200
commitcae197b786f2108e0a98ad5857bde5ea95aa0d2f (patch)
tree70412e7d88c33dc705bcdbfdf9fdc610fd62e32b
parentdev-util/bpftrace: Version bump to 0.9.1 (diff)
downloadgentoo-cae197b786f2108e0a98ad5857bde5ea95aa0d2f.tar.gz
gentoo-cae197b786f2108e0a98ad5857bde5ea95aa0d2f.tar.bz2
gentoo-cae197b786f2108e0a98ad5857bde5ea95aa0d2f.zip
media-libs/osl: bump to version 1.10.5
Use upstream provided patch to find openexr version. Closes: https://bugs.gentoo.org/686480 Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Bernd Waibel <waebbl@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/12074 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--media-libs/osl/Manifest1
-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, 201 insertions, 0 deletions
diff --git a/media-libs/osl/Manifest b/media-libs/osl/Manifest
index d618646e7f1..f0b2131df27 100644
--- a/media-libs/osl/Manifest
+++ b/media-libs/osl/Manifest
@@ -1,3 +1,4 @@
+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
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 00000000000..8e45efd96ab
--- /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 00000000000..cc270ff5281
--- /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 b20cc885573..bc2afe661c3 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 00000000000..c5326986b7a
--- /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
+}