summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-02 04:54:13 +0000
committerSam James <sam@gentoo.org>2021-12-02 04:54:23 +0000
commit4a75e3cc1b8326d387b156282e4f9635b4a97197 (patch)
tree0189f0e9d657c657abd36afd82f451f2232c1f4c /media-libs/osl
parentdev-lang/python: drop ~m68k from 3.9.9, dumps core on build (diff)
downloadgentoo-4a75e3cc1b8326d387b156282e4f9635b4a97197.tar.gz
gentoo-4a75e3cc1b8326d387b156282e4f9635b4a97197.tar.bz2
gentoo-4a75e3cc1b8326d387b156282e4f9635b4a97197.zip
media-libs/osl: try again to force ilmbase
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/osl')
-rw-r--r--media-libs/osl/files/osl-1.11.16.0-no-imath.patch49
-rw-r--r--media-libs/osl/osl-1.11.16.0-r2.ebuild7
2 files changed, 53 insertions, 3 deletions
diff --git a/media-libs/osl/files/osl-1.11.16.0-no-imath.patch b/media-libs/osl/files/osl-1.11.16.0-no-imath.patch
new file mode 100644
index 000000000000..a8e5c1f23116
--- /dev/null
+++ b/media-libs/osl/files/osl-1.11.16.0-no-imath.patch
@@ -0,0 +1,49 @@
+Force finding OpenEXR / IlmBase instead of imath for now.
+--- a/src/cmake/modules/FindOpenEXR.cmake
++++ b/src/cmake/modules/FindOpenEXR.cmake
+@@ -39,43 +39,10 @@
+ #
+
+ # First, try to fine just the right config files
+-find_package(Imath CONFIG)
+-if (NOT TARGET Imath::Imath)
+- # Couldn't find Imath::Imath, maybe it's older and has IlmBase?
+- find_package(IlmBase CONFIG)
+-endif ()
++find_package(IlmBase CONFIG)
+ find_package(OpenEXR CONFIG)
+
+-if (TARGET OpenEXR::OpenEXR AND TARGET Imath::Imath)
+- # OpenEXR 3.x if both of these targets are found
+- set (FOUND_OPENEXR_WITH_CONFIG 1)
+- if (NOT OpenEXR_FIND_QUIETLY)
+- message (STATUS "Found CONFIG for OpenEXR 3 (OPENEXR_VERSION=${OpenEXR_VERSION})")
+- endif ()
+-
+- # Mimic old style variables
+- set (OPENEXR_VERSION ${OpenEXR_VERSION})
+- get_target_property(IMATH_INCLUDES Imath::Imath INTERFACE_INCLUDE_DIRECTORIES)
+- get_target_property(ILMBASE_INCLUDES Imath::Imath INTERFACE_INCLUDE_DIRECTORIES)
+- get_target_property(ILMBASE_IMATH_LIBRARY Imath::Imath INTERFACE_LINK_LIBRARIES)
+- get_target_property(IMATH_LIBRARY Imath::Imath INTERFACE_LINK_LIBRARIES)
+- get_target_property(OPENEXR_IEX_LIBRARY OpenEXR::Iex INTERFACE_LINK_LIBRARIES)
+- get_target_property(OPENEXR_ILMTHREAD_LIBRARY OpenEXR::IlmThread INTERFACE_LINK_LIBRARIES)
+- set (ILMBASE_LIBRARIES ${ILMBASE_IMATH_LIBRARY})
+- set (ILMBASE_FOUND true)
+-
+- get_target_property(OPENEXR_INCLUDES OpenEXR::OpenEXR INTERFACE_INCLUDE_DIRECTORIES)
+- get_target_property(OPENEXR_ILMIMF_LIBRARY OpenEXR::OpenEXR INTERFACE_LINK_LIBRARIES)
+- set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_LIBRARIES})
+- set (OPENEXR_FOUND true)
+-
+- # Link with pthreads if required
+- find_package (Threads)
+- if (CMAKE_USE_PTHREADS_INIT)
+- list (APPEND ILMBASE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+- endif ()
+-
+-elseif (TARGET OpenEXR::IlmImf AND TARGET IlmBase::Imath AND
++if (TARGET OpenEXR::IlmImf AND TARGET IlmBase::Imath AND
+ (OPENEXR_VERSION VERSION_GREATER_EQUAL 2.4 OR OpenEXR_VERSION VERSION_GREATER_EQUAL 2.4))
+ # OpenEXR 2.4 or 2.5 with exported config
+ set (FOUND_OPENEXR_WITH_CONFIG 1)
diff --git a/media-libs/osl/osl-1.11.16.0-r2.ebuild b/media-libs/osl/osl-1.11.16.0-r2.ebuild
index ceada4f92ae6..3dd9f84f2cf7 100644
--- a/media-libs/osl/osl-1.11.16.0-r2.ebuild
+++ b/media-libs/osl/osl-1.11.16.0-r2.ebuild
@@ -63,6 +63,10 @@ RESTRICT="test"
S="${WORKDIR}/OpenShadingLanguage-Release-${PV}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11.16.0-no-imath.patch
+)
+
llvm_check_deps() {
has_version -r "sys-devel/clang:${LLVM_SLOT}"
}
@@ -85,9 +89,6 @@ src_configure() {
local gcc=$(tc-getCC)
local mycmakeargs=(
- # Force use of OpenEXR/ilmbase
- -DCMAKE_DISABLE_FIND_PACKAGE_Imath=ON
-
# LLVM 10+ needs C++14
-DCMAKE_CXX_STANDARD=14
-DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"