Skip to content

Commit

Permalink
[openimageio] Update to 2.5.8.0 (#36638)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreichel-nvidia committed Feb 9, 2024
1 parent fce5c63 commit 1750541
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 27 deletions.
26 changes: 14 additions & 12 deletions ports/openimageio/fix-dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
index 0a6afeb..2a67ee3 100644
diff -u -r a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
--- a/src/cmake/Config.cmake.in
+++ b/src/cmake/Config.cmake.in
@@ -2,6 +2,23 @@
@@ -6,6 +6,23 @@

include(CMakeFindDependencyMacro)

Expand All @@ -26,11 +25,10 @@ index 0a6afeb..2a67ee3 100644
# add here all the find_dependency() whenever switching to config based dependencies
if (NOT @OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH@ AND NOT OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH)
if (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 3.0)
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index 3ca046b..dad053c 100644
diff -u -r a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -174,14 +174,19 @@ endif ()
@@ -177,10 +177,13 @@
checked_find_package (Freetype
DEFINITIONS -DUSE_FREETYPE=1 )

Expand All @@ -42,17 +40,21 @@ index 3ca046b..dad053c 100644
# PREFER_CONFIG
)
+set(OPENCOLORIO_FOUND "${OpenColorIO_FOUND}")
if (NOT OpenColorIO_FOUND)
if (OpenColorIO_FOUND)
option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS
"For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF)
@@ -191,7 +194,9 @@
set (OpenColorIO_FOUND 0)
endif ()

-checked_find_package (OpenCV 3.0
+set(OPENCV_INCLUDES "")
+set(OPENCV_LIBRARIES opencv_core)
+checked_find_package (OpenCV CONFIG
DEFINITIONS -DUSE_OPENCV=1)

# Intel TBB
@@ -191,14 +196,18 @@ checked_find_package (TBB 2017
@@ -201,14 +206,18 @@
PREFER_CONFIG)

checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images
Expand All @@ -73,7 +75,7 @@ index 3ca046b..dad053c 100644
RECOMMEND_MIN 1.7
RECOMMEND_MIN_REASON "for AVIF support")
if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11)
@@ -219,9 +228,8 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER
@@ -228,9 +237,8 @@
# set (LIBRAW_FOUND 0)
endif ()

Expand All @@ -85,12 +87,12 @@ index 3ca046b..dad053c 100644
# Note: Recent OpenJPEG versions have exported cmake configs, but we don't
# find them reliable at all, so we stick to our FindOpenJPEG.cmake module.

@@ -238,6 +246,8 @@ if (NOT Ptex_FOUND OR NOT Ptex_VERSION)
@@ -251,6 +259,8 @@
checked_find_package (Ptex)
endif ()

+set(WEBP_INCLUDES "")
+set(WEBP_LIBRARIES WebP::webp WebP::webpdemux)
checked_find_package (WebP)

option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF)
# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their
# exported configs and remove our FindWebP.cmake module.
9 changes: 4 additions & 5 deletions ports/openimageio/fix-static-ffmpeg.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
index dc260a7..433ffbb 100644
diff -u -r a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -6,6 +6,13 @@
checked_find_package (pybind11 REQUIRED
VERSION_MIN 2.4.2)
@@ -3,6 +3,13 @@
# https://github.com/AcademySoftwareFoundation/OpenImageIO


+if(USE_FFMPEG AND UNIX AND NOT BUILD_SHARED_LIBS AND VCPKG_CRT_LINKAGE STREQUAL "dynamic")
+ include(CheckLinkerFlag)
Expand Down
9 changes: 4 additions & 5 deletions ports/openimageio/imath-version-guard.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index 4d7e11c..0f15ba9 100644
diff -u -r a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -184,6 +184,11 @@ set(OPENCOLORIO_FOUND "${OpenColorIO_FOUND}")
if (NOT OpenColorIO_FOUND)
@@ -193,6 +193,11 @@
else ()
set (OpenColorIO_FOUND 0)
endif ()
+if(USE_OPENCOLORIO AND TARGET Imath::Imath AND OIIO_USING_IMATH STREQUAL "2")
+ message(FATAL_ERROR
+ "OpenColorIO and OpenEXR use incompatible versions of Imath. "
+ "You cannot use openimageio[opencolorio] for this configuration.")
+endif()

set(OPENCV_INCLUDES "")
set(OPENCV_LIBRARIES opencv_core)
checked_find_package (OpenCV CONFIG
2 changes: 1 addition & 1 deletion ports/openimageio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO AcademySoftwareFoundation/OpenImageIO
REF "v${VERSION}"
SHA512 6b87c805907a2f7c98f40e987fb6ebf769f8519f5d8a8b7393bed62a41cee1118bb32d2bc4d23fd464973e237077d08771ff85f72073caa57799d71bd098038f
SHA512 8399d66a757297d646e0d9ce363cfc88a8f7b06d69582857093f13a0a398fc027ea68bf1a97f039320f3fe512c96b4e3ed084295da12359e7574ba460336ce10
HEAD_REF master
PATCHES
fix-dependencies.patch
Expand Down
3 changes: 1 addition & 2 deletions ports/openimageio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "openimageio",
"version": "2.4.14.0",
"port-version": 3,
"version": "2.5.8.0",
"description": "A library for reading and writing images, and a bunch of related classes, utilities, and application.",
"homepage": "https://github.com/OpenImageIO/oiio",
"license": "BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6369,8 +6369,8 @@
"port-version": 4
},
"openimageio": {
"baseline": "2.4.14.0",
"port-version": 3
"baseline": "2.5.8.0",
"port-version": 0
},
"openjpeg": {
"baseline": "2.5.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openimageio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c5dd8fe433ee655c7368c063d01eac043f9d0553",
"version": "2.5.8.0",
"port-version": 0
},
{
"git-tree": "76cadb5ec79b57f840f2dae9dc39501b027f6a9f",
"version": "2.4.14.0",
Expand Down

0 comments on commit 1750541

Please sign in to comment.