File ojph-0.23.patch of Package openexr

Index: openexr-3.4.0/cmake/OpenEXRSetup.cmake
===================================================================
--- openexr-3.4.0.orig/cmake/OpenEXRSetup.cmake
+++ openexr-3.4.0/cmake/OpenEXRSetup.cmake
@@ -280,6 +280,9 @@ if (NOT OPENEXR_FORCE_INTERNAL_OPENJPH)
     endif()
   endif()
 endif()
+if(openjph_VERSION VERSION_GREATER_EQUAL "0.23.0")
+  add_compile_definitions("OPENJPH_NEWER_THAN_0_23")
+endif()
 
 if(NOT EXR_OPENJPH_LIB)
   # Using internal OpenJPH
Index: openexr-3.4.0/src/lib/OpenEXRCore/internal_ht.cpp
===================================================================
--- openexr-3.4.0.orig/src/lib/OpenEXRCore/internal_ht.cpp
+++ openexr-3.4.0/src/lib/OpenEXRCore/internal_ht.cpp
@@ -7,12 +7,21 @@
 #include <string>
 #include <fstream>
 
+#ifdef OPENJPH_NEWER_THAN_0_23
+#include <openjph/ojph_arch.h>
+#include <openjph/ojph_file.h>
+#include <openjph/ojph_params.h>
+#include <openjph/ojph_mem.h>
+#include <openjph/ojph_codestream.h>
+#include <openjph/ojph_message.h>
+#else
 #include <ojph_arch.h>
 #include <ojph_file.h>
 #include <ojph_params.h>
 #include <ojph_mem.h>
 #include <ojph_codestream.h>
 #include <ojph_message.h>
+#endif
 
 #include "openexr_decode.h"
 #include "openexr_encode.h"
openSUSE Build Service is sponsored by