forked from pool/opencv
Accepting request 400535 from KDE:Extra
Fixes ppc64le nuild with gcc6 (forwarded request 400460 from dimstar) OBS-URL: https://build.opensuse.org/request/show/400535 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=63
This commit is contained in:
10
opencv.spec
10
opencv.spec
@@ -35,6 +35,8 @@ Source1: opencv_contrib_face-3.1.0.tar.bz2
|
||||
Patch6: opencv-gcc5.patch
|
||||
# PATCH-FIX-OPENSUSE opencv-build-compare.patch -- avoid republish if some random external version number changes
|
||||
Patch8: opencv-build-compare.patch
|
||||
# PATCH-FIX-OPENSUSE opencv-gcc6-disable-pch.patch -- Disable PCH for GCC6.
|
||||
Patch9: opencv-gcc6-disable-pch.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: unzip
|
||||
@@ -146,6 +148,7 @@ This package contains the documentation and examples for the OpenCV library.
|
||||
%setup -q -a 1
|
||||
%patch6 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
# Remove Windows specific files
|
||||
rm -f doc/packaging.txt
|
||||
@@ -153,8 +156,13 @@ rm -f doc/packaging.txt
|
||||
# sed -i 's/\r$//' samples/c/facedetect.cmd
|
||||
|
||||
%build
|
||||
%ifarch ppc64le
|
||||
if [ $(gcc -dumpversion) -ge 6 ]; then
|
||||
export mlra=-mlra
|
||||
fi
|
||||
%endif
|
||||
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
|
||||
export CXXFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
|
||||
export CXXFLAGS="%{optflags} ${mlra} $(getconf LFS_CFLAGS)"
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
|
Reference in New Issue
Block a user