diff options
author | Andrew O'Neill | 2018-12-01 18:43:44 -0500 |
---|---|---|
committer | Andrew O'Neill | 2018-12-01 18:43:44 -0500 |
commit | 166d684e1c5f058328fa6280b00ab7531fa07c61 (patch) | |
tree | 30fc8de37eaac060405e2636b2cf65953806eb3d | |
parent | ef9d6f382fd5e4206fab5093ce83bca1bbb7880f (diff) | |
download | aur-166d684e1c5f058328fa6280b00ab7531fa07c61.tar.gz |
Add patch to build under opencv4
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | actiona.patch | 130 |
3 files changed, 146 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = actiona pkgdesc = A task automation tool that allows you to create and execute action lists pkgver = 3.10.0 - pkgrel = 1 + pkgrel = 2 url = https://wiki.actiona.tools arch = x86_64 license = GPL3 @@ -15,7 +15,9 @@ pkgbase = actiona depends = libnotify depends = qt5-speech source = https://github.com/Jmgr/actiona/archive/v3.10.0.tar.gz + source = actiona.patch sha256sums = 7f7a6ecef82ec51fc5d92e41a9d39d1de190135b1fb6293318feb1d88ceb8757 + sha256sums = f359c8457947fb248d95bae8dd2dd59feaa01aa29b7b778963bc0dc1c7fd963f pkgname = actiona @@ -2,20 +2,29 @@ pkgname=actiona pkgver=3.10.0 -pkgrel=1 +pkgrel=2 pkgdesc="A task automation tool that allows you to create and execute action lists" arch=('x86_64') url="https://wiki.actiona.tools" license=('GPL3') depends=('qt5-script' 'qt5-xmlpatterns' 'qt5-x11extras' 'qt5-multimedia' 'libnotify' 'qt5-speech') makedepends=('qt5-tools' 'boost' 'opencv') -source=("https://github.com/Jmgr/${pkgname}/archive/v${pkgver}.tar.gz") -sha256sums=('7f7a6ecef82ec51fc5d92e41a9d39d1de190135b1fb6293318feb1d88ceb8757') +source=("https://github.com/Jmgr/${pkgname}/archive/v${pkgver}.tar.gz" + "${pkgname}.patch") +sha256sums=('7f7a6ecef82ec51fc5d92e41a9d39d1de190135b1fb6293318feb1d88ceb8757' + 'f359c8457947fb248d95bae8dd2dd59feaa01aa29b7b778963bc0dc1c7fd963f') + +prepare() { + cd "${srcdir}" + + patch -p0 -i ../${pkgname}.patch +} + build() { cd "${pkgname}-${pkgver}" - qmake-qt5 -r PREFIX=/usr + qmake-qt5 -r PREFIX=/usr PKGCONFIG_OPENCV=opencv4 make make locale_release } diff --git a/actiona.patch b/actiona.patch new file mode 100644 index 000000000000..854002d02948 --- /dev/null +++ b/actiona.patch @@ -0,0 +1,130 @@ +diff -rupN actiona-3.10.0/actiona.pro actiona-3.10.0b/actiona.pro +--- actiona-3.10.0/actiona.pro 2018-07-17 14:29:12.000000000 -0400 ++++ actiona-3.10.0b/actiona.pro 2018-12-01 18:13:46.093993934 -0500 +@@ -1,21 +1,6 @@ + TEMPLATE = subdirs
+ CONFIG = ordered
+
+-unix:!mac {
+- !system(pkg-config --exists 'x11') {
+- error(Please install pkg-config) #Here whe assume that x11 is always present, so this is to check if pkg-config is installed
+-}
+- !system(pkg-config --exists 'libnotify') {
+- error(Please install libnotify-dev)
+-}
+- !system(pkg-config --exists 'xtst') {
+- error(Please install libxtst-dev)
+-}
+- !system(pkg-config --exists 'opencv') {
+- error(Please install libopencv-dev)
+-}
+-}
+-
+ win32-g++:error(Mingw is currently not supported, please use the Microsoft compiler suite)
+
+ contains(DEFINES, ACT_NO_UPDATER){
+diff -rupN actiona-3.10.0/actiontools/actiontools.pro actiona-3.10.0b/actiontools/actiontools.pro +--- actiona-3.10.0/actiontools/actiontools.pro 2018-07-17 14:29:12.000000000 -0400 ++++ actiona-3.10.0b/actiontools/actiontools.pro 2018-12-01 18:14:31.113647152 -0500 +@@ -6,7 +6,7 @@ unix:QT += x11extras + TEMPLATE = lib + CONFIG += dll + unix:CONFIG += link_pkgconfig +-unix:PKGCONFIG += opencv ++unix:PKGCONFIG += $$PKGCONFIG_OPENCV + DEFINES += ACTIONTOOLS_LIBRARY + TARGET = actiontools + DESTDIR = .. +diff -rupN actiona-3.10.0/actiontools/opencvalgorithms.cpp actiona-3.10.0b/actiontools/opencvalgorithms.cpp +--- actiona-3.10.0/actiontools/opencvalgorithms.cpp 2018-07-17 14:29:12.000000000 -0400 ++++ actiona-3.10.0b/actiontools/opencvalgorithms.cpp 2018-12-01 18:17:54.966178080 -0500 +@@ -350,7 +350,7 @@ namespace ActionTools + + #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 @@ namespace ActionTools + { + #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 @@ namespace ActionTools + + #if CV_MAJOR_VERSION == 2 + return back; +-#elif CV_MAJOR_VERSION == 3 ++#elif CV_MAJOR_VERSION >= 3 + return back.getUMat(cv::ACCESS_RW); + #endif + } +@@ -421,12 +421,22 @@ namespace ActionTools + switch(method) + { + default: ++#if CV_MAJOR_VERSION < 4 + case ActionTools::OpenCVAlgorithms::CorrelationCoefficientMethod: + return CV_TM_CCOEFF_NORMED; + case ActionTools::OpenCVAlgorithms::CrossCorrelationMethod: + return CV_TM_CCORR_NORMED; + case ActionTools::OpenCVAlgorithms::SquaredDifferenceMethod: + return CV_TM_SQDIFF_NORMED; ++#else ++ case ActionTools::OpenCVAlgorithms::CorrelationCoefficientMethod: ++ return cv::TM_CCOEFF_NORMED; ++ case ActionTools::OpenCVAlgorithms::CrossCorrelationMethod: ++ return cv::TM_CCORR_NORMED; ++ case ActionTools::OpenCVAlgorithms::SquaredDifferenceMethod: ++ return cv::TM_SQDIFF_NORMED; ++#endif ++ + } + } + } +diff -rupN actiona-3.10.0/actiontools/opencvalgorithms_private.h actiona-3.10.0b/actiontools/opencvalgorithms_private.h +--- actiona-3.10.0/actiontools/opencvalgorithms_private.h 2018-07-17 14:29:12.000000000 -0400 ++++ actiona-3.10.0b/actiontools/opencvalgorithms_private.h 2018-12-01 18:18:40.094024935 -0500 +@@ -33,7 +33,7 @@ namespace cv + }
+
+ using Mat = cv::Mat;
+-#elif CV_MAJOR_VERSION == 3
++#elif CV_MAJOR_VERSION >= 3
+ namespace cv
+ {
+ class UMat;
+diff -rupN actiona-3.10.0/common.pri actiona-3.10.0b/common.pri +--- actiona-3.10.0/common.pri 2018-07-17 14:29:12.000000000 -0400 ++++ actiona-3.10.0b/common.pri 2018-12-01 18:20:22.893901846 -0500 +@@ -11,6 +11,24 @@ if(!isEmpty(VERSION_OVERRIDE)) { + ACTIONA_VERSION = $$VERSION_OVERRIDE
+ }
+
++if(isEmpty(PKGCONFIG_OPENCV)) {
++ PKGCONFIG_OPENCV = opencv
++}
++unix:!mac {
++ !system(pkg-config --exists 'x11') {
++ error(Please install pkg-config) #Here whe assume that x11 is always present, so this is to check if pkg-config is installed
++}
++ !system(pkg-config --exists 'libnotify') {
++ error(Please install libnotify development libraries (libnotify-dev on Debian))
++}
++ !system(pkg-config --exists 'xtst') {
++ error(Please install XTest development libraries (libxtst-dev on Debian))
++}
++ !system(pkg-config --exists '$$PKGCONFIG_OPENCV') {
++ error(Please install OpenCV development libraries (libopencv-dev on Debian))
++}
++}
++
+ DEFINES *= ACT_VERSION=$$ACTIONA_VERSION
+ DEFINES *= ACT_SCRIPT_VERSION=$$SCRIPT_VERSION
+ DEFINES *= ACT_BUILD_NAME=\\\"$$BUILD_NAME\\\"
|