update to 4.5.0 [release 4.5.0-1mamba;Sat Dec 12 2020]

This commit is contained in:
Silvan Calarco 2024-01-06 08:10:49 +01:00
parent 7efb062e56
commit e48d8e85a6

View File

@ -1,8 +1,8 @@
%define pkgver %(echo %version | sed "s|[a-z]||")
%define javaver %(echo %version | cut -d. -f1-3 | tr -d .)
Name: opencv
Version: 4.1.2
Release: 4mamba
Version: 4.5.0
Release: 1mamba
Summary: Collection of algorithms for computer vision
Group: Development/Libraries
Vendor: openmamba
@ -19,38 +19,32 @@ Patch4: opencv-4.1.2-cmake-includedir.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libatk-devel
BuildRequires: ldconfig
BuildRequires: libavcodec-ffmpeg-devel
BuildRequires: libavformat-ffmpeg-devel
BuildRequires: libavresample-ffmpeg-devel
BuildRequires: libavutil-ffmpeg-devel
BuildRequires: libcairo-devel
BuildRequires: libdc1394-devel
BuildRequires: libexif-devel
BuildRequires: libgcc
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libglib-devel
BuildRequires: libgphoto2-devel
BuildRequires: libgst-plugins-base-devel
BuildRequires: libgstreamer-devel
BuildRequires: libgtk-devel
BuildRequires: libilmbase-devel
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libopenexr-devel
BuildRequires: libpango-devel
BuildRequires: libopenjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libpython-devel
BuildRequires: libstdc++6-devel
BuildRequires: libswscale-ffmpeg-devel
BuildRequires: libtiff-devel
BuildRequires: libunicap-devel
BuildRequires: libwebp-devel
BuildRequires: libxine-devel
BuildRequires: libz-devel
BuildRequires: python3
## AUTOBUILDREQ-END
BuildRequires: python-Imaging
BuildRequires: python-numpy
BuildRequires: libxine-devel
#BuildRequires: python-Imaging
#BuildRequires: python-numpy
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -70,7 +64,7 @@ This package contains the OpenCV static libraries.
Summary: Devel package for %{name}
Group: Development/Libraries
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%ifnarch arm
%ifnarch arm aarch64
Requires: java-opencv = %{?epoch:%epoch:}%{version}-%{release}
%endif
@ -98,20 +92,23 @@ Obsoletes: opencv-python
%description -n python-cv
This package contains Python bindings for the OpenCV library.
%package -n python-cv-py36
%package -n python-cv-py3
Summary: Python bindings for apps which use OpenCV
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: python-Pillow-py36
Requires: python-numpy-py36
Requires: python-Pillow-py3
Requires: python-numpy-py3
Obsoletes: python-cv-py36 <= 4.1.2-4mamba
%description -n python-cv-py36
%description -n python-cv-py3
This package contains Python bindings for the OpenCV library.
%debug_package
%prep
%setup -q -c
#% setup -q -c -a0
%setup -D -T
:<< _EOF
mv opencv-opencv-*/* .
%ifarch %{ix86}
@ -121,6 +118,10 @@ mv opencv-opencv-*/* .
%patch4 -p1
%build
:<< _EOF
export JAVA_HOME=%{_jvmdir}/jdk
export JAVACMD=%{_jvmdir}/jdk/bin/java
#:<< _EOF
#-- Interfaces:
# -- Use IPP: NO (Intel Performance Primitive)
# -- Use TBB: NO (Threading Building Blocks library)
@ -139,8 +140,8 @@ mv opencv-opencv-*/* .
-DBUILD_SWIG_PYTHON_SUPPORT=1 \
-DINSTALL_C_EXAMPLES=0 \
-DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS -D__STDC_CONSTANT_MACROS" \
-DPYTHON3_EXECUTABLE:PATH=%{__python36} \
-DPYTHON3_PACKAGES_PATH:PATH=%{python36_sitelib} \
-DPYTHON3_EXECUTABLE:PATH=%{__python3} \
-DPYTHON3_PACKAGES_PATH:PATH=%{python3_sitelib} \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DOPENCV_ENABLE_NONFREE=ON \
-DENABLE_PRECOMPILED_HEADERS=OFF \
@ -193,7 +194,7 @@ rm -fr %{buildroot}%{_datadir}/opencv/doc
%dir %{_datadir}/licenses/opencv4
%{_datadir}/licenses/opencv4/*
%ifnarch arm
%ifnarch arm aarch64
%files -n java-opencv
%defattr(-,root,root)
%{_datadir}/java/opencv4/libopencv_java*.so
@ -203,14 +204,22 @@ rm -fr %{buildroot}%{_datadir}/opencv/doc
%defattr(-,root,root)
%dir %{python_sitelib}/cv2
%{python_sitelib}/cv2/*
%endif
%files -n python-cv-py36
%ifnarch arm
%files -n python-cv-py3
%defattr(-,root,root)
%dir %{python36_sitelib}/cv2
%{python36_sitelib}/cv2/*
%dir %{python3_sitelib}/cv2
%{python3_sitelib}/cv2/*
%endif
%changelog
* Sat Dec 12 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.5.0-1mamba
- update to 4.5.0
* Sat Dec 12 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.2-5mamba
- rebuilt with python3; updated build requirements
* Sun Dec 08 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.2-4mamba
- rebuilt with -DENABLE_PRECOMPILED_HEADERS=OFF to fix blender build, see https://stackoverflow.com/questions/43558709/opencv-and-tbb-error-x64?rq=1