From fb8443873603132bda5fa8869d067291f1a2dbfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 30 Sep 2023 05:14:06 +0100 Subject: [PATCH] Update opencv to 4.8.1 --- numpy.distutils_removal.patch | 11 +++++++++++ opencv-clean.sh | 2 +- opencv.spec | 9 +++++++-- sources | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 numpy.distutils_removal.patch diff --git a/numpy.distutils_removal.patch b/numpy.distutils_removal.patch new file mode 100644 index 0000000..400651d --- /dev/null +++ b/numpy.distutils_removal.patch @@ -0,0 +1,11 @@ +--- ./cmake/OpenCVDetectPython.cmake.orig 2023-09-30 01:44:54.597603701 +0100 ++++ ./cmake/OpenCVDetectPython.cmake 2023-09-30 01:53:48.924119387 +0100 +@@ -216,7 +216,7 @@ if(NOT ${found}) + message(STATUS " PYTHON3_NUMPY_INCLUDE_DIRS") + else() + # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy +- execute_process(COMMAND "${_executable}" -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print(os.pathsep.join(numpy.distutils.misc_util.get_numpy_include_dirs()))" ++ execute_process(COMMAND "${_executable}" -c "import numpy; print(numpy.get_include())" + RESULT_VARIABLE _numpy_process + OUTPUT_VARIABLE _numpy_include_dirs + OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/opencv-clean.sh b/opencv-clean.sh index d82bdcc..e161ddf 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.8.0 +VERSION=4.8.1 wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz wget -c https://github.com/opencv/opencv_contrib/archive/${VERSION}/opencv_contrib-${VERSION}.tar.gz diff --git a/opencv.spec b/opencv.spec index 7de0f37..8587b43 100644 --- a/opencv.spec +++ b/opencv.spec @@ -64,13 +64,13 @@ %endif Name: opencv -Version: 4.8.0 +Version: 4.8.1 %global javaver %(foo=%{version}; echo ${foo//./}) %global majorver %(foo=%{version}; a=(${foo//./ }); echo ${a[0]} ) %global minorver %(foo=%{version}; a=(${foo//./ }); echo ${a[1]} ) %global padding %(digits=00; num=%{minorver}; echo ${digits:${#num}:${#digits}} ) %global abiver %(echo %{majorver}%{padding}%{minorver} ) -Release: 2%{?dist} +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD-3-Clause and Apache-2.0 and ISC @@ -98,6 +98,7 @@ Source6: https://github.com/WeChatCV/opencv_3rdparty/archive/%{wechat_com Patch0: opencv-4.1.0-install_3rdparty_licenses.patch Patch3: opencv.python.patch +Patch4: numpy.distutils_removal.patch BuildRequires: gcc-c++ BuildRequires: cmake >= 2.6.3 @@ -386,6 +387,7 @@ popd &>/dev/null %patch -P 0 -p1 -b .install_3rdparty_licenses %patch -P 3 -p1 -b .python_install_binary +%patch -P 4 -p1 -b .numpy.distutils_removal pushd %{name}_contrib-%{version} #patch1 -p1 -b .install_cvv @@ -561,6 +563,9 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %changelog +* Fri Sep 29 2023 Sérgio Basto - 4.8.1-1 +- Update opencv to 4.8.1 + * Thu Sep 14 2023 Yaakov Selkowitz - 4.8.0-2 - Separate per-module subpackages (#1878320) diff --git a/sources b/sources index 4daac63..c2c7616 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.8.0.tar.gz) = 5c15a86893ebd4ef8d597b198f4467dbb76767c27ed49c20eb13a439f5a9ceb6d116dff82b6eb4ed39769f4bd75c05f08d843f21c4e9dbc5d1b1c8c4d469b5b5 -SHA512 (opencv_contrib-clean-4.8.0.tar.gz) = decd6830c533014c0da7162dfaca18ef22a0cd2d10554c3f572c312cf3e76e45666ff5c6e10a4860d4bd4eaf73a1dfc8c8a4e76f49188a19d3de89019a15df3b +SHA512 (opencv-clean-4.8.1.tar.gz) = d148e05cbe29a6e7b0eec8258b6f0260193ace0fec87c6b61225a36f3432a29d9c86b77018e51b547996db3227b561968e54856063ce7f2e9c47bc72aba7f0fb +SHA512 (opencv_contrib-clean-4.8.1.tar.gz) = cc5badd41b7c23e316d4984accc6373b608df591896827f9289dc511b163618036906c91f872cfa4de1fd3cc53838a6dfd5102e7c1856aa1f67b2c18323677f6 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (fa4b3e25167319cb0fa9432ef8281945-v0.1.2a.zip) = ce5af0bd5d7fb04022f92fed130898959aecb954cc09da2fc923c76b37ee92d2233888592a4c6bca8006ac4d3fda9c6da80f316c924a407a7a5961d9832a681c SHA512 (wechat-20230712.git3487ef7.tar.gz) = bc4f220465de41df8af0cb35312c1db155976d05f13a60e43c1798b161d8f56388e34a59108fb3e27e8c97b53acfd198256d9ae420b5f70a32ddc1ea65c3c8a6