Package: actiona
Version: 3.10.0-1
Followup-For: Bug #922566
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu focal ubuntu-patch

Control: tags -1 + patch

Hello,

Attached is a patch to fix actiona for source compatibility with opencv 4. 
I have uploaded these changes to Ubuntu for the opencv4 transition.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru actiona-3.10.0/debian/patches/opencv4-compat.patch 
actiona-3.10.0/debian/patches/opencv4-compat.patch
--- actiona-3.10.0/debian/patches/opencv4-compat.patch  1969-12-31 
16:00:00.000000000 -0800
+++ actiona-3.10.0/debian/patches/opencv4-compat.patch  2019-11-24 
11:57:11.000000000 -0800
@@ -0,0 +1,71 @@
+Description: compatibility with opencv4
+ Some code assumes only opencv 2 and opencv 3 exist.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Last-Updated: 2019-11-24
+Bug-Debian: https://bugs.debian.org/922566
+
+Index: actiona-3.10.0/actiontools/opencvalgorithms_private.h
+===================================================================
+--- actiona-3.10.0.orig/actiontools/opencvalgorithms_private.h
++++ actiona-3.10.0/actiontools/opencvalgorithms_private.h
+@@ -23,6 +23,7 @@
+ #include "opencvalgorithms.h"
+ 
+ #include <opencv2/opencv.hpp>
++#include <opencv2/imgproc/types_c.h>
+ 
+ #include <QList>
+ 
+@@ -33,7 +34,7 @@
+ }
+ 
+ using Mat = cv::Mat;
+-#elif CV_MAJOR_VERSION == 3
++#elif CV_MAJOR_VERSION >= 3
+ namespace cv
+ {
+     class UMat;
+Index: actiona-3.10.0/actiontools/opencvalgorithms.cpp
+===================================================================
+--- actiona-3.10.0.orig/actiontools/opencvalgorithms.cpp
++++ actiona-3.10.0/actiontools/opencvalgorithms.cpp
+@@ -350,7 +350,7 @@
+ 
+ #if CV_MAJOR_VERSION == 2
+         const Mat &matImage = image;
+-#elif CV_MAJOR_VERSION == 3
++#elif CV_MAJOR_VERSION >= 3
+         cv::Mat matImage = image.getMat(cv::ACCESS_READ);
+ #endif
+ 
+@@ -394,7 +394,7 @@
+       {
+ #if CV_MAJOR_VERSION == 2
+         const cv::Mat &matImage = image;
+-#elif CV_MAJOR_VERSION == 3
++#elif CV_MAJOR_VERSION >= 3
+         cv::Mat matImage = image.getMat(cv::ACCESS_READ);
+ #endif
+ 
+@@ -411,7 +411,7 @@
+ 
+ #if CV_MAJOR_VERSION == 2
+                 return back;
+-#elif CV_MAJOR_VERSION == 3
++#elif CV_MAJOR_VERSION >= 3
+                 return back.getUMat(cv::ACCESS_RW);
+ #endif
+     }
+Index: actiona-3.10.0/actiontools/actiontools.pro
+===================================================================
+--- actiona-3.10.0.orig/actiontools/actiontools.pro
++++ actiona-3.10.0/actiontools/actiontools.pro
+@@ -6,7 +6,7 @@
+ TEMPLATE = lib
+ CONFIG += dll
+ unix:CONFIG += link_pkgconfig
+-unix:PKGCONFIG += opencv
++unix:PKGCONFIG += opencv4
+ DEFINES += ACTIONTOOLS_LIBRARY
+ TARGET = actiontools
+ DESTDIR = ..
diff -Nru actiona-3.10.0/debian/patches/series 
actiona-3.10.0/debian/patches/series
--- actiona-3.10.0/debian/patches/series        2019-01-07 06:26:27.000000000 
-0800
+++ actiona-3.10.0/debian/patches/series        2019-11-24 11:56:10.000000000 
-0800
@@ -0,0 +1 @@
+opencv4-compat.patch

Reply via email to