[limereg] 29/37: Add support build OpenCV 3

Mattia Rizzolo mattia at debian.org
Wed May 3 16:38:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository limereg.

commit fbb06647a07f3f8de12edbdc67b8c3a8d3b67b6f
Author: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Date:   Tue Nov 8 00:59:12 2016 +0900

    Add support build OpenCV 3
    
    Closes: #841406
    Signed-off-by: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 debian/patches/ocv3check | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series    |  1 +
 2 files changed, 47 insertions(+)

diff --git a/debian/patches/ocv3check b/debian/patches/ocv3check
new file mode 100644
index 0000000..65f9d44
--- /dev/null
+++ b/debian/patches/ocv3check
@@ -0,0 +1,46 @@
+diff --git a/configure.ac b/configure.ac
+index 6877b7a..7f55f45 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -42,6 +42,7 @@ else
+ fi
+ 
+ HAVE_OPENCV=false
++HAVE_OPENCV3=false
+ PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.1, [HAVE_OPENCV=true], [true])
+ if test x$HAVE_OPENCV = xfalse; then
+   AC_MSG_WARN([*** opencv >= 2.3.1 not found - Cannot build the command line tool, which relies on OpenCV. Only the library will be built, because the lib has no dependency to OpenCV. http://opencvlibrary.sourceforge.net ***])
+@@ -50,8 +51,16 @@ else
+   OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`"
+   #OPENCV_INCLUDE=pkg-config opencv --variable=includedir_old
+   AC_DEFINE([HAVE_OPENCV],[1],[Define to 1 if you have OpenCV >= 2.3.1])
++  # OpenCV 3.x check
++  PKG_CHECK_MODULES(OPENCV3, opencv >= 3, [HAVE_OPENCV3=true], [true])
++  if test x$HAVE_OPENCV3 = xfalse; then
++    AC_DEFINE([HAVE_OPENCV3],[0],[Define to 1 if you have OpenCV >= 3])
++  else
++    AC_DEFINE([HAVE_OPENCV3],[1],[Define to 1 if you have OpenCV >= 3])
++  fi
+ fi
+ AM_CONDITIONAL([HAVE_OPENCV], [test x$HAVE_OPENCV = xtrue])
++AM_CONDITIONAL([HAVE_OPENCV3], [test x$HAVE_OPENCV3 = xtrue])
+ 
+ #ToDo: Make Boost optional like OpenCV. (Boost_Require takes two arguments if found and if not ...)
+ HAVE_BOOST=false
+diff --git a/exe/Makefile.am b/exe/Makefile.am
+index 15fb25f..1bb8fc2 100644
+--- a/exe/Makefile.am
++++ b/exe/Makefile.am
+@@ -22,7 +22,12 @@ limereg_CFLAGS += @OPENCV_CFLAGS@
+ limereg_CPPFLAGS += @OPENCV_CFLAGS@
+ #limereg_LDFLAGS += @OPENCV_LDFLAGS@
+ #limereg_LDADD += @OPENCV_LIBS@
++
++if HAVE_OPENCV3
+ limereg_LDADD += -lopencv_highgui -lopencv_core -lopencv_imgcodecs
++else
++limereg_LDADD += -lopencv_highgui -lopencv_core
++endif #HAVE_OPENCV3
+ 
+ #Manpages for the command-line utility
+ if HAVE_HELP2MAN
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..52f6da7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+ocv3check

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/limereg.git



More information about the debian-science-commits mailing list