summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-07-15 18:12:05 +0000
committerAlexis Ballier <aballier@gentoo.org>2015-07-15 18:12:05 +0000
commit1021275be3f771e85e743738ab21ffa1f952c311 (patch)
treeceb7a0e73c769f7cbe464d0f4542928603fe7c41 /sci-libs/ViSP
parentx86 stable wrt bug #554426 (diff)
downloadgentoo-2-1021275be3f771e85e743738ab21ffa1f952c311.tar.gz
gentoo-2-1021275be3f771e85e743738ab21ffa1f952c311.tar.bz2
gentoo-2-1021275be3f771e85e743738ab21ffa1f952c311.zip
backport upstream patch to build with opencv3
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'sci-libs/ViSP')
-rw-r--r--sci-libs/ViSP/ChangeLog6
-rw-r--r--sci-libs/ViSP/ViSP-2.10.0.ebuild4
-rw-r--r--sci-libs/ViSP/files/opencv3.patch67
3 files changed, 74 insertions, 3 deletions
diff --git a/sci-libs/ViSP/ChangeLog b/sci-libs/ViSP/ChangeLog
index 6623e49d2514..80facaf5c774 100644
--- a/sci-libs/ViSP/ChangeLog
+++ b/sci-libs/ViSP/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-libs/ViSP
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/ViSP/ChangeLog,v 1.3 2015/04/03 08:21:17 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/ViSP/ChangeLog,v 1.4 2015/07/15 18:12:05 aballier Exp $
+
+ 15 Jul 2015; Alexis Ballier <aballier@gentoo.org> ViSP-2.10.0.ebuild,
+ +files/opencv3.patch:
+ backport upstream patch to build with opencv3
03 Apr 2015; Alexis Ballier <aballier@gentoo.org> ViSP-2.10.0.ebuild:
keyword ~arm
diff --git a/sci-libs/ViSP/ViSP-2.10.0.ebuild b/sci-libs/ViSP/ViSP-2.10.0.ebuild
index a299bc9753a3..9191f28543b1 100644
--- a/sci-libs/ViSP/ViSP-2.10.0.ebuild
+++ b/sci-libs/ViSP/ViSP-2.10.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/ViSP/ViSP-2.10.0.ebuild,v 1.3 2015/04/03 08:21:17 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/ViSP/ViSP-2.10.0.ebuild,v 1.4 2015/07/15 18:12:05 aballier Exp $
EAPI=5
@@ -43,7 +43,7 @@ DEPEND="${RDEPEND}
RDEPEND="${RDEPEND}
demos? ( sci-misc/ViSP-images )"
REQUIRED_USE="ffmpeg? ( opencv ) ois? ( ogre )"
-PATCHES=( "${FILESDIR}/opencv.patch" )
+PATCHES=( "${FILESDIR}/opencv.patch" "${FILESDIR}/opencv3.patch" )
src_configure() {
local mycmakeargs=(
diff --git a/sci-libs/ViSP/files/opencv3.patch b/sci-libs/ViSP/files/opencv3.patch
new file mode 100644
index 000000000000..8f7f9ee269cd
--- /dev/null
+++ b/sci-libs/ViSP/files/opencv3.patch
@@ -0,0 +1,67 @@
+Index: ViSP-2.10.0/src/key-point/vpKeyPoint.h
+===================================================================
+--- ViSP-2.10.0.orig/src/key-point/vpKeyPoint.h
++++ ViSP-2.10.0/src/key-point/vpKeyPoint.h
+@@ -494,6 +494,7 @@ public:
+ initDetector(detectorName);
+ }
+
++#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
+ /*!
+ Template function to set to a \p parameterName a value for a specific detector named by his \p detectorName.
+
+@@ -507,6 +508,7 @@ public:
+ m_detectors[detectorName]->set(parameterName, value);
+ }
+ }
++#endif
+
+ /*!
+ Set and initialize a list of detectors denominated by their names \p detectorNames.
+@@ -532,6 +534,7 @@ public:
+ initExtractor(extractorName);
+ }
+
++#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
+ /*!
+ Template function to set to a \p parameterName a value for a specific extractor named by his \p extractorName.
+
+@@ -545,6 +548,7 @@ public:
+ m_extractors[extractorName]->set(parameterName, value);
+ }
+ }
++#endif
+
+ /*!
+ Set and initialize a list of extractors denominated by their names \p extractorNames.
+@@ -700,7 +704,7 @@ public:
+ m_useAffineDetection = useAffine;
+ }
+
+-#if (VISP_HAVE_OPENCV_VERSION >= 0x020400)
++#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
+ /*!
+ Set if cross check method must be used to eliminate some false matches with a brute-force matching method.
+
+Index: ViSP-2.10.0/src/key-point/vpKeyPoint.cpp
+===================================================================
+--- ViSP-2.10.0.orig/src/key-point/vpKeyPoint.cpp
++++ ViSP-2.10.0/src/key-point/vpKeyPoint.cpp
+@@ -868,7 +868,7 @@ void vpKeyPoint::detect(const vpImage<un
+ (int) rectangle.getBottom());
+ cv::rectangle(mask, leftTop, rightBottom, cv::Scalar(255), CV_FILLED);
+ } else {
+- mask = cv::Mat::ones(matImg.rows, matImg.cols, CV_8U);
++ mask = cv::Mat::ones(matImg.rows, matImg.cols, CV_8U) * 255;
+ }
+
+ detect(matImg, keyPoints, elapsedTime, mask);
+@@ -1544,7 +1544,7 @@ void vpKeyPoint::initExtractors(const st
+ void vpKeyPoint::initMatcher(const std::string &matcherName) {
+ m_matcher = cv::DescriptorMatcher::create(matcherName);
+
+-#if (VISP_HAVE_OPENCV_VERSION >= 0x020400)
++#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
+ if(m_matcher != NULL && !m_useKnn && matcherName == "BruteForce") {
+ m_matcher->set("crossCheck", m_useBruteForceCrossCheck);
+ }