From 4846f8c211515546d441d3305a50138614987b72 Mon Sep 17 00:00:00 2001 From: Robert Schiele Date: Fri, 5 May 2023 20:39:46 +0200 Subject: [PATCH 1/2] add missing includes of (PR #10499) --- deps/OpenEXR/OpenEXR.cmake | 3 ++- deps/OpenEXR/OpenEXR.patch | 36 +++++++++++++++++++++++++++++++++ src/libslic3r/ExtrusionRole.hpp | 1 + src/libslic3r/PNGReadWrite.hpp | 1 + 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 deps/OpenEXR/OpenEXR.patch diff --git a/deps/OpenEXR/OpenEXR.cmake b/deps/OpenEXR/OpenEXR.cmake index 046223fed..094965d04 100644 --- a/deps/OpenEXR/OpenEXR.cmake +++ b/deps/OpenEXR/OpenEXR.cmake @@ -4,6 +4,7 @@ prusaslicer_add_cmake_project(OpenEXR URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de DEPENDS ${ZLIB_PKG} GIT_TAG v2.5.5 + PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/OpenEXR.patch CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_TESTING=OFF @@ -14,4 +15,4 @@ prusaslicer_add_cmake_project(OpenEXR if (MSVC) add_debug_dep(dep_OpenEXR) -endif () \ No newline at end of file +endif () diff --git a/deps/OpenEXR/OpenEXR.patch b/deps/OpenEXR/OpenEXR.patch new file mode 100644 index 000000000..22adbd277 --- /dev/null +++ b/deps/OpenEXR/OpenEXR.patch @@ -0,0 +1,36 @@ +diff --git a/OpenEXR/IlmImf/ImfDwaCompressor.cpp b/OpenEXR/IlmImf/ImfDwaCompressor.cpp +index 59d1d5d1..585a3e65 100644 +--- a/OpenEXR/IlmImf/ImfDwaCompressor.cpp ++++ b/OpenEXR/IlmImf/ImfDwaCompressor.cpp +@@ -159,6 +159,7 @@ + #include + + #include ++#include + + + // Windows specific addition to prevent the indirect import of the redefined min/max macros +diff --git a/OpenEXR/IlmImf/ImfHuf.cpp b/OpenEXR/IlmImf/ImfHuf.cpp +index 271849b7..165fac58 100644 +--- a/OpenEXR/IlmImf/ImfHuf.cpp ++++ b/OpenEXR/IlmImf/ImfHuf.cpp +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + + + using namespace std; +diff --git a/OpenEXR/IlmImf/ImfMisc.cpp b/OpenEXR/IlmImf/ImfMisc.cpp +index d2c84787..4b487940 100644 +--- a/OpenEXR/IlmImf/ImfMisc.cpp ++++ b/OpenEXR/IlmImf/ImfMisc.cpp +@@ -40,6 +40,7 @@ + // + //----------------------------------------------------------------------------- + ++#include + #include + #include + #include diff --git a/src/libslic3r/ExtrusionRole.hpp b/src/libslic3r/ExtrusionRole.hpp index 5952d3fc5..986c139a2 100644 --- a/src/libslic3r/ExtrusionRole.hpp +++ b/src/libslic3r/ExtrusionRole.hpp @@ -5,6 +5,7 @@ #include #include +#include namespace Slic3r { diff --git a/src/libslic3r/PNGReadWrite.hpp b/src/libslic3r/PNGReadWrite.hpp index 01e1f4745..399c62243 100644 --- a/src/libslic3r/PNGReadWrite.hpp +++ b/src/libslic3r/PNGReadWrite.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace Slic3r { namespace png { From 0bfd95f2df669a50d288b174001f4fcd2adad177 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 1 Jun 2023 12:14:15 +0200 Subject: [PATCH 2/2] Fixup of previous commit --- deps/OpenEXR/OpenEXR.cmake | 2 +- deps/OpenEXR/OpenEXR.patch | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/deps/OpenEXR/OpenEXR.cmake b/deps/OpenEXR/OpenEXR.cmake index 094965d04..dc1d2fab1 100644 --- a/deps/OpenEXR/OpenEXR.cmake +++ b/deps/OpenEXR/OpenEXR.cmake @@ -4,7 +4,7 @@ prusaslicer_add_cmake_project(OpenEXR URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de DEPENDS ${ZLIB_PKG} GIT_TAG v2.5.5 - PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/OpenEXR.patch + PATCH_COMMAND COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/OpenEXR.patch CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_TESTING=OFF diff --git a/deps/OpenEXR/OpenEXR.patch b/deps/OpenEXR/OpenEXR.patch index 22adbd277..b9f9f1c28 100644 --- a/deps/OpenEXR/OpenEXR.patch +++ b/deps/OpenEXR/OpenEXR.patch @@ -1,7 +1,5 @@ -diff --git a/OpenEXR/IlmImf/ImfDwaCompressor.cpp b/OpenEXR/IlmImf/ImfDwaCompressor.cpp -index 59d1d5d1..585a3e65 100644 ---- a/OpenEXR/IlmImf/ImfDwaCompressor.cpp -+++ b/OpenEXR/IlmImf/ImfDwaCompressor.cpp +--- ../OpenEXR-orig/OpenEXR/IlmImf/ImfDwaCompressor.cpp 2021-02-12 17:56:19.000000000 +0100 ++++ ./OpenEXR/IlmImf/ImfDwaCompressor.cpp 2023-06-01 13:21:32.666695400 +0200 @@ -159,6 +159,7 @@ #include @@ -10,10 +8,8 @@ index 59d1d5d1..585a3e65 100644 // Windows specific addition to prevent the indirect import of the redefined min/max macros -diff --git a/OpenEXR/IlmImf/ImfHuf.cpp b/OpenEXR/IlmImf/ImfHuf.cpp -index 271849b7..165fac58 100644 ---- a/OpenEXR/IlmImf/ImfHuf.cpp -+++ b/OpenEXR/IlmImf/ImfHuf.cpp +--- ../OpenEXR-orig/OpenEXR/IlmImf/ImfHuf.cpp 2021-02-12 17:56:19.000000000 +0100 ++++ ./OpenEXR/IlmImf/ImfHuf.cpp 2023-06-01 13:21:53.018583400 +0200 @@ -53,6 +53,7 @@ #include #include @@ -22,10 +18,8 @@ index 271849b7..165fac58 100644 using namespace std; -diff --git a/OpenEXR/IlmImf/ImfMisc.cpp b/OpenEXR/IlmImf/ImfMisc.cpp -index d2c84787..4b487940 100644 ---- a/OpenEXR/IlmImf/ImfMisc.cpp -+++ b/OpenEXR/IlmImf/ImfMisc.cpp +--- ../OpenEXR-orig/OpenEXR/IlmImf/ImfMisc.cpp 2021-02-12 17:56:19.000000000 +0100 ++++ ./OpenEXR/IlmImf/ImfMisc.cpp 2023-06-01 13:22:15.777480000 +0200 @@ -40,6 +40,7 @@ // //-----------------------------------------------------------------------------