Compare commits

..

No commits in common. "6841b7b8c1bb95739a7d660a22877a4ecb75dfa1" and "86b1ff8b146286b6d9c89c08d8f7eec5cef95f82" have entirely different histories.

View File

@ -1,6 +1,6 @@
Name: opencv
Version: 4.5.2
Release: 7
Release: 4
Summary: OpenCV means Intel® Open Source Computer Vision Library.
License: Apache-2.0
URL: https://github.com/opencv/opencv
@ -15,7 +15,7 @@ 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 chrpath
BuildRequires: cmake
BuildRequires: python3-numpy python3-devel
%description
@ -47,8 +47,6 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\
-DBUILD_PERF_TESTS=OFF\
-DBUILD_opencv_apps=OFF\
-DBUILD_opencv_python3=ON\
-DBUILD_opencv_python2=OFF\
-DBUILD_opencv_java=OFF\
-DWITH_FFMPEG=OFF\
-DWITH_TIFF=ON\
-DBUILD_TIFF=OFF\
@ -58,32 +56,15 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\
-DBUILD_EXAMPLES=ON\
-DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\
-DINSTALL_TESTS=ON\
-DPYTHON3_EXECUTABLE=$(which python3)\
-DPYTHON_EXECUTABLE=$(which python3)\
-DPYTHON_DEFAULT_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")\
-DPYTHON3_NUMPY_INCLUDE_DIRS=$(python3 -c "import numpy; print (numpy.get_include())")\
-DPYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\
-DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")\
-DPYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\
-DPYTHON3_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\
-DPYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\
-DPYTHON_LIBRARY=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR')+ '/libpython3.so')")\
-DCMAKE_INSTALL_PREFIX=/usr \
-DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \
-DOPENCV_GENERATE_PKGCONFIG=ON
-DCMAKE_INSTALL_PREFIX=/usr
make -j24 V=1
ctest -E "opencv_test_objdetect|opencv_test_photo"
ctest -E "opencv_test_objdetect"
%install
cd cmake/build
make install DESTDIR=%{buildroot}
chrpath -d %{buildroot}%{_bindir}/%{name}_test_*
chrpath -d %{buildroot}%{_libdir}/lib%{name}_*.so.%{version}
chrpath -d %{buildroot}%{python3_sitelib}/cv2/python-%{python3_version}/cv2.cpython-*.so
%files
%defattr(-,root,root)
%exclude /usr/bin/setup_vars_opencv4.sh
@ -91,18 +72,8 @@ chrpath -d %{buildroot}%{python3_sitelib}/cv2/python-%{python3_version}/cv2.cpyt
%{_libdir}/*
%{_includedir}/*
%exclude /usr/share/*
%{python3_sitelib}/cv2/*
%changelog
* Thu Dec 14 2023 zhangxianting <zhangxianting@uniontech.com> 4.5.2-7
- fix rpath error
* Thu Jan 28 2022 douyan <douyan@kylinos.cn> - 4.5.2-6
- add pkgconfig file
* Thu Jan 27 2022 douyan <douyan@kylinos.cn> - 4.5.2-5
- use %{python3_sitelib} instead of /usr/lib/python3.8/site-packages
* Wed Nov 17 2021 shenwei <shenwei41@huawei.com> - 4.5.2-4
- repair Clang ABI