| |
@@ -43,6 +43,11 @@
|
| |
%bcond_without java
|
| |
%bcond_without vulkan
|
| |
|
| |
+ # LTO breaks things
|
| |
+ %ifarch ppc64le
|
| |
+ %define _lto_cflags %{nil}
|
| |
+ %endif
|
| |
+
|
| |
%global srcname opencv
|
| |
%global abiver 4.3
|
| |
|
| |
@@ -55,7 +60,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
|
| |
@@ -278,9 +283,11 @@
|
| |
# enabled by default if libraries are presents at build time:
|
| |
# GTK, GSTREAMER, 1394, V4L, eigen3
|
| |
# non available on Fedora: FFMPEG, XINE
|
| |
+ mkdir -p build
|
| |
+ pushd build
|
| |
# disabling IPP because it is closed source library from intel
|
| |
|
| |
- %cmake \
|
| |
+ %cmake CMAKE_VERBOSE=1 \
|
| |
-DCV_TRACE=OFF \
|
| |
-DWITH_IPP=OFF \
|
| |
-DWITH_ITT=OFF \
|
| |
@@ -324,7 +331,7 @@
|
| |
%{?with_opencl: -DOPENCL_INCLUDE_DIR=%{_includedir}/CL } \
|
| |
%{!?with_opencl: -DWITH_OPENCL=OFF } \
|
| |
-DOPENCV_SKIP_PYTHON_LOADER=ON \
|
| |
- -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-%{version}/modules \
|
| |
+ -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-%{version}/modules \
|
| |
-DWITH_LIBV4L=ON \
|
| |
-DWITH_OPENMP=ON \
|
| |
-DOPENCV_CONFIG_INSTALL_PATH=%{_lib}/cmake/OpenCV \
|
| |
@@ -335,14 +342,17 @@
|
| |
%{?with_clp: -DWITH_CLP=ON } \
|
| |
%{?with_va: -DWITH_VA=ON } \
|
| |
%{!?with_vtk: -DWITH_VTK=OFF} \
|
| |
- %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan }
|
| |
+ %{?with_vulkan: -DWITH_VULKAN=ON -DVULKAN_INCLUDE_DIRS=%{_includedir}/vulkan } \
|
| |
+ -S.. -B.
|
| |
|
| |
- %cmake_build
|
| |
+ %make_build VERBOSE=1
|
| |
|
| |
+ popd
|
| |
|
| |
- %install
|
| |
- %cmake_install
|
| |
|
| |
+ %install
|
| |
+ %make_install -C build
|
| |
+ find %{buildroot} -name '*.la' -delete
|
| |
rm -rf %{buildroot}%{_datadir}/OpenCV/licenses/
|
| |
%if %{with java}
|
| |
ln -s -r %{buildroot}%{_jnidir}/libopencv_java%{javaver}.so %{buildroot}%{_jnidir}/libopencv_java.so
|
| |
@@ -361,6 +371,7 @@
|
| |
# ARGS=-V increases output verbosity
|
| |
#ifnarch ppc64
|
| |
%if %{with tests}
|
| |
+ pushd build
|
| |
cp %SOURCE5 .
|
| |
if [ -x /usr/libexec/Xorg ]; then
|
| |
Xorg=/usr/libexec/Xorg
|
| |
@@ -369,7 +380,8 @@
|
| |
fi
|
| |
$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99 &
|
| |
export DISPLAY=:99
|
| |
- LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/lib:$LD_LIBARY_PATH %ctest || :
|
| |
+ LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/lib:$LD_LIBARY_PATH make test ARGS=-V || :
|
| |
+ popd
|
| |
%endif
|
| |
#endif
|
| |
|
| |
@@ -476,6 +488,12 @@
|
| |
%{_libdir}/libopencv_xphoto.so.%{abiver}*
|
| |
|
| |
%changelog
|
| |
+ * Sat Aug 01 2020 Michael J Gruber <mjg@fedoraproject.org> - 4.3.0-10
|
| |
+ - turn off LTO for ppc64le to fix FTBFS
|
| |
+
|
| |
+ * Fri Jul 31 2020 Michael J Gruber <mjg@fedoraproject.org> - 4.3.0-9
|
| |
+ - adjust to new cmake macros
|
| |
+
|
| |
* Fri Jul 24 2020 Nicolas Chauvet <kwizart@gmail.com> - 4.3.0-8
|
| |
- Rebuilt
|
| |
|
| |
It's best to view these changes against 663cf5c ("CV_TRACE OFF", 2020-07-27), which is the last commit before cmake experiments.
The cmake related change alone gives:
https://koji.fedoraproject.org/koji/taskinfo?taskID=48280383
That is why I turn off LTO for ppc64le. The scratch builds take forever, that is why I'm filing the PR already to make maintainers aware of the fixes. Currently, the build fails for completely different reasons:
https://koji.fedoraproject.org/koji/taskinfo?taskID=48362664
The buildroot is messed up (pango/fontconfig/whatever) so that the build does not even start.