diff --git a/f66fc199a20882c546fa31142e9c0f5a8b3cf983.patch b/f66fc199a20882c546fa31142e9c0f5a8b3cf983.patch new file mode 100644 index 0000000..5262608 --- /dev/null +++ b/f66fc199a20882c546fa31142e9c0f5a8b3cf983.patch @@ -0,0 +1,33 @@ +From f66fc199a20882c546fa31142e9c0f5a8b3cf983 Mon Sep 17 00:00:00 2001 +From: Florian Jung +Date: Wed, 29 Jul 2020 18:51:55 +0200 +Subject: [PATCH] Fix build of grfmt_jpeg2000.cpp + +libjasper has recently changed `jas_matrix_get` from a macro to an inline function +(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail. +--- + modules/imgcodecs/src/grfmt_jpeg2000.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/imgcodecs/src/grfmt_jpeg2000.cpp b/modules/imgcodecs/src/grfmt_jpeg2000.cpp +index fe69f80c86f..0f4d28d6f4d 100644 +--- a/modules/imgcodecs/src/grfmt_jpeg2000.cpp ++++ b/modules/imgcodecs/src/grfmt_jpeg2000.cpp +@@ -377,7 +377,7 @@ bool Jpeg2KDecoder::readComponent8u( uchar *data, void *_buffer, + + for( y = 0; y < yend - ystart; ) + { +- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 ); ++ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 ); + uchar* dst = data + (y - yoffset) * step - xoffset; + + if( xstep == 1 ) +@@ -443,7 +443,7 @@ bool Jpeg2KDecoder::readComponent16u( unsigned short *data, void *_buffer, + + for( y = 0; y < yend - ystart; ) + { +- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 ); ++ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 ); + ushort* dst = data + (y - yoffset) * step - xoffset; + + if( xstep == 1 ) diff --git a/opencv.spec b/opencv.spec index e2090f5..f97c9f3 100644 --- a/opencv.spec +++ b/opencv.spec @@ -44,9 +44,7 @@ %bcond_without java %bcond_without vulkan -%ifarch ppc64le %define _lto_cflags %{nil} -%endif %global srcname opencv %global abiver 4.3 @@ -60,7 +58,7 @@ Name: opencv Version: 4.3.0 %global javaver %(foo=%{version}; echo ${foo//./}) -Release: 8%{?dist} +Release: 10%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -83,6 +81,8 @@ Patch1: https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/ Patch2: https://patch-diff.githubusercontent.com/raw/opencv/opencv_contrib/pull/2549.patch # Comment out removed vulkan symbols Patch3: opencv_vulkan.patch +#Fix build of grfmt_jpeg2000.cpp +Patch4: f66fc199a20882c546fa31142e9c0f5a8b3cf983.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -262,6 +262,7 @@ popd &>/dev/null %patch0 -p1 -b .install_3rdparty_licenses %patch1 -p1 %patch3 -p1 +%patch4 -p1 pushd %{name}_contrib-%{version} %patch2 -p1 @@ -481,6 +482,12 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Tue Jan 05 2021 Sérgio Basto - 4.3.0-10 +- disable lto (#1910121) + +* Thu Dec 24 2020 Sérgio Basto - 4.3.0-9 +- Fix build of grfmt_jpeg2000.cpp + * Fri Jul 24 2020 Nicolas Chauvet - 4.3.0-8 - Rebuilt - Fix cmake build