[arch-commits] Commit in digikam/trunk (PKGBUILD digikam-opencv4.patch)

Antonio Rojas arojas at archlinux.org
Sun Nov 18 16:53:44 UTC 2018


    Date: Sunday, November 18, 2018 @ 16:53:43
  Author: arojas
Revision: 340098

opencv 4.0 rebuild

Added:
  digikam/trunk/digikam-opencv4.patch
Modified:
  digikam/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |    9 +++++--
 digikam-opencv4.patch |   56 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-11-18 14:29:54 UTC (rev 340097)
+++ PKGBUILD	2018-11-18 16:53:43 UTC (rev 340098)
@@ -7,7 +7,7 @@
 pkgname=(digikam kipi-plugins)
 _pkgver=5.9.0
 pkgver=${_pkgver//-/_} # for beta versions
-pkgrel=2
+pkgrel=3
 pkgdesc="An advanced digital photo management application"
 arch=(x86_64)
 license=(GPL)
@@ -15,9 +15,11 @@
 makedepends=(extra-cmake-modules libkipi libksane liblqr opencv doxygen lensfun eigen boost kdoctools marble-common
              kfilemetadata akonadi-contacts qtav threadweaver kcalcore knotifyconfig libmediawiki libkvkontakte glu)
 source=("http://download.kde.org/stable/${pkgname}/${pkgname}-${_pkgver}.tar.xz"
-        kdebug-395875.patch::"https://cgit.kde.org/digikam.git/patch/core?id=486e34a0")
+        kdebug-395875.patch::"https://cgit.kde.org/digikam.git/patch/core?id=486e34a0"
+        digikam-opencv4.patch)
 sha256sums=('660d32eedcfd6fe1a75170a651fab068ae62f7f092ae710771a2f32a1c550d1b'
-            '3910f0f36ef933649691fe6da47f205d86d79afa9b4f239f86dd540648b55731')
+            '3910f0f36ef933649691fe6da47f205d86d79afa9b4f239f86dd540648b55731'
+            '621faf691d081239d792616ea40bac7a1cc07c3adf1bc74b4adc9107eacb4232')
 
 prepare() {
   mkdir -p build
@@ -24,6 +26,7 @@
 
   cd $pkgbase-$pkgver
   patch -p1 -i ../kdebug-395875.patch   # Fix window state saving on close
+  patch -p1 -i ../digikam-opencv4.patch # fix build with openCV 4
 }
 
 build() {

Added: digikam-opencv4.patch
===================================================================
--- digikam-opencv4.patch	                        (rev 0)
+++ digikam-opencv4.patch	2018-11-18 16:53:43 UTC (rev 340098)
@@ -0,0 +1,56 @@
+diff --git a/core/app/utils/digikam_opencv.h.cmake.in b/core/app/utils/digikam_opencv.h.cmake.in
+index 9195aad6e7..b3d6de1f86 100644
+--- a/core/app/utils/libopencv.h.cmake.in
++++ b/core/app/utils/libopencv.h.cmake.in
+@@ -54,24 +54,36 @@
+ #   include <opencv2/legacy/compat.hpp>
+ #   include <opencv/cvaux.h>
+ #   include <opencv2/imgproc/imgproc.hpp>
+-#else
++#elif OPENCV_TEST_VERSION(4,0,0)
+ #   include <opencv/cv.h>
+ #   include <opencv/cvaux.h>
+ #   include <opencv/cxcore.h>
+ #   include <opencv2/imgproc.hpp>
++#else
++#   include <opencv2/imgproc.hpp>
++#   include <opencv2/core/core_c.h>
++#   include <opencv2/core/types_c.h>
++#   include <opencv2/imgproc/types_c.h>
+ #endif
+ 
+ #if OPENCV_TEST_VERSION(3,0,0)
+ #   include <opencv2/core/core.hpp>
+ #   include <opencv2/core/internal.hpp>
+ #   include <opencv2/contrib/contrib.hpp>
+-#else
++#elif OPENCV_TEST_VERSION(4,0,0)
+ #   include <opencv2/objdetect.hpp>
+ #   include <opencv2/core.hpp>
+ #   include <opencv2/core/utility.hpp>
+ #   include <opencv2/core/persistence.hpp>
+ #   include <opencv2/imgcodecs.hpp>
+ #   include <opencv2/imgcodecs/imgcodecs_c.h>
++#else
++#   include <opencv2/objdetect.hpp>
++#   include <opencv2/core.hpp>
++#   include <opencv2/core/utility.hpp>
++#   include <opencv2/core/persistence.hpp>
++#   include <opencv2/imgcodecs.hpp>
++#   include <opencv2/imgcodecs/legacy/constants_c.h>
+ #endif
+ 
+ // for old-style code
+diff --git a/core/libs/facesengine/detection/opencvfacedetector.cpp b/core/libs/facesengine/detection/opencvfacedetector.cpp
+index 2a28276d09..639540a964 100644
+--- a/core/libs/facesengine/detection/opencvfacedetector.cpp
++++ b/core/libs/facesengine/detection/opencvfacedetector.cpp
+@@ -358,7 +358,7 @@ void OpenCVFaceDetector::updateParameters(const cv::Size& /*scaledSize*/, const
+      * unless in we want very high sensitivity at low speed
+      */
+     if (d->sensitivityVsSpecificity > 0.1 || d->speedVsAccuracy < 0.9)
+-        d->primaryParams.flags = CV_HAAR_DO_CANNY_PRUNING;
++        d->primaryParams.flags = cv::CASCADE_DO_CANNY_PRUNING;
+     else
+         d->primaryParams.flags = 0;
+ 



More information about the arch-commits mailing list