Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openexr] Update to 3.1.4 #20957

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
02c2316
Update openexr to 3.1.2
chausner Oct 23, 2021
32d3d13
Update CI baseline
chausner Oct 23, 2021
7acc150
Try to fix git FetchContent issue on Windows
chausner Oct 24, 2021
37df542
Update git-tree hash
chausner Oct 24, 2021
ae0acae
Workaround Imath find_dependency issue
chausner Oct 24, 2021
90b8edd
Update git-tree hash
chausner Oct 24, 2021
2b7d178
Use separate imath dependency
chausner Oct 24, 2021
454a9c8
Merge branch 'master' into openexr-3.1.2
chausner Oct 29, 2021
4ae84bf
Make freeimage compatible with openexr and imath
chausner Oct 30, 2021
0814c91
Update CI baseline
chausner Oct 30, 2021
16f9452
Merge branch 'freeimage-openexr-3.1.2' into openexr-3.1.2
chausner Oct 30, 2021
b187747
Remove unused patch
chausner Oct 30, 2021
6e2f3cc
Fix openexr dependency in osg
chausner Oct 30, 2021
b145213
Update CI baseline
chausner Oct 30, 2021
04f39a0
Increment port-version of osg
chausner Oct 30, 2021
3309a8e
Update CI baseline
chausner Oct 30, 2021
67af2d7
Modernize osg
chausner Oct 30, 2021
2fa8d07
Update CI baseline
chausner Oct 30, 2021
2c37a7e
Fix osg build
chausner Oct 30, 2021
bfbeba5
Update CI baseline
chausner Oct 30, 2021
be907e5
Update to 3.1.3
chausner Nov 5, 2021
4161569
Update git-tree hash
chausner Nov 5, 2021
221948d
Merge branch 'master' into openexr-3.1.2
chausner Jan 10, 2022
e0e1dd7
Update git-tree hash
chausner Jan 10, 2022
1a65106
Merge remote-tracking branch 'upstream/master' into openexr-3.1.2
chausner Feb 10, 2022
fd133ad
Bump port-version of freeimage
chausner Feb 10, 2022
fd8991b
Update CI baseline
chausner Feb 10, 2022
0894cc8
Bump port-version of osg
chausner Feb 10, 2022
df8988e
Update CI baseline
chausner Feb 10, 2022
7919c2d
Add license metadata to freeimage, openexr and osg
chausner Feb 10, 2022
d4df444
Update CI baseline
chausner Feb 10, 2022
99be26c
Update CI baseline
chausner Feb 10, 2022
1f68325
Remove license attribute for osg again
chausner Feb 10, 2022
53de3f6
Remove vcpkg_fail_port_install from openexr port
chausner Feb 10, 2022
b5d1a71
Update CI baseline
chausner Feb 10, 2022
384551c
Revert "Remove license attribute for osg again"
chausner Feb 11, 2022
e66d454
Update CI baseline
chausner Feb 11, 2022
d602bb3
Merge remote-tracking branch 'upstream/master' into openexr-3.1.2
chausner Apr 8, 2022
43fb373
Update to openexr 3.1.4
chausner Apr 8, 2022
d667556
Update CI baseline
chausner Apr 8, 2022
09db442
Clean up openexr versions
chausner Apr 8, 2022
dda6fb2
Fix MSVC2022 builds
chausner Apr 9, 2022
a0b939b
Update CI baseline
chausner Apr 9, 2022
5fb72aa
Fix OpenEXR compatibility in ogre
chausner Apr 9, 2022
57ab113
Update CI baseline
chausner Apr 9, 2022
552ea4b
osg: Switch back to vcpkg_configure_cmake
chausner Apr 9, 2022
45be7aa
Various fixes in osg
chausner Apr 10, 2022
d8d099f
Update CI baseline
chausner Apr 10, 2022
9d35fed
Fix OpenEXR in devil
chausner Apr 10, 2022
1feecb0
Update CI baseline
chausner Apr 10, 2022
f84687b
Fix devil on macOS
chausner Apr 10, 2022
347a52e
Update CI baseline
chausner Apr 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion ports/devil/0003_fix-openexr.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@ diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt
index 02e4f03..4accaa1 100644
--- a/DevIL/src-IL/CMakeLists.txt
+++ b/DevIL/src-IL/CMakeLists.txt
@@ -235,8 +235,12 @@ target_link_libraries(IL ${libs})
@@ -77,7 +77,10 @@
#find_package(Squish)
find_package(libSquish)
find_package(NVTT) # NVidia texture tools
-find_package(OpenEXR)
+find_package(Imath CONFIG)
+find_package(OpenEXR CONFIG)
+set(OPENEXR_FOUND $OpenEXR_FOUND)
+set(OPENEXR_LIBRARIES "OpenEXR::OpenEXR;Imath::Imath")
#find_package(LCMS)
find_package(LCMS2)
find_package(MNG)
@@ -235,8 +235,13 @@ target_link_libraries(IL ${libs})

# generate config.h
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h)
-
-
+add_definitions(-DHAVE_CONFIG_H)
+if(WIN32)
+ add_definitions(-DNOMINMAX)
+ if(BUILD_SHARED_LIBS)
+ add_definitions(-DOPENEXR_DLL)
+ endif()
Expand Down
34 changes: 21 additions & 13 deletions ports/devil/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,30 @@ vcpkg_from_github(
0006-fix-ilut-header.patch
)

file(REMOVE ${SOURCE_PATH}/DevIL/src-IL/cmake/FindOpenEXR.cmake)
file(REMOVE "${SOURCE_PATH}/DevIL/src-IL/cmake/FindOpenEXR.cmake")

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
INVERTED_FEATURES
libpng IL_NO_PNG
tiff IL_NO_TIF
libjpeg IL_NO_JPG
openexr IL_NO_EXR
jasper IL_NO_JP2
lcms IL_NO_LCMS
libpng IL_NO_PNG
tiff IL_NO_TIF
libjpeg IL_NO_JPG
openexr IL_NO_EXR
jasper IL_NO_JP2
lcms IL_NO_LCMS
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/DevIL
PREFER_NINJA
if(NOT IL_NO_EXR)
vcpkg_replace_string("${SOURCE_PATH}/DevIL/src-IL/include/il_exr.h"
"Imf::Int64" "uint64_t"
)
vcpkg_replace_string("${SOURCE_PATH}/DevIL/src-IL/src/il_exr.cpp"
"Imf::Int64" "uint64_t"
)
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/DevIL"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
${FEATURE_OPTIONS}
Expand All @@ -38,12 +46,12 @@ vcpkg_configure_cmake(
-DIL_USE_DXTC_SQUISH=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
11 changes: 9 additions & 2 deletions ports/devil/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
"name": "devil",
"version": "1.8.0",
"port-version": 8,
"port-version": 9,
"description": "A full featured cross-platform image library",
"homepage": "https://github.com/DentonW/DevIL",
"license": "LGPL-2.1",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
],
"default-features": [
"jasper",
"lcms",
Expand Down Expand Up @@ -38,7 +45,7 @@
]
},
"openexr": {
"description": " Use openexr",
"description": "Use OpenEXR for .exr support",
"dependencies": [
"openexr"
]
Expand Down
5 changes: 4 additions & 1 deletion ports/freeimage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ find_package(WebP CONFIG REQUIRED)
find_package(JXR REQUIRED)
find_package(LibRaw REQUIRED)
find_package(OpenEXR REQUIRED)
find_package(Imath REQUIRED)

option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(INSTALL_HEADERS "Install the development headers" ON)
Expand Down Expand Up @@ -107,7 +108,8 @@ target_link_libraries(FreeImage ${ZLIB_LIBRARIES}
WebP::webp WebP::webpdemux WebP::libwebpmux WebP::webpdecoder
${JXR_LIBRARIES}
${LibRaw_LIBRARIES}
OpenEXR::IlmImf)
OpenEXR::OpenEXR
Imath::Imath)

target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS})

Expand Down Expand Up @@ -153,6 +155,7 @@ find_dependency(WebP CONFIG)
find_dependency(JXR)
find_dependency(LibRaw)
find_dependency(OpenEXR)
find_dependency(Imath)
include(\"\${CMAKE_CURRENT_LIST_DIR}/freeimage-targets.cmake\")
")

Expand Down
32 changes: 30 additions & 2 deletions ports/freeimage/use-external-openexr.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,38 @@ index b286430..82b3b72 100644
+#include <OpenEXR/ImfRgba.h>
+#include <OpenEXR/ImfArray.h>
+#include <OpenEXR/ImfPreviewImage.h>
+#include <OpenEXR/half.h>
+#include <Imath/half.h>


// ==========================================================
@@ -66,11 +66,11 @@ public:
return ((unsigned)n != _io->read_proc(c, 1, n, _handle));
}

- virtual Imath::Int64 tellg() {
+ virtual uint64_t tellg() {
return _io->tell_proc(_handle);
}

- virtual void seekg(Imath::Int64 pos) {
+ virtual void seekg(uint64_t pos) {
_io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
}

@@ -100,11 +100,11 @@ public:
}
}

- virtual Imath::Int64 tellp() {
+ virtual uint64_t tellp() {
return _io->tell_proc(_handle);
}

- virtual void seekp(Imath::Int64 pos) {
+ virtual void seekp(uint64_t pos) {
_io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
}
};
diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
index 562fdd7..ce12649 100644
--- a/Source/FreeImage/PluginTIFF.cpp
Expand All @@ -38,7 +66,7 @@ index 562fdd7..ce12649 100644
#include <tiffio.h>
#include "../Metadata/FreeImageTag.h"
-#include "../OpenEXR/Half/half.h"
+#include <OpenEXR/half.h>
+#include <Imath/half.h>

#include "FreeImageIO.h"
#include "PSDParser.h"
4 changes: 3 additions & 1 deletion ports/freeimage/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "freeimage",
"version": "3.18.0",
"port-version": 22,
"port-version": 23,
"description": "Support library for graphics image formats",
"homepage": "https://sourceforge.net/projects/freeimage/",
"license": "GPL-2.0-only OR GPL-3.0-only OR FreeImage",
"dependencies": [
"imath",
"jxrlib",
"libjpeg-turbo",
"libpng",
Expand Down
11 changes: 11 additions & 0 deletions ports/ogre/fix-dependency.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ index 2ae0b66..e6c55cd 100644
macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" FALSE "" "")

# Find X11
@@ -296,8 +296,8 @@
endif ()

# OpenEXR
-find_package(OpenEXR)
-macro_log_feature(OPENEXR_FOUND "OpenEXR" "Load High dynamic range images" "http://www.openexr.com/" FALSE "" "")
+find_package(OpenEXR CONFIG)
+macro_log_feature(OpenEXR_FOUND "OpenEXR" "Load High dynamic range images" "http://www.openexr.com/" FALSE "" "")

# Python
set(Python_ADDITIONAL_VERSIONS 3.4) # allows using python3 on Ubuntu 14.04
@@ -310,11 +310,11 @@ find_package(SWIG 3.0.8 QUIET)
macro_log_feature(SWIG_FOUND "SWIG" "Language bindings (Python, Java, C#) for OGRE" "http://www.swig.org/" FALSE "" "")

Expand Down
13 changes: 13 additions & 0 deletions ports/ogre/fix-openexr-includes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/PlugIns/EXRCodec/src/OgreEXRCodec.cpp b/PlugIns/EXRCodec/src/OgreEXRCodec.cpp
--- a/PlugIns/EXRCodec/src/OgreEXRCodec.cpp
+++ b/PlugIns/EXRCodec/src/OgreEXRCodec.cpp
@@ -42,6 +42,9 @@
#include <ImfStringAttribute.h>
#include <ImfMatrixAttribute.h>
#include <ImfArray.h>
+#include <ImfHeader.h>
+#include <ImfFrameBuffer.h>
+#include <Imath/ImathBox.h>

using namespace Imath;
using namespace Imf;
1 change: 1 addition & 0 deletions ports/ogre/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ vcpkg_from_github(
toolchain_fixes.patch
fix-dependency.patch
fix-findimgui.patch
fix-openexr-includes.patch
disable-dependency-qt.patch
)

Expand Down
21 changes: 15 additions & 6 deletions ports/ogre/toolchain_fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,25 @@ index 1602572..9fddbe7 100644
execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT)
string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
else()
@@ -360,7 +360,7 @@ set(OGRE_CONFIG_THREAD_PROVIDER "std" CACHE STRING
)
set_property(CACHE OGRE_CONFIG_THREAD_PROVIDER PROPERTY STRINGS boost poco tbb std)
cmake_dependent_option(OGRE_BUILD_PLUGIN_FREEIMAGE "Build FreeImage codec." TRUE "FreeImage_FOUND" FALSE)
-cmake_dependent_option(OGRE_BUILD_PLUGIN_EXRCODEC "Build EXR Codec plugin" TRUE "OPENEXR_FOUND;" FALSE)
+cmake_dependent_option(OGRE_BUILD_PLUGIN_EXRCODEC "Build EXR Codec plugin" TRUE "OpenEXR_FOUND;" FALSE)
option(OGRE_BUILD_PLUGIN_STBI "Enable STBI image codec." TRUE)
option(OGRE_CONFIG_ENABLE_MESHLOD "Enable Mesh Lod." TRUE)
option(OGRE_CONFIG_ENABLE_DDS "Build DDS codec." TRUE)
diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt
index e9c936a..bb8747e 100644
--- a/PlugIns/EXRCodec/CMakeLists.txt
+++ b/PlugIns/EXRCodec/CMakeLists.txt
@@ -16,7 +16,7 @@ target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES})
@@ -12,7 +12,7 @@
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

add_library(Codec_EXR ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
-target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES})
+target_link_libraries(Codec_EXR OgreMain OpenEXR::OpenEXR)
target_include_directories(Codec_EXR PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
$<INSTALL_INTERFACE:include/OGRE/Plugins/EXRCodec>)
-target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR")
+target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}")

ogre_config_framework(Codec_EXR)
ogre_config_plugin(Codec_EXR)
2 changes: 1 addition & 1 deletion ports/ogre/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ogre",
"version": "1.12.9",
"port-version": 7,
"port-version": 8,
"description": "3D Object-Oriented Graphics Rendering Engine",
"homepage": "https://github.com/OGRECave/ogre",
"license": "MIT",
Expand Down
87 changes: 0 additions & 87 deletions ports/openexr/0001-remove_find_package_macro.patch

This file was deleted.

Loading