]> git.pld-linux.org Git - packages/OpenSceneGraph.git/blob - OpenSceneGraph-openexr3.patch
- adjusted patch for OpenCASCADE 7.8.0 libraries; release 3
[packages/OpenSceneGraph.git] / OpenSceneGraph-openexr3.patch
1 diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeLists.txt OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeLists.txt
2 --- OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeLists.txt  2022-11-13 19:16:21.608241542 +0100
3 +++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeLists.txt      2022-11-13 19:16:22.285241557 +0100
4 @@ -742,7 +742,19 @@ ELSE()
5      FIND_PACKAGE(ilmbase)
6      FIND_PACKAGE(Inventor)
7      FIND_PACKAGE(Jasper)
8 -    FIND_PACKAGE(OpenEXR)
9 +    FIND_PACKAGE(Imath CONFIG)
10 +    IF(TARGET Imath::Imath)
11 +    FIND_PACKAGE(OpenEXR REQUIRED CONFIG)
12 +        SET(OPENEXR_LIBRARIES OpenEXR::OpenEXR Imath::Imath)
13 +        SET(OPENEXR_LIBRARIES_VARS "${OPENEXR_LIBRARIES}")
14 +            GET_TARGET_PROPERTY(OPENEXR_INCLUDE_DIR OpenEXR::OpenEXRConfig INTERFACE_INCLUDE_DIRECTORIES)
15 +            GET_TARGET_PROPERTY(IMATH_INCLUDE_DIR Imath::ImathConfig INTERFACE_INCLUDE_DIRECTORIES)
16 +            LIST(APPEND OPENEXR_INCLUDE_DIR ${IMATH_INCLUDE_DIR})
17 +            MESSAGE(STATUS "OpenEXR/Imath libraries: " ${OPENEXR_LIBRARIES})
18 +            SET(OPENEXR_FOUND TRUE)
19 +    ELSE()
20 +        FIND_PACKAGE(OpenEXR)
21 +    ENDIF()
22      FIND_PACKAGE(OpenCascade)
23      FIND_PACKAGE(COLLADA)
24      FIND_PACKAGE(FBX)
25 diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeModules/FindOpenEXR.cmake OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeModules/FindOpenEXR.cmake
26 --- OpenSceneGraph-OpenSceneGraph-3.6.5/CMakeModules/FindOpenEXR.cmake  2020-01-31 12:03:07.000000000 +0100
27 +++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/CMakeModules/FindOpenEXR.cmake      2022-11-13 19:16:22.285241557 +0100
28 @@ -23,6 +23,7 @@ FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/Im
29      /opt/include
30      /usr/freeware/include
31  )
32 +SET(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDED_DIR}/OpenEXR)
33  
34  # Macro to find exr libraries (deduplicating search paths)
35  # example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf)
36 diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/CMakeLists.txt OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/CMakeLists.txt
37 --- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/CMakeLists.txt       2020-01-31 12:03:07.000000000 +0100
38 +++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/CMakeLists.txt   2022-11-13 19:16:22.285241557 +0100
39 @@ -12,3 +12,8 @@ ENDIF()
40  
41  #### end var setup  ###
42  SETUP_PLUGIN(exr)
43 +
44 +# Force linking with OpenEXR/Imath until upstream fixes their config.
45 +if(TARGET Imath::Imath)
46 +    target_link_libraries(osgdb_exr OpenEXR::OpenEXR Imath::Imath)
47 +endif()
48 diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/ReaderWriterEXR.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/ReaderWriterEXR.cpp
49 --- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/exr/ReaderWriterEXR.cpp  2020-01-31 12:03:07.000000000 +0100
50 +++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/exr/ReaderWriterEXR.cpp      2022-11-13 19:16:22.285241557 +0100
51 @@ -41,11 +41,11 @@ public:
52        {
53          return _inStream->read(c,n).good();
54        };
55 -      virtual Int64    tellg ()
56 +      virtual uint64_t    tellg ()
57        {
58            return _inStream->tellg();
59        };
60 -      virtual void    seekg (Int64 pos)
61 +      virtual void    seekg (uint64_t pos)
62        {
63          _inStream->seekg(pos);
64        };
65 @@ -69,11 +69,11 @@ public:
66        {
67          _outStream->write(c,n);
68        };
69 -      virtual Int64    tellp ()
70 +      virtual uint64_t    tellp ()
71        {
72          return _outStream->tellp();
73        };
74 -      virtual void seekp (Int64 pos)
75 +      virtual void seekp (uint64_t pos)
76        {
77          _outStream->seekp(pos);
78        };
This page took 0.039193 seconds and 3 git commands to generate.