archrelease: copy trunk to extra-x86_64
[arch-packages.git] / krita / repos / extra-x86_64 / krita-openexr3.patch
blob31efb83082441ba86fbea60aafc58099c4efe320
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 4e8f456492..9a3ae863ec 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -649,15 +649,20 @@ set_package_properties(ZLIB PROPERTIES
6 PURPOSE "Optionally used by the G'Mic and the PSD plugins")
7 macro_bool_to_01(ZLIB_FOUND HAVE_ZLIB)
9 -find_package(OpenEXR)
10 +find_package(OpenEXR 3.0 CONFIG QUIET)
11 +if(TARGET OpenEXR::OpenEXR)
12 + set(OPENEXR_LIBRARIES OpenEXR::OpenEXR)
13 +else()
14 + find_package(OpenEXR)
15 +endif()
16 set_package_properties(OpenEXR PROPERTIES
17 DESCRIPTION "High dynamic-range (HDR) image file format"
18 URL "https://www.openexr.com"
19 TYPE OPTIONAL
20 PURPOSE "Required by the Krita OpenEXR filter")
21 -macro_bool_to_01(OPENEXR_FOUND HAVE_OPENEXR)
22 +macro_bool_to_01(OpenEXR_FOUND HAVE_OPENEXR)
23 set(LINK_OPENEXR_LIB)
24 -if(OPENEXR_FOUND)
25 +if(OpenEXR_FOUND)
26 include_directories(SYSTEM ${OPENEXR_INCLUDE_DIRS})
27 set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
28 add_definitions(${OPENEXR_DEFINITIONS})
29 diff --git a/libs/image/CMakeLists.txt b/libs/image/CMakeLists.txt
30 index e9ff363df3..59e567fa04 100644
31 --- a/libs/image/CMakeLists.txt
32 +++ b/libs/image/CMakeLists.txt
33 @@ -367,7 +367,7 @@ if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
34 endif()
35 endif()
37 -if(OPENEXR_FOUND)
38 +if(OpenEXR_FOUND)
39 target_link_libraries(kritaimage PUBLIC ${OPENEXR_LIBRARIES})
40 endif()
42 diff --git a/libs/pigment/CMakeLists.txt b/libs/pigment/CMakeLists.txt
43 index 3e8bcf9e25..d55fd8714f 100644
44 --- a/libs/pigment/CMakeLists.txt
45 +++ b/libs/pigment/CMakeLists.txt
46 @@ -14,7 +14,7 @@ include_directories(
48 set(FILE_OPENEXR_SOURCES)
49 set(LINK_OPENEXR_LIB)
50 -if(OPENEXR_FOUND)
51 +if(OpenEXR_FOUND)
52 include_directories(SYSTEM ${OPENEXR_INCLUDE_DIRS})
53 set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
54 add_definitions(${OPENEXR_DEFINITIONS})
55 diff --git a/plugins/color/lcms2engine/CMakeLists.txt b/plugins/color/lcms2engine/CMakeLists.txt
56 index 86b83710dc..801783c1f3 100644
57 --- a/plugins/color/lcms2engine/CMakeLists.txt
58 +++ b/plugins/color/lcms2engine/CMakeLists.txt
59 @@ -28,7 +28,7 @@ include_directories(
60 ${CMAKE_CURRENT_SOURCE_DIR}/colorprofiles
63 -if (HAVE_LCMS24 AND OPENEXR_FOUND)
64 +if (HAVE_LCMS24 AND OpenEXR_FOUND)
65 include_directories(
66 ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/gray_f16
67 ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/rgb_f16
68 @@ -38,7 +38,7 @@ endif ()
70 set(FILE_OPENEXR_SOURCES)
71 set(LINK_OPENEXR_LIB)
72 -if(OPENEXR_FOUND)
73 +if(OpenEXR_FOUND)
74 include_directories(SYSTEM ${OPENEXR_INCLUDE_DIRS})
75 set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES})
76 add_definitions(${OPENEXR_DEFINITIONS})
77 @@ -77,7 +77,7 @@ set ( lcmsengine_SRCS
78 LcmsEnginePlugin.cpp
81 -if (HAVE_LCMS24 AND OPENEXR_FOUND)
82 +if (HAVE_LCMS24 AND OpenEXR_FOUND)
83 set ( lcmsengine_SRCS
84 ${lcmsengine_SRCS}
85 colorspaces/gray_f16/GrayF16ColorSpace.cpp
86 diff --git a/plugins/color/lcms2engine/tests/CMakeLists.txt b/plugins/color/lcms2engine/tests/CMakeLists.txt
87 index ae69220698..8c5fe5d061 100644
88 --- a/plugins/color/lcms2engine/tests/CMakeLists.txt
89 +++ b/plugins/color/lcms2engine/tests/CMakeLists.txt
90 @@ -11,7 +11,7 @@ include_directories( ../colorspaces/cmyk_u16
91 ../colorprofiles
94 -if(OPENEXR_FOUND)
95 +if(OpenEXR_FOUND)
96 include_directories(SYSTEM ${OPENEXR_INCLUDE_DIRS})
97 endif()
98 include_directories( ${LCMS2_INCLUDE_DIR} )
99 diff --git a/plugins/impex/CMakeLists.txt b/plugins/impex/CMakeLists.txt
100 index 63df1fd69a..c94674b381 100644
101 --- a/plugins/impex/CMakeLists.txt
102 +++ b/plugins/impex/CMakeLists.txt
103 @@ -19,7 +19,7 @@ if(PNG_FOUND)
104 add_subdirectory(csv)
105 endif()
107 -if(OPENEXR_FOUND)
108 +if(OpenEXR_FOUND)
109 add_subdirectory(exr)
110 endif()
112 diff --git a/plugins/impex/exr/exr_converter.cc b/plugins/impex/exr/exr_converter.cc
113 index f63ab73cd9..d620062594 100644
114 --- a/plugins/impex/exr/exr_converter.cc
115 +++ b/plugins/impex/exr/exr_converter.cc
116 @@ -11,6 +11,8 @@
118 #include <ImfAttribute.h>
119 #include <ImfChannelList.h>
120 +#include <ImfFrameBuffer.h>
121 +#include <ImfHeader.h>
122 #include <ImfInputFile.h>
123 #include <ImfOutputFile.h>
125 diff --git a/plugins/impex/raw/CMakeLists.txt b/plugins/impex/raw/CMakeLists.txt
126 index 71cb5b355c..f65bc770a5 100644
127 --- a/plugins/impex/raw/CMakeLists.txt
128 +++ b/plugins/impex/raw/CMakeLists.txt
129 @@ -1,6 +1,6 @@
130 add_subdirectory(tests)
132 -if(OPENEXR_FOUND)
133 +if(OpenEXR_FOUND)
134 include_directories(${OPENEXR_INCLUDE_DIRS})
135 endif()
136 include_directories(${LibRaw_INCLUDE_DIR})