From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/osl/files/, media-libs/osl/
Date: Tue, 25 Jun 2019 18:54:44 +0000 (UTC) [thread overview]
Message-ID: <1561488864.cae197b786f2108e0a98ad5857bde5ea95aa0d2f.asturm@gentoo> (raw)
commit: cae197b786f2108e0a98ad5857bde5ea95aa0d2f
Author: Bernd Waibel <waebbl <AT> gmail <DOT> com>
AuthorDate: Tue Jun 18 11:19:00 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jun 25 18:54:24 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cae197b7
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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/12074
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-libs/osl/Manifest | 1 +
.../osl/files/osl-1.10.5-fix-install-shaders.patch | 35 +++++++++
....5-upstream-patch-to-find-openexr-version.patch | 76 +++++++++++++++++++
media-libs/osl/metadata.xml | 1 +
media-libs/osl/osl-1.10.5.ebuild | 88 ++++++++++++++++++++++
5 files changed, 201 insertions(+)
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
+}
next reply other threads:[~2019-06-25 18:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 18:54 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-20 11:25 [gentoo-commits] repo/gentoo:master commit in: media-libs/osl/files/, media-libs/osl/ Joonas Niilola
2022-02-12 3:55 Sam James
2022-02-12 3:55 Sam James
2021-11-08 11:25 Michał Górny
2021-09-19 5:20 Sam James
2020-03-22 18:24 Andreas Sturmlechner
2017-12-23 21:22 David Seifert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1561488864.cae197b786f2108e0a98ad5857bde5ea95aa0d2f.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox