Switch to new Python loader, doesn't fix rhbz #2054951 but can be a step

This commit is contained in:
Sérgio M. Basto 2022-04-14 15:38:25 +01:00
parent d9eb86cc34
commit feee2b1ca8
2 changed files with 18 additions and 3 deletions

11
opencv.python.patch Normal file
View File

@ -0,0 +1,11 @@
--- opencv-4.5.5/modules/python/common.cmake.orig 2022-04-11 18:40:18.925266930 +0100
+++ opencv-4.5.5/modules/python/common.cmake 2022-04-11 18:42:17.753849346 +0100
@@ -179,7 +179,7 @@ else()
else()
set(__python_binary_subdir "python-${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}")
endif()
- set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}${__python_binary_subdir}")
+ set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}")
endif()
install(TARGETS ${the_module}

View File

@ -51,7 +51,7 @@ Name: opencv
Version: 4.5.5
%global javaver %(foo=%{version}; echo ${foo//./})
%global abiver %(foo=%{version}; echo ${foo:0:3})
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Collection of algorithms for computer vision
# This is normal three clause BSD.
License: BSD
@ -75,6 +75,7 @@ Source5: xorg.conf
Patch0: opencv-4.1.0-install_3rdparty_licenses.patch
Patch1: https://github.com/opencv/opencv/commit/81a6d1b0d4d93a3330cc99fbb1601c90b9516a9c.patch
Patch2: https://github.com/opencv/opencv/commit/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch
Patch3: opencv.python.patch
BuildRequires: gcc-c++
BuildRequires: cmake >= 2.6.3
@ -256,6 +257,7 @@ popd &>/dev/null
%patch0 -p1 -b .install_3rdparty_licenses
%patch1 -p1 -R -b .soversion
%patch2 -p1 -b .ppc64le_builtin_altivec_vadub
%patch3 -p1 -b .python_install_binary
pushd %{name}_contrib-%{version}
#patch1 -p1 -b .install_cvv
@ -328,7 +330,6 @@ install -pm 0644 %{SOURCE4} .cache/ade/
-DPROTOBUF_UPDATE_FILES=ON \
%{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \
%{!?with_opencl: -DWITH_OPENCL=OFF } \
-DOPENCV_SKIP_PYTHON_LOADER=ON \
-DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-%{version}/modules \
-DWITH_LIBV4L=ON \
-DWITH_OPENMP=ON \
@ -427,7 +428,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%{_datadir}/opencv4/samples
%files -n python3-opencv
%{python3_sitearch}/cv2.cpython-3*.so
%{python3_sitearch}/cv2
%if %{with java}
%files java
@ -487,6 +488,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
%{_libdir}/libopencv_xphoto.so.%{abiver}*
%changelog
* Sun Mar 20 2022 Sérgio Basto <sergio@serjux.com> - 4.5.5-7
- Switch to new Python loader, doesn't fix rhbz #2054951 but can be a step
* Thu Mar 10 2022 Sandro Mani <manisandro@gmail.com> - 4.5.5-6
- Rebuild for tesseract 5.1.0