[packages/opencv] - fix build error caused by sign() macro redefinition
baggins
baggins at pld-linux.org
Wed Dec 13 09:03:08 CET 2017
commit 486719de50bb5b8274e1b5cd20ae1f418705ade5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Dec 13 09:02:44 2017 +0100
- fix build error caused by sign() macro redefinition
no-redefinition.patch | 22 ++++++++++++++++++++++
opencv.spec | 4 +++-
2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/opencv.spec b/opencv.spec
index cc8e05c..de5099c 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -53,7 +53,7 @@ Summary: A library of programming functions mainly aimed at real time computer v
Summary(pl.UTF-8): Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
Name: opencv
Version: 3.1.0
-Release: 7.1
+Release: 7.2
Epoch: 1
%if %{with unicap} || %{with xine}
License: GPL (enforced by used libraries), BSD (opencv itself)
@@ -70,6 +70,7 @@ Patch1: %{name}-ximea.patch
Patch2: java-ant-sourcelevel.patch
Patch3: cmake-install-path.patch
Patch4: vtk7.patch
+Patch5: no-redefinition.patch
URL: http://www.opencv.org/
%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
%{?with_opencl:BuildRequires: OpenCL-devel}
@@ -297,6 +298,7 @@ Wiązania Pythona 3 do OpenCV.
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%build
install -d build
diff --git a/no-redefinition.patch b/no-redefinition.patch
new file mode 100644
index 0000000..d242146
--- /dev/null
+++ b/no-redefinition.patch
@@ -0,0 +1,22 @@
+--- opencv-3.1.0/opencv_contrib-3.1.0/modules/tracking/include/opencv2/tracking/onlineMIL.hpp~ 2015-12-17 18:11:31.000000000 +0100
++++ opencv-3.1.0/opencv_contrib-3.1.0/modules/tracking/include/opencv2/tracking/onlineMIL.hpp 2017-12-13 08:59:51.077710225 +0100
+@@ -54,8 +54,6 @@
+ //TODO based on the original implementation
+ //http://vision.ucsd.edu/~bbabenko/project_miltrack.shtml
+
+-#define sign(s) ((s > 0 ) ? 1 : ((s<0) ? -1 : 0))
+-
+ class ClfOnlineStump;
+
+ class CV_EXPORTS ClfMilBoost
+--- opencv-3.1.0/opencv_contrib-3.1.0/modules/tracking/src/onlineMIL.cpp~ 2015-12-17 18:11:31.000000000 +0100
++++ opencv-3.1.0/opencv_contrib-3.1.0/modules/tracking/src/onlineMIL.cpp 2017-12-13 09:00:15.158067835 +0100
+@@ -42,6 +42,8 @@
+ #include "precomp.hpp"
+ #include "opencv2/tracking/onlineMIL.hpp"
+
++#define sign(s) ((s > 0 ) ? 1 : ((s<0) ? -1 : 0))
++
+ template<class T> class SortableElementRev
+ {
+ public:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/opencv.git/commitdiff/486719de50bb5b8274e1b5cd20ae1f418705ade5
More information about the pld-cvs-commit
mailing list