diff --git a/Remove_second_call_to_eXif.patch b/Remove_second_call_to_eXif.patch new file mode 100644 index 0000000000000000000000000000000000000000..5fe12aaf810d7436c807a275226aa080f85b3054 --- /dev/null +++ b/Remove_second_call_to_eXif.patch @@ -0,0 +1,116 @@ +diff -Npur opencv-4.5.2/3rdparty/libpng/pngget.c opencv-4.5.2-new/3rdparty/libpng/pngget.c +--- opencv-4.5.2/3rdparty/libpng/pngget.c 2021-04-02 19:23:54.000000000 +0800 ++++ opencv-4.5.2-new/3rdparty/libpng/pngget.c 2021-11-25 14:35:27.196968483 +0800 +@@ -1151,7 +1151,7 @@ png_get_unknown_chunks(png_const_structr + + #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte PNGAPI +-png_get_rgb_to_gray_status (png_const_structrp png_ptr) ++png_get_rgb_to_gray_status(png_const_structrp png_ptr) + { + return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0); + } +@@ -1192,27 +1192,27 @@ png_get_compression_buffer_size(png_cons + /* These functions were added to libpng 1.2.6 and were enabled + * by default in libpng-1.4.0 */ + png_uint_32 PNGAPI +-png_get_user_width_max (png_const_structrp png_ptr) ++png_get_user_width_max(png_const_structrp png_ptr) + { + return (png_ptr ? png_ptr->user_width_max : 0); + } + + png_uint_32 PNGAPI +-png_get_user_height_max (png_const_structrp png_ptr) ++png_get_user_height_max(png_const_structrp png_ptr) + { + return (png_ptr ? png_ptr->user_height_max : 0); + } + + /* This function was added to libpng 1.4.0 */ + png_uint_32 PNGAPI +-png_get_chunk_cache_max (png_const_structrp png_ptr) ++png_get_chunk_cache_max(png_const_structrp png_ptr) + { + return (png_ptr ? png_ptr->user_chunk_cache_max : 0); + } + + /* This function was added to libpng 1.4.1 */ + png_alloc_size_t PNGAPI +-png_get_chunk_malloc_max (png_const_structrp png_ptr) ++png_get_chunk_malloc_max(png_const_structrp png_ptr) + { + return (png_ptr ? png_ptr->user_chunk_malloc_max : 0); + } +@@ -1221,13 +1221,13 @@ png_get_chunk_malloc_max (png_const_stru + /* These functions were added to libpng 1.4.0 */ + #ifdef PNG_IO_STATE_SUPPORTED + png_uint_32 PNGAPI +-png_get_io_state (png_const_structrp png_ptr) ++png_get_io_state(png_const_structrp png_ptr) + { + return png_ptr->io_state; + } + + png_uint_32 PNGAPI +-png_get_io_chunk_type (png_const_structrp png_ptr) ++png_get_io_chunk_type(png_const_structrp png_ptr) + { + return png_ptr->chunk_name; + } +diff -Npur opencv-4.5.2/3rdparty/libpng/pngrutil.c opencv-4.5.2-new/3rdparty/libpng/pngrutil.c +--- opencv-4.5.2/3rdparty/libpng/pngrutil.c 2021-04-02 19:23:54.000000000 +0800 ++++ opencv-4.5.2-new/3rdparty/libpng/pngrutil.c 2021-11-25 14:32:48.378624600 +0800 +@@ -302,7 +302,6 @@ png_read_buffer(png_structrp png_ptr, pn + if (buffer != NULL && new_size > png_ptr->read_buffer_size) + { + png_ptr->read_buffer = NULL; +- png_ptr->read_buffer = NULL; + png_ptr->read_buffer_size = 0; + png_free(png_ptr, buffer); + buffer = NULL; +diff -Npur opencv-4.5.2/3rdparty/libpng/pngset.c opencv-4.5.2-new/3rdparty/libpng/pngset.c +--- opencv-4.5.2/3rdparty/libpng/pngset.c 2021-04-02 19:23:54.000000000 +0800 ++++ opencv-4.5.2-new/3rdparty/libpng/pngset.c 2021-11-25 14:36:04.705477021 +0800 +@@ -1633,7 +1633,7 @@ png_set_invalid(png_const_structrp png_p + #ifdef PNG_SET_USER_LIMITS_SUPPORTED + /* This function was added to libpng 1.2.6 */ + void PNGAPI +-png_set_user_limits (png_structrp png_ptr, png_uint_32 user_width_max, ++png_set_user_limits(png_structrp png_ptr, png_uint_32 user_width_max, + png_uint_32 user_height_max) + { + /* Images with dimensions larger than these limits will be +@@ -1649,7 +1649,7 @@ png_set_user_limits (png_structrp png_pt + + /* This function was added to libpng 1.4.0 */ + void PNGAPI +-png_set_chunk_cache_max (png_structrp png_ptr, png_uint_32 user_chunk_cache_max) ++png_set_chunk_cache_max(png_structrp png_ptr, png_uint_32 user_chunk_cache_max) + { + if (png_ptr != NULL) + png_ptr->user_chunk_cache_max = user_chunk_cache_max; +@@ -1657,7 +1657,7 @@ png_set_chunk_cache_max (png_structrp pn + + /* This function was added to libpng 1.4.1 */ + void PNGAPI +-png_set_chunk_malloc_max (png_structrp png_ptr, ++png_set_chunk_malloc_max(png_structrp png_ptr, + png_alloc_size_t user_chunk_malloc_max) + { + if (png_ptr != NULL) +diff -Npur opencv-4.5.2/3rdparty/libpng/pngwrite.c opencv-4.5.2-new/3rdparty/libpng/pngwrite.c +--- opencv-4.5.2/3rdparty/libpng/pngwrite.c 2021-04-02 19:23:54.000000000 +0800 ++++ opencv-4.5.2-new/3rdparty/libpng/pngwrite.c 2021-11-25 14:36:38.925928116 +0800 +@@ -438,11 +438,6 @@ png_write_end(png_structrp png_ptr, png_ + } + #endif + +-#ifdef PNG_WRITE_eXIf_SUPPORTED +- if ((info_ptr->valid & PNG_INFO_eXIf) != 0) +- png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif); +-#endif +- + #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT); + #endif diff --git a/opencv.spec b/opencv.spec index 556925842a2979d50e057b6100a0815417d26d45..4b9c169bdb70cf1c5d6b25c16e1b26b159a5372c 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,6 @@ Name: opencv Version: 4.5.2 -Release: 4 +Release: 5 Summary: OpenCV means IntelĀ® Open Source Computer Vision Library. License: Apache-2.0 URL: https://github.com/opencv/opencv @@ -14,6 +14,7 @@ Source6: opencv_extra-4.5.2.tar.gz.ae Patch1: Fix-OpenCV-build-with-OpenEXR-before-2.2.0.patch Patch2: Fix_compilation_of_copy_assignment_operators_with_GCC.patch Patch3: Repair_clang_abi.patch +Patch4: Remove_second_call_to_eXif.patch BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf BuildRequires: cmake BuildRequires: python3-numpy python3-devel @@ -87,6 +88,9 @@ make install DESTDIR=%{buildroot} /usr/lib/python3.8/site-packages/cv2/* %changelog +* Thu Nov 25 2021 shenwei - 4.5.2-5 +- Remove_second_call_to_eXif + * Wed Nov 17 2021 shenwei - 4.5.2-4 - repair Clang ABI