diff --git a/opencv-3.4.1-python37.patch b/opencv-3.4.1-python37.patch new file mode 100644 index 0000000..321d61a --- /dev/null +++ b/opencv-3.4.1-python37.patch @@ -0,0 +1,13 @@ +diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp +index fab60fd03..2c48041dc 100644 +--- a/modules/python/src2/cv2.cpp ++++ b/modules/python/src2/cv2.cpp +@@ -886,7 +886,7 @@ bool pyopencv_to(PyObject* obj, String& value, const char* name) + (void)name; + if(!obj || obj == Py_None) + return true; +- char* str = PyString_AsString(obj); ++ const char* str = PyString_AsString(obj); + if(!str) + return false; + value = String(str); diff --git a/opencv.spec b/opencv.spec index 24a70cb..c2ede94 100644 --- a/opencv.spec +++ b/opencv.spec @@ -47,7 +47,7 @@ Name: opencv Version: 3.4.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -63,10 +63,11 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz # https://bugzilla.redhat.com/1031312 Patch1: opencv-3.4.1-cmake_paths.patch Patch2: opencv-3.4.1-cmake_va_intel_fix.patch +Patch3: opencv-3.4.1-python37.patch + BuildRequires: libtool BuildRequires: cmake >= 2.6.3 BuildRequires: chrpath - %{?with_eigen2:BuildRequires: eigen2-devel} %{?with_eigen3:BuildRequires: eigen3-devel} BuildRequires: gtk3-devel @@ -394,6 +395,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Wed Jul 11 2018 Sérgio Basto - 3.4.1-5 +- Small fix to build with Pyhton-3.7 + * Tue Jun 19 2018 Miro Hrončok - 3.4.1-4 - Rebuilt for Python 3.7