Date: Thursday, November 22, 2018 @ 07:08:42 Author: arojas Revision: 340216
opencv 4.0 rebuild Added: digikam/kde-unstable/digikam-opencv4.patch Modified: digikam/kde-unstable/PKGBUILD -----------------------+ PKGBUILD | 11 ++++++--- digikam-opencv4.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-11-22 06:09:13 UTC (rev 340215) +++ PKGBUILD 2018-11-22 07:08:42 UTC (rev 340216) @@ -7,7 +7,7 @@ pkgname=digikam _pkgver=6.0.0-beta2 pkgver=${_pkgver//-/_} # for beta versions -pkgrel=2 +pkgrel=3 pkgdesc="An advanced digital photo management application" arch=(x86_64) license=(GPL) @@ -16,13 +16,18 @@ qt5-webengine libkvkontakte libmediawiki) makedepends=(extra-cmake-modules doxygen eigen boost kdoctools) optdepends=('hugin: panorama tool' 'qt5-imageformats: support for additional image formats (WEBP, TIFF)') -source=("http://download.kde.org/unstable/${pkgname}/${pkgname}-${_pkgver}.tar.xz"{,.sig}) +source=("http://download.kde.org/unstable/${pkgname}/${pkgname}-${_pkgver}.tar.xz"{,.sig} + digikam-opencv4.patch) sha256sums=('73ae57e2a5af538f335da312b5e9039268c81f124864af047ac3ebe6a86e7330' - 'SKIP') + 'SKIP' + 'd86033a92eb4fbe337636b1fb943d9234181efef9848ff7544e8117645347542') validpgpkeys=(D1CF2444A7858C5F2FB095B74A77747BC2386E50) # digiKam.org (digiKam project) <digikamdevelo...@gmail.com> prepare() { mkdir -p build + + cd $pkgname-$_pkgver + 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-22 07:08:42 UTC (rev 340216) @@ -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/digikam_opencv.h.cmake.in ++++ b/core/app/utils/digikam_opencv.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; +