- up to 3.4.8, files need update
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 31 Oct 2019 08:23:46 +0000 (09:23 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 31 Oct 2019 08:23:46 +0000 (09:23 +0100)
build.patch [deleted file]
cmake-install-path.patch [deleted file]
cplusplus.patch [deleted file]
ix86-pause.patch [deleted file]
opencv.spec
python-install.patch [new file with mode: 0644]

diff --git a/build.patch b/build.patch
deleted file mode 100644 (file)
index 6d0098e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- opencv-3.4.1/modules/python/src2/cv2.cpp~  2018-02-23 09:38:33.000000000 +0100
-+++ opencv-3.4.1/modules/python/src2/cv2.cpp   2018-07-06 19:10:56.563061072 +0200
-@@ -886,7 +886,7 @@ bool pyopencv_to(PyObject* obj, String&
-     (void)name;
-     if(!obj || obj == Py_None)
-         return true;
--    char* str = PyString_AsString(obj);
-+    char* str = (char *)PyString_AsString(obj);
-     if(!str)
-         return false;
-     value = String(str);
diff --git a/cmake-install-path.patch b/cmake-install-path.patch
deleted file mode 100644 (file)
index 930653a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- opencv-2.4.10.1/CMakeLists.txt~    2015-03-09 14:42:05.000000000 +0100
-+++ opencv-2.4.10.1/CMakeLists.txt     2015-03-09 14:50:49.355937198 +0100
-@@ -445,14 +445,7 @@
-     ocv_update(OPENCV_JAR_INSTALL_PATH share/OpenCV/java)
-     ocv_update(OPENCV_OTHER_INSTALL_PATH   share/OpenCV)
--    if(NOT DEFINED OPENCV_CONFIG_INSTALL_PATH)
--      math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
--      if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX)
--        ocv_update(OPENCV_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}/cmake/opencv)
--      else()
--        ocv_update(OPENCV_CONFIG_INSTALL_PATH share/OpenCV)
--      endif()
--    endif()
-+  set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV)
-   endif()
-   ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include")
- endif()
diff --git a/cplusplus.patch b/cplusplus.patch
deleted file mode 100644 (file)
index ccac14e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---- opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h~    2018-02-23 09:38:33.000000000 +0100
-+++ opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h     2018-04-27 22:17:38.423275013 +0200
-@@ -480,7 +480,7 @@
- using std::int64_t;
- using std::uint64_t;
- }
--#else
-+#elif __cplusplus
- #include <stdint.h>
- namespace cv {
- typedef ::int8_t int8_t;
-@@ -492,6 +492,16 @@
- typedef ::int64_t int64_t;
- typedef ::uint64_t uint64_t;
- }
-+#else
-+#include <stdint.h>
-+typedef int8_t int8_t;
-+typedef uint8_t uint8_t;
-+typedef int16_t int16_t;
-+typedef uint16_t uint16_t;
-+typedef int32_t int32_t;
-+typedef uint32_t uint32_t;
-+typedef int64_t int64_t;
-+typedef uint64_t uint64_t;
- #endif
- #endif
---- opencv-3.4.1/modules/highgui/include/opencv2/highgui/highgui_c.h~  2018-02-23 09:38:33.000000000 +0100
-+++ opencv-3.4.1/modules/highgui/include/opencv2/highgui/highgui_c.h   2018-04-30 00:00:01.659113349 +0200
-@@ -136,7 +136,11 @@
- CVAPI(double) cvGetWindowProperty(const char* name, int prop_id);
- /* Get window image rectangle coordinates, width and height */
-+#ifdef __cplusplus
- CVAPI(cv::Rect)cvGetWindowImageRect(const char* name);
-+#else
-+CVAPI(CvRect)cvGetWindowImageRect(const char* name);
-+#endif
- /* display image within window (highgui windows remember their content) */
- CVAPI(void) cvShowImage( const char* name, const CvArr* image );
diff --git a/ix86-pause.patch b/ix86-pause.patch
deleted file mode 100644 (file)
index 1f29f23..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- opencv-3.4.1/modules/core/src/parallel_impl.cpp~   2018-02-23 09:38:33.000000000 +0100
-+++ opencv-3.4.1/modules/core/src/parallel_impl.cpp    2018-04-26 22:46:13.441805476 +0200
-@@ -49,8 +49,10 @@
- DECLARE_CV_PAUSE
- #endif
- #ifndef CV_PAUSE
--#if defined __GNUC__ && (defined __i386__ || defined __x86_64__)
-+#if defined __GNUC__ && defined __x86_64__
- #   define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { _mm_pause(); } } while (0)
-+# elif defined __GNUC__ && defined __i386__
-+#   define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("pause" ::: "memory"); } } while (0)
- # elif defined __GNUC__ && defined __aarch64__
- #   define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("yield" ::: "memory"); } } while (0)
- # elif defined __GNUC__ && defined __arm__
index ead5f18f37f97bba2df301015deac0c7c33e6851..e7ccb4ead14199cb3aa28247410806cc87654542 100644 (file)
@@ -59,8 +59,8 @@
 Summary:       A library of programming functions mainly aimed at real time computer vision
 Summary(pl.UTF-8):     Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
 Name:          opencv
 Summary:       A library of programming functions mainly aimed at real time computer vision
 Summary(pl.UTF-8):     Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
 Name:          opencv
-Version:       3.4.1
-Release:       11
+Version:       3.4.8
+Release:       0.1
 Epoch:         1
 %if %{with unicap} || %{with xine}
 License:       GPL (enforced by used libraries), BSD (opencv itself)
 Epoch:         1
 %if %{with unicap} || %{with xine}
 License:       GPL (enforced by used libraries), BSD (opencv itself)
@@ -69,9 +69,9 @@ License:      BSD
 %endif
 Group:         Libraries
 Source0:       https://github.com/Itseez/opencv/archive/%{version}/%{name}-%{version}.tar.gz
 %endif
 Group:         Libraries
 Source0:       https://github.com/Itseez/opencv/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: a0b7a47899e67b3490ea31edc4f6e8e6
+# Source0-md5: 5aa8240c28c00a7dacdf51698e0ced77
 Source1:       https://github.com/Itseez/opencv_contrib/archive/%{version}/%{name}_contrib-%{version}.tar.gz
 Source1:       https://github.com/Itseez/opencv_contrib/archive/%{version}/%{name}_contrib-%{version}.tar.gz
-# Source1-md5: dd0c63f4185ab8a4829d8154ae382266
+# Source1-md5: 9c9f239364669b3315f9cae12dafb7b7
 # See opencv_contrib-3.4.1/modules/xfeatures2d/cmake/download_boostdesc.cmake
 Source10:      https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
 # Source10-md5:        0ea90e7a8f3f7876d450e4149c97c74f
 # See opencv_contrib-3.4.1/modules/xfeatures2d/cmake/download_boostdesc.cmake
 Source10:      https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
 # Source10-md5:        0ea90e7a8f3f7876d450e4149c97c74f
@@ -99,11 +99,8 @@ Source23:    https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12
 # See opencv_contrib-3.4.1/modules/face/CMakeLists.txt
 Source30:      https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
 # Source30-md5:        7505c44ca4eb54b4ab1e4777cb96ac05
 # See opencv_contrib-3.4.1/modules/face/CMakeLists.txt
 Source30:      https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
 # Source30-md5:        7505c44ca4eb54b4ab1e4777cb96ac05
-Patch0:                ix86-pause.patch
-Patch1:                %{name}-ximea.patch
-Patch2:                cplusplus.patch
-Patch3:                cmake-install-path.patch
-Patch4:                build.patch
+Patch0:                %{name}-ximea.patch
+Patch1:                python-install.patch
 URL:           http://www.opencv.org/
 %{?with_pvapi:BuildRequires:   AVT_GigE_SDK-devel}
 %{?with_opencl:BuildRequires:  OpenCL-devel}
 URL:           http://www.opencv.org/
 %{?with_pvapi:BuildRequires:   AVT_GigE_SDK-devel}
 %{?with_opencl:BuildRequires:  OpenCL-devel}
@@ -329,9 +326,6 @@ Wiązania Pythona 3 do OpenCV.
 
 %patch0 -p1
 %patch1 -p1
 
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
 
 %build
 install -d build/{share/OpenCV/testdata/cv/face,downloads/xfeatures2d}
 
 %build
 install -d build/{share/OpenCV/testdata/cv/face,downloads/xfeatures2d}
@@ -637,8 +631,14 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n python-opencv
 %defattr(644,root,root,755)
 
 %files -n python-opencv
 %defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/cv2.so
+%dir %{py_sitedir}/cv2
+%dir %{py_sitedir}/cv2/python-*
+%attr(755,root,root) %{py_sitedir}/cv2/python-*/cv2.so
+%{py_sitedir}/cv2/*.py[co]
 
 %files -n python3-opencv
 %defattr(644,root,root,755)
 
 %files -n python3-opencv
 %defattr(644,root,root,755)
-%attr(755,root,root) %{py3_sitedir}/cv2.cpython-*.so
+%dir %{py3_sitedir}/cv2
+%dir %{py3_sitedir}/cv2/python-*
+%attr(755,root,root) %{py3_sitedir}/cv2/python-*/cv2.cpython-*.so
+%{py3_sitedir}/cv2/*.py
diff --git a/python-install.patch b/python-install.patch
new file mode 100644 (file)
index 0000000..40be4d6
--- /dev/null
@@ -0,0 +1,11 @@
+--- opencv-3.4.8/cmake/OpenCVDetectPython.cmake.orig   2019-10-09 13:42:29.000000000 +0200
++++ opencv-3.4.8/cmake/OpenCVDetectPython.cmake        2019-10-31 09:08:46.890255326 +0100
+@@ -186,7 +186,7 @@
+         else() #debian based assumed, install to the dist-packages.
+           set(_packages_path "python${_version_major_minor}/dist-packages")
+         endif()
+-        set(_packages_path "lib/${_packages_path}")
++      set(_packages_path "lib${LIB_SUFFIX}/${_packages_path}")
+       elseif(CMAKE_HOST_WIN32)
+         get_filename_component(_path "${_executable}" PATH)
+         file(TO_CMAKE_PATH "${_path}" _path)
This page took 0.072345 seconds and 4 git commands to generate.