Skip to content

Commit

Permalink
[openImageIO] update to 2.3.10.1 (#22316)
Browse files Browse the repository at this point in the history
* [openImageIO] update to 2.3.10.1

* update versions

* update version

* update patch

* update version

* update patch

* update patch

* update version
  • Loading branch information
FrankXie05 committed Jan 5, 2022
1 parent f25991f commit b934807
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 137 deletions.
18 changes: 0 additions & 18 deletions ports/openimageio/disable-test.patch

This file was deleted.

5 changes: 3 additions & 2 deletions ports/openimageio/fix-config-cmake.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
index c578a1b..298362a 100644
index b498ece..fb45388 100644
--- a/src/cmake/Config.cmake.in
+++ b/src/cmake/Config.cmake.in
@@ -14,6 +14,6 @@ set (@PROJECT_NAME@_PLUGIN_SEARCH_PATH "@PLUGIN_SEARCH_PATH_NATIVE@")
@@ -30,7 +30,7 @@ endif ()
#...logic to determine installedPrefix from the own location...
#set (@PROJECT_NAME@_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@")

-include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/OpenImageIOTargets.cmake")

check_required_components ("@PROJECT_NAME@")

103 changes: 8 additions & 95 deletions ports/openimageio/fix-dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
index 740da06..a34d4c9 100644
index b690864..fb45388 100644
--- a/src/cmake/Config.cmake.in
+++ b/src/cmake/Config.cmake.in
@@ -11,6 +11,9 @@ elseif (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 2.4 AND @FOUND_OPENEXR_WITH_CONF
Expand All @@ -13,7 +13,7 @@ index 740da06..a34d4c9 100644
find_dependency(Threads) # Because OpenEXR doesn't do it
endif ()
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index 957abe3..2c093dd 100644
index 631035a..9f4d096 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -148,7 +148,7 @@ find_python()
Expand All @@ -25,26 +25,8 @@ index 957abe3..2c093dd 100644

checked_find_package (BZip2) # Used by ffmpeg and freetype
if (NOT BZIP2_FOUND)
@@ -158,8 +158,6 @@ endif ()
checked_find_package (Freetype
DEFINITIONS -DUSE_FREETYPE=1 )

-checked_find_package (HDF5
- ISDEPOF Field3D)
checked_find_package (OpenColorIO
DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1
# PREFER_CONFIG
@@ -176,15 +174,15 @@ checked_find_package (TBB 2017
checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images
checked_find_package (FFmpeg VERSION_MIN 3.0)
checked_find_package (Field3D
- DEPS HDF5
- DEFINITIONS -DUSE_FIELD3D=1)
+ DEFINITIONS -DUSE_FIELD3D=1)
checked_find_package (GIF
VERSION_MIN 4
RECOMMEND_MIN 5.0
RECOMMEND_MIN_REASON "for stability and thread safety")
@@ -200,7 +200,8 @@ if (ENABLE_FIELD3D)
endif ()

# For HEIF/HEIC/AVIF formats
-checked_find_package (Libheif VERSION_MIN 1.3
Expand All @@ -53,65 +35,23 @@ index 957abe3..2c093dd 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)
@@ -291,7 +289,8 @@ endmacro()
@@ -307,7 +308,8 @@ endmacro()
option (USE_EMBEDDED_LIBSQUISH
"Force use of embedded Libsquish, even if external is found" OFF)
if (NOT USE_EMBEDDED_LIBSQUISH)
- checked_find_package (Libsquish)
+ checked_find_package (unofficial-libsquish PREFER_CONFIG)
+ set(Libsquish_FOUND 1)
+ set(libsquish_FOUND 1)
endif ()


diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt
index d693453..9bef055 100644
--- a/src/dds.imageio/CMakeLists.txt
+++ b/src/dds.imageio/CMakeLists.txt
@@ -5,7 +5,7 @@
if (Libsquish_FOUND)
# External libsquish was found -- use it
add_oiio_plugin (ddsinput.cpp
- LINK_LIBRARIES Libsquish::Libsquish
+ LINK_LIBRARIES unofficial::libsquish::squish
)
else ()
# No external libsquish was found -- use the embedded version.
diff --git a/src/field3d.imageio/CMakeLists.txt b/src/field3d.imageio/CMakeLists.txt
index a9e54e3..cc73ac4 100644
--- a/src/field3d.imageio/CMakeLists.txt
+++ b/src/field3d.imageio/CMakeLists.txt
@@ -9,7 +9,7 @@ if (Field3D_FOUND)
endif ()
add_oiio_plugin (field3dinput.cpp field3doutput.cpp
INCLUDE_DIRS ${FIELD3D_INCLUDES}
- LINK_LIBRARIES Field3D::Field3D
+ LINK_LIBRARIES ${FIELD3D_LIBRARIES}
# ${HDF5_LIBRARIES}
${SZIP_LIBRARY})
endif()
diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt
index fed8001..15e87ae 100644
--- a/src/heif.imageio/CMakeLists.txt
+++ b/src/heif.imageio/CMakeLists.txt
@@ -2,9 +2,9 @@
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md

-if (Libheif_FOUND)
+if (libheif_FOUND)
add_oiio_plugin (heifinput.cpp heifoutput.cpp
- LINK_LIBRARIES Libheif::Libheif
+ LINK_LIBRARIES heif
DEFINITIONS "-DUSE_HEIF=1")
else ()
message (WARNING "heif plugin will not be built")
diff --git a/src/ico.imageio/CMakeLists.txt b/src/ico.imageio/CMakeLists.txt
index 9ba76ac..13db4ac 100644
index d290625..cff954c 100644
--- a/src/ico.imageio/CMakeLists.txt
+++ b/src/ico.imageio/CMakeLists.txt
@@ -2,9 +2,15 @@
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
# https://github.com/OpenImageIO/oiio

-if (TARGET PNG::PNG)
+if (libpng_FOUND)
Expand All @@ -127,30 +67,3 @@ index 9ba76ac..13db4ac 100644
else ()
message (WARNING "libpng not found, so ICO support will not work")
set (format_plugin_definitions ${format_plugin_definitions} DISABLE_ICO=1 PARENT_SCOPE)
diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt
index 57a0f62..3a07c31 100644
--- a/src/openvdb.imageio/CMakeLists.txt
+++ b/src/openvdb.imageio/CMakeLists.txt
@@ -4,6 +4,6 @@

if (OpenVDB_FOUND)
add_oiio_plugin (openvdbinput.cpp
- INCLUDE_DIRS ${TBB_INCLUDE_DIRS}
- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES})
+ INCLUDE_DIRS ${OPENVDB_INCLUDES} ${TBB_INCLUDE_DIRS}
+ LINK_LIBRARIES ${OPENVDB_LIBRARIES} ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES})
endif()
diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt
index 44462c4..e1cb068 100644
--- a/src/webp.imageio/CMakeLists.txt
+++ b/src/webp.imageio/CMakeLists.txt
@@ -4,7 +4,8 @@

if (WebP_FOUND)
add_oiio_plugin (webpinput.cpp webpoutput.cpp
- LINK_LIBRARIES WebP::WebP WebP::WebPDemux
+ INCLUDE_DIRS ${WEBP_INCLUDES}
+ LINK_LIBRARIES ${WEBP_LIBRARIES}
DEFINITIONS "-DUSE_WEBP=1")
else ()
message (STATUS "WebP plugin will not be built")
13 changes: 0 additions & 13 deletions ports/openimageio/fix_static_build.patch

This file was deleted.

8 changes: 3 additions & 5 deletions ports/openimageio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OpenImageIO/oiio
REF 9f74cf4d9813bfdcad5bca08b4ff75a25d056cb0 # 2.3.7.2
SHA512 cebc388e842e983f010c5f3bf57bed3fe1ae9d2eac79019472f8431b194d6a8b156b27cc5688bd0998aa2d01959d47bcdc7e637417f755433ffe32c491cdc376
REF ff71703961f7758409fb7e6e689258e2997f7c18 # 2.3.10.1
SHA512 f56cb58329a496ca1fe3537fe87d469038ac0e74a555990a4510d2c019d2ad14b556240c0d5087a9a25ac01d9b371b5c77ce5a719e71a85fcd56e9cd099bc31e
HEAD_REF master
PATCHES
fix-config-cmake.patch
fix_static_build.patch
disable-test.patch
fix-dependencies.patch
fix-config-cmake.patch
)

file(REMOVE_RECURSE "${SOURCE_PATH}/ext")
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.3.7.2",
"port-version": 5,
"version": "2.3.10.1",
"description": "A library for reading and writing images, and a bunch of related classes, utilities, and application.",
"homepage": "https://github.com/OpenImageIO/oiio",
"dependencies": [
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5001,8 +5001,8 @@
"port-version": 2
},
"openimageio": {
"baseline": "2.3.7.2",
"port-version": 5
"baseline": "2.3.10.1",
"port-version": 0
},
"openjpeg": {
"baseline": "2.4.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": "f5a6955a1595a5d3ea429059d9be4ddedc8e7cab",
"version": "2.3.10.1",
"port-version": 0
},
{
"git-tree": "f9b44bac4dcc0735f5efc3e8f0d439790b7efbd0",
"version": "2.3.7.2",
Expand Down

0 comments on commit b934807

Please sign in to comment.