Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
6841b7b8c1
!32 fix rpath error
From: @zhangxianting 
Reviewed-by: @zhunaipan 
Signed-off-by: @zhunaipan
2023-12-19 09:39:36 +00:00
zhangxianting
4a551a80a8 fix rpath error
Signed-off-by: zhangxianting <zhangxianting@uniontech.com>
2023-12-14 12:17:15 +08:00
openeuler-ci-bot
244855d43e
!20 sync with master
From: @dou33 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2022-02-21 09:47:07 +00:00
dou33
50fca482f0 use %{python3_sitelib} instead of /usr/lib/python3.8/site-packages,add pkgconfig file 2022-02-18 17:38:33 +08:00
openeuler-ci-bot
875926e3df !14 opencv 构建python 模块
From: @yanhailiangyhl
Reviewed-by: 
Signed-off-by:
2021-11-19 06:38:23 +00:00
yanhailiang
a7b39b9801 构建python 版本 2021-11-19 10:56:48 +08:00
yanhailiang
e897938ba4 构建python 版本 2021-11-19 10:48:01 +08:00
yanhailiang
fdd10b3d53 构建python 版本 2021-11-19 10:00:25 +08:00
yanhailiang
6379450e07 构建python 版本 2021-11-19 09:02:21 +08:00
yanhailiang
e9592a0eaa 构建python 版本 2021-11-19 01:05:02 +08:00

View File

@ -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