Compare commits
10 Commits
86b1ff8b14
...
6841b7b8c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6841b7b8c1 | ||
|
|
4a551a80a8 | ||
|
|
244855d43e | ||
|
|
50fca482f0 | ||
|
|
875926e3df | ||
|
|
a7b39b9801 | ||
|
|
e897938ba4 | ||
|
|
fdd10b3d53 | ||
|
|
6379450e07 | ||
|
|
e9592a0eaa |
37
opencv.spec
37
opencv.spec
@ -1,6 +1,6 @@
|
||||
Name: opencv
|
||||
Version: 4.5.2
|
||||
Release: 4
|
||||
Release: 7
|
||||
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
|
||||
BuildRequires: cmake chrpath
|
||||
BuildRequires: python3-numpy python3-devel
|
||||
|
||||
%description
|
||||
@ -47,6 +47,8 @@ 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\
|
||||
@ -56,15 +58,32 @@ cmake ../../ -DCMAKE_BUILD_TYPE=Release\
|
||||
-DBUILD_EXAMPLES=ON\
|
||||
-DOPENCV_TEST_DATA_PATH=%_builddir/%{name}-%{version}/opencv_extra-%{version}/testdata\
|
||||
-DINSTALL_TESTS=ON\
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
-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
|
||||
make -j24 V=1
|
||||
ctest -E "opencv_test_objdetect"
|
||||
ctest -E "opencv_test_objdetect|opencv_test_photo"
|
||||
|
||||
|
||||
%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
|
||||
@ -72,8 +91,18 @@ make install DESTDIR=%{buildroot}
|
||||
%{_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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user