forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/openimageio: Fix configure with openexr-2.3.0
Thanks-to: Alexander Miller <[email protected]> Closes: https://bugs.gentoo.org/683126 Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <[email protected]>
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
media-libs/openimageio/files/openimageio-1.7.17-openexr-2.3.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Use PkgConfig to find OpenEXR. Otherwise, the code fails | ||
when OpenEXR/OpenEXRConfig.h is a multilib wrapper. | ||
Changes taken from openimageio-1.8.17. | ||
|
||
--- openimageio-1.7.17/src/cmake/modules/FindOpenEXR.cmake | ||
+++ openimageio-1.7.17/src/cmake/modules/FindOpenEXR.cmake | ||
@@ -27,6 +27,13 @@ | ||
set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) | ||
endif () | ||
|
||
+# Attempt to find OpenEXR with pkgconfig | ||
+find_package(PkgConfig) | ||
+if (PKG_CONFIG_FOUND) | ||
+ pkg_check_modules(_ILMBASE QUIET IlmBase) | ||
+ pkg_check_modules(_OPENEXR QUIET OpenEXR>=2.0.0) | ||
+endif (PKG_CONFIG_FOUND) | ||
+ | ||
# List of likely places to find the headers -- note priority override of | ||
# OPENEXR_CUSTOM_INCLUDE_DIR and ${OPENEXR_HOME}/include. | ||
# ILMBASE is needed in case ilmbase an openexr are installed in separate | ||
@@ -35,6 +42,8 @@ | ||
${OPENEXR_CUSTOM_INCLUDE_DIR} | ||
${OPENEXR_HOME}/include | ||
${ILMBASE_HOME}/include | ||
+ ${_ILMBASE_INCLUDEDIR} | ||
+ ${_OPENEXR_INCLUDEDIR} | ||
/usr/local/include | ||
/usr/include | ||
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE} | ||
@@ -53,7 +62,11 @@ | ||
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]+)" "\\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}) | ||
@@ -90,6 +103,8 @@ | ||
${GENERIC_LIBRARY_PATHS} | ||
${OPENEXR_INCLUDE_PATH}/../lib | ||
${ILMBASE_INCLUDE_PATH}/../lib | ||
+ ${_ILMBASE_LIBDIR} | ||
+ ${_OPENEXR_LIBDIR} | ||
/usr/local/lib | ||
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE} | ||
/usr/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters