diff --git a/Fix_compilation_of_copy_assignment_operators_with_GCC.patch b/Fix_compilation_of_copy_assignment_operators_with_GCC.patch index 4d6a48cec26809d07752c6252ad6c79a19e178c3..ca13ff69c87affddb499533322994da904f6c66b 100644 --- a/Fix_compilation_of_copy_assignment_operators_with_GCC.patch +++ b/Fix_compilation_of_copy_assignment_operators_with_GCC.patch @@ -15,7 +15,7 @@ diff -Npur opencv-4.5.2/modules/core/include/opencv2/core/types.hpp opencv-4.5.2 Point_(const Size_<_Tp>& sz); Point_(const Vec<_Tp, 2>& v); -+#if (defined(__GNUC__) && __GNUC__ < 5) // GCC 4.x bug. Details: https://github.com/opencv/opencv/pull/20837 ++#if (defined(__GNUC__) && __GNUC__ < 5) + Point_& operator = (const Point_& pt); + Point_& operator = (Point_&& pt) CV_NOEXCEPT = default; +#elif OPENCV_ABI_COMPATIBILITY < 500 diff --git a/Repair_clang_abi.patch b/Repair_clang_abi.patch new file mode 100644 index 0000000000000000000000000000000000000000..e05dd088182386c47888536a4213d3e99a206465 --- /dev/null +++ b/Repair_clang_abi.patch @@ -0,0 +1,39 @@ +diff -Npur opencv-4.5.2/modules/core/include/opencv2/core/types.hpp opencv-4.5.2-new/modules/core/include/opencv2/core/types.hpp +--- opencv-4.5.2/modules/core/include/opencv2/core/types.hpp 2021-11-17 10:30:22.631203192 +0800 ++++ opencv-4.5.2-new/modules/core/include/opencv2/core/types.hpp 2021-11-17 10:34:53.117761924 +0800 +@@ -162,7 +162,7 @@ public: + //! default constructor + Point_(); + Point_(_Tp _x, _Tp _y); +-#if (defined(__GNUC__) && __GNUC__ < 5) ++#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__) + Point_(const Point_& pt); + Point_(Point_&& pt) CV_NOEXCEPT = default; + #elif OPENCV_ABI_COMPATIBILITY < 500 +@@ -172,7 +172,7 @@ public: + Point_(const Size_<_Tp>& sz); + Point_(const Vec<_Tp, 2>& v); + +-#if (defined(__GNUC__) && __GNUC__ < 5) ++#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__) + Point_& operator = (const Point_& pt); + Point_& operator = (Point_&& pt) CV_NOEXCEPT = default; + #elif OPENCV_ABI_COMPATIBILITY < 500 +@@ -1186,7 +1186,7 @@ template inline + Point_<_Tp>::Point_(_Tp _x, _Tp _y) + : x(_x), y(_y) {} + +-#if (defined(__GNUC__) && __GNUC__ < 5) ++#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__) + template inline + Point_<_Tp>::Point_(const Point_& pt) + : x(pt.x), y(pt.y) {} +@@ -1208,7 +1208,7 @@ template inline + Point_<_Tp>::Point_(const Vec<_Tp,2>& v) + : x(v[0]), y(v[1]) {} + +-#if (defined(__GNUC__) && __GNUC__ < 5) ++#if (defined(__GNUC__) && __GNUC__ < 5) && !defined(__clang__) + template inline + Point_<_Tp>& Point_<_Tp>::operator = (const Point_& pt) + { diff --git a/opencv.spec b/opencv.spec index dfbcdcfa280ce4a7cdc21b6c555cd7764e96d7db..b838d3ea171dedbef5117dd2c5ecd10ef255f15b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -1,6 +1,6 @@ Name: opencv Version: 4.5.2 -Release: 3 +Release: 4 Summary: OpenCV means IntelĀ® Open Source Computer Vision Library. License: Apache-2.0 URL: https://github.com/opencv/opencv @@ -13,6 +13,7 @@ Source5: opencv_extra-4.5.2.tar.gz.ad 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 BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf BuildRequires: cmake @@ -72,6 +73,9 @@ make install DESTDIR=%{buildroot} %exclude /usr/share/* %changelog +* Wed Nov 17 2021 shenwei - 4.5.2-4 +- repair Clang ABI + * Sat Nov 13 2021 shenwei - 4.5.2-3 - fix compilation of copy ctors/assignment operators with GCC 4.x