From 8d3790a855f224d41655b5cc698e77b5eded6b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 18 Jun 2022 00:43:22 +0100 Subject: [PATCH] Update opencv to 4.6.0 (#2094603) Remove hack to keep old so version Adapt spec to new so version ${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR_2DIGITS} and drop OPENCV_VERSION_PATCH --- opencv-clean.sh | 5 +- opencv.spec | 135 +++++++++++++++++++++++++----------------------- sources | 6 +-- 3 files changed, 78 insertions(+), 68 deletions(-) diff --git a/opencv-clean.sh b/opencv-clean.sh index f9ca324..d62ee9b 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.5.5 +VERSION=4.6.0 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 @@ -29,3 +29,6 @@ find opencv_extra-${VERSION} -iname "*lenna*" -exec rm {} ';' -print find opencv_extra-${VERSION} \( -iname "len*.*" -o -iname "*lena*.png" -o -iname "*lena*.jpg" \) -exec rm {} ';' -print tar zcf opencv_extra-clean-${VERSION}.tar.gz opencv_extra-${VERSION}/ rm -r opencv_extra-${VERSION}/ + + +echo fedpkg new-sources $(spectool -l --sources opencv.spec) diff --git a/opencv.spec b/opencv.spec index ee14cdb..f1b1467 100644 --- a/opencv.spec +++ b/opencv.spec @@ -48,16 +48,19 @@ %endif Name: opencv -Version: 4.5.5 +Version: 4.6.0 %global javaver %(foo=%{version}; echo ${foo//./}) -%global abiver %(foo=%{version}; echo ${foo:0:3}) -Release: 9%{?dist} +%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: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD URL: https://opencv.org # TO PREPARE TARBALLS FOR FEDORA -# Edit opencv-clean.sh and set VERSION, save file, after run opencv-clean.sh +# Edit opencv-clean.sh and set VERSION, save file and run opencv-clean.sh # # Need to remove copyrighted lena.jpg images from tarball (rhbz#1295173) # and SIFT/SURF from tarball, due to legal concerns. @@ -73,7 +76,6 @@ Source4: b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip Source5: xorg.conf Patch0: opencv-4.1.0-install_3rdparty_licenses.patch -Patch2: https://github.com/opencv/opencv/commit/8d88bb06b230b5c4b5bca78d84102f5d1adf48cf.patch Patch3: opencv.python.patch BuildRequires: gcc-c++ @@ -255,7 +257,6 @@ popd &>/dev/null %endif %patch0 -p1 -b .install_3rdparty_licenses -%patch2 -p1 -b .ppc64le_builtin_altivec_vadub %patch3 -p1 -b .python_install_binary pushd %{name}_contrib-%{version} @@ -396,21 +397,21 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %files core %license LICENSE %{_datadir}/licenses/opencv4/ -%{_libdir}/libopencv_calib3d.so.%{abiver}* -%{_libdir}/libopencv_core.so.%{abiver}* -%{_libdir}/libopencv_dnn.so.%{abiver}* -%{_libdir}/libopencv_features2d.so.%{abiver}* -%{_libdir}/libopencv_flann.so.%{abiver}* -%{_libdir}/libopencv_gapi.so.%{abiver}* -%{_libdir}/libopencv_highgui.so.%{abiver}* -%{_libdir}/libopencv_imgcodecs.so.%{abiver}* -%{_libdir}/libopencv_imgproc.so.%{abiver}* -%{_libdir}/libopencv_ml.so.%{abiver}* -%{_libdir}/libopencv_objdetect.so.%{abiver}* -%{_libdir}/libopencv_photo.so.%{abiver}* -%{_libdir}/libopencv_stitching.so.%{abiver}* -%{_libdir}/libopencv_video.so.%{abiver}* -%{_libdir}/libopencv_videoio.so.%{abiver}* +%{_libdir}/libopencv_calib3d.so.{%{abiver},%{version}} +%{_libdir}/libopencv_core.so.{%{abiver},%{version}} +%{_libdir}/libopencv_dnn.so.{%{abiver},%{version}} +%{_libdir}/libopencv_features2d.so.{%{abiver},%{version}} +%{_libdir}/libopencv_flann.so.{%{abiver},%{version}} +%{_libdir}/libopencv_gapi.so.{%{abiver},%{version}} +%{_libdir}/libopencv_highgui.so.{%{abiver},%{version}} +%{_libdir}/libopencv_imgcodecs.so.{%{abiver},%{version}} +%{_libdir}/libopencv_imgproc.so.{%{abiver},%{version}} +%{_libdir}/libopencv_ml.so.{%{abiver},%{version}} +%{_libdir}/libopencv_objdetect.so.{%{abiver},%{version}} +%{_libdir}/libopencv_photo.so.{%{abiver},%{version}} +%{_libdir}/libopencv_stitching.so.{%{abiver},%{version}} +%{_libdir}/libopencv_video.so.{%{abiver},%{version}} +%{_libdir}/libopencv_videoio.so.{%{abiver},%{version}} %files devel %dir %{_includedir}/opencv4 @@ -437,55 +438,61 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %endif %files contrib -%{_libdir}/libopencv_alphamat.so.%{abiver}* -%{_libdir}/libopencv_aruco.so.%{abiver}* -%{_libdir}/libopencv_bgsegm.so.%{abiver}* -%{_libdir}/libopencv_barcode.so.%{abiver}* -%{_libdir}/libopencv_bioinspired.so.%{abiver}* -%{_libdir}/libopencv_ccalib.so.%{abiver}* +%{_libdir}/libopencv_alphamat.so.{%{abiver},%{version}} +%{_libdir}/libopencv_aruco.so.{%{abiver},%{version}} +%{_libdir}/libopencv_bgsegm.so.{%{abiver},%{version}} +%{_libdir}/libopencv_barcode.so.{%{abiver},%{version}} +%{_libdir}/libopencv_bioinspired.so.{%{abiver},%{version}} +%{_libdir}/libopencv_ccalib.so.{%{abiver},%{version}} %{?with_cuda: -%{_libdir}/libopencv_cuda*.so.%{abiver}* -%{_libdir}/libopencv_cudev.so.%{abiver}* +%{_libdir}/libopencv_cuda*.so.{%{abiver},%{version}} +%{_libdir}/libopencv_cudev.so.{%{abiver},%{version}} } -%{_libdir}/libopencv_cvv.so.%{abiver}* -%{_libdir}/libopencv_datasets.so.%{abiver}* -%{_libdir}/libopencv_dnn_objdetect.so.%{abiver}* -%{_libdir}/libopencv_dnn_superres.so.%{abiver}* -%{_libdir}/libopencv_dpm.so.%{abiver}* -%{_libdir}/libopencv_face.so.%{abiver}* -%{_libdir}/libopencv_freetype.so.%{abiver}* -%{_libdir}/libopencv_fuzzy.so.%{abiver}* -%{_libdir}/libopencv_hdf.so.%{abiver}* -%{_libdir}/libopencv_hfs.so.%{abiver}* -%{_libdir}/libopencv_img_hash.so.%{abiver}* -%{_libdir}/libopencv_intensity_transform.so.%{abiver}* -%{_libdir}/libopencv_line_descriptor.so.%{abiver}* -%{_libdir}/libopencv_mcc.so.%{abiver}* -%{_libdir}/libopencv_optflow.so.%{abiver}* -%{_libdir}/libopencv_phase_unwrapping.so.%{abiver}* -%{_libdir}/libopencv_plot.so.%{abiver}* -%{_libdir}/libopencv_quality.so.%{abiver}* -%{_libdir}/libopencv_rapid.so.%{abiver}* -%{_libdir}/libopencv_reg.so.%{abiver}* -%{_libdir}/libopencv_rgbd.so.%{abiver}* -%{_libdir}/libopencv_saliency.so.%{abiver}* -%{_libdir}/libopencv_shape.so.%{abiver}* -%{_libdir}/libopencv_stereo.so.%{abiver}* -%{_libdir}/libopencv_structured_light.so.%{abiver}* -%{_libdir}/libopencv_superres.so.%{abiver}* -%{_libdir}/libopencv_surface_matching.so.%{abiver}* -%{_libdir}/libopencv_text.so.%{abiver}* -%{_libdir}/libopencv_tracking.so.%{abiver}* -%{_libdir}/libopencv_videostab.so.%{abiver}* +%{_libdir}/libopencv_cvv.so.{%{abiver},%{version}} +%{_libdir}/libopencv_datasets.so.{%{abiver},%{version}} +%{_libdir}/libopencv_dnn_objdetect.so.{%{abiver},%{version}} +%{_libdir}/libopencv_dnn_superres.so.{%{abiver},%{version}} +%{_libdir}/libopencv_dpm.so.{%{abiver},%{version}} +%{_libdir}/libopencv_face.so.{%{abiver},%{version}} +%{_libdir}/libopencv_freetype.so.{%{abiver},%{version}} +%{_libdir}/libopencv_fuzzy.so.{%{abiver},%{version}} +%{_libdir}/libopencv_hdf.so.{%{abiver},%{version}} +%{_libdir}/libopencv_hfs.so.{%{abiver},%{version}} +%{_libdir}/libopencv_img_hash.so.{%{abiver},%{version}} +%{_libdir}/libopencv_intensity_transform.so.{%{abiver},%{version}} +%{_libdir}/libopencv_line_descriptor.so.{%{abiver},%{version}} +%{_libdir}/libopencv_mcc.so.{%{abiver},%{version}} +%{_libdir}/libopencv_optflow.so.{%{abiver},%{version}} +%{_libdir}/libopencv_phase_unwrapping.so.{%{abiver},%{version}} +%{_libdir}/libopencv_plot.so.{%{abiver},%{version}} +%{_libdir}/libopencv_quality.so.{%{abiver},%{version}} +%{_libdir}/libopencv_rapid.so.{%{abiver},%{version}} +%{_libdir}/libopencv_reg.so.{%{abiver},%{version}} +%{_libdir}/libopencv_rgbd.so.{%{abiver},%{version}} +%{_libdir}/libopencv_saliency.so.{%{abiver},%{version}} +%{_libdir}/libopencv_shape.so.{%{abiver},%{version}} +%{_libdir}/libopencv_stereo.so.{%{abiver},%{version}} +%{_libdir}/libopencv_structured_light.so.{%{abiver},%{version}} +%{_libdir}/libopencv_superres.so.{%{abiver},%{version}} +%{_libdir}/libopencv_surface_matching.so.{%{abiver},%{version}} +%{_libdir}/libopencv_text.so.{%{abiver},%{version}} +%{_libdir}/libopencv_tracking.so.{%{abiver},%{version}} +%{_libdir}/libopencv_videostab.so.{%{abiver},%{version}} %if %{with vtk} -%{_libdir}/libopencv_viz.so.%{abiver}* +%{_libdir}/libopencv_viz.so.{%{abiver},%{version}} %endif -%{_libdir}/libopencv_wechat_qrcode.so.%{abiver}* -%{_libdir}/libopencv_ximgproc.so.%{abiver}* -%{_libdir}/libopencv_xobjdetect.so.%{abiver}* -%{_libdir}/libopencv_xphoto.so.%{abiver}* +%{_libdir}/libopencv_wechat_qrcode.so.{%{abiver},%{version}} +%{_libdir}/libopencv_ximgproc.so.{%{abiver},%{version}} +%{_libdir}/libopencv_xobjdetect.so.{%{abiver},%{version}} +%{_libdir}/libopencv_xphoto.so.{%{abiver},%{version}} %changelog +* Fri Jun 17 2022 Sérgio Basto - 4.6.0-1 +- Update opencv to 4.6.0 (#2094603) +- Remove hack to keep old so version +- Adapt spec to new so version ${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR_2DIGITS} + and drop OPENCV_VERSION_PATCH + * Tue Jun 14 2022 Python Maint - 4.5.5-9 - Rebuilt for Python 3.11 diff --git a/sources b/sources index 1812050..22c9213 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -SHA512 (opencv-clean-4.5.5.tar.gz) = e98c7a864c9747185cda7711761fb5a15dee77c11d9082c53f43922fc77c44d808acb489fc3384fc4be1255e03529ae36202b013b04d1b5e7208cdcce76a8477 -SHA512 (opencv_contrib-clean-4.5.5.tar.gz) = 7fb0d65a0a808b80538bbf9c108c84d45f1e416b6924b0d1e3b7b5cebfeca192a6cad26d282e7d74e804ee8186dea0d08e959472bb68f159cb2575b637b3ed40 -SHA512 (opencv_extra-clean-4.5.5.tar.gz) = 5e12e33dbd63785cd857cff2bde3297abf01726c0b54a7cd33eb594c510b524d69ea8ee4e89574bf33a8ac9a1d275a3d9f4f40b53180d3709cc58842b5ad5107 +SHA512 (opencv-clean-4.6.0.tar.gz) = 73815df0df4b93b3df19d66e0957a781de25c78ee51d0f026129df9302d45b114bf3cd249ed13121c160df7b4c01b9e348fe2ba75949d3e25fe6f6168d2b0576 +SHA512 (opencv_contrib-clean-4.6.0.tar.gz) = 8f4a6569671eb161beac6c9bc52f51b3a9e1ac257478477d5238ddcac959612055ab8554a5815f5b55fe8405a34885e63c1c9995468e5641b9d47d1120ef0113 +SHA512 (opencv_extra-clean-4.6.0.tar.gz) = 2b576a2ed87e1a41fddb351bbc66fa23397aa6952866aec3d172976d261f035dc0c1f3e7c66e85e0684bb050862c368fe7fdc34804a9c6171cf1b2a96b621a33 SHA512 (face_landmark_model.dat.xz) = 7558f29431bb9cad1f22ee067ad3ed41be8f68b865992eb7d3a5ce6b6b9e1d031cb03e33c3c149220ef8faebd0471703a8a3bbb06402bcc8ce76bd28317aa307 SHA512 (b624b995ec9c439cbc2e9e6ee940d3a2-v0.1.1f.zip) = f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836