Hello community, here is the log from the commit of package digikam for openSUSE:Factory checked in at 2020-01-12 23:24:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/digikam (Old) and /work/SRC/openSUSE:Factory/.digikam.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "digikam" Sun Jan 12 23:24:08 2020 rev:186 rq:763631 version:6.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/digikam/digikam.changes 2019-11-30 10:38:22.724165002 +0100 +++ /work/SRC/openSUSE:Factory/.digikam.new.6675/digikam.changes 2020-01-12 23:26:08.382855085 +0100 @@ -1,0 +2,7 @@ +Sat Jan 11 22:09:41 UTC 2020 - Fabian Vogt <fab...@ritter-vogt.de> + +- Add patches to fix build with OpenCV >= 4.2 (boo#1160721): + * fix-build-with-opencv-4.2.patch + * dlib-update-to-work-with-latest-version-of-OpenCV.patch + +------------------------------------------------------------------- New: ---- dlib-update-to-work-with-latest-version-of-OpenCV.patch fix-build-with-opencv-4.2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ digikam.spec ++++++ --- /var/tmp/diff_new_pack.d93h9l/_old 2020-01-12 23:26:12.006856425 +0100 +++ /var/tmp/diff_new_pack.d93h9l/_new 2020-01-12 23:26:12.030856433 +0100 @@ -1,7 +1,7 @@ # # spec file for package digikam # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,9 @@ Patch0: 0001-Disable-detection-of-OpenGL-for-GLES-platforms.patch # PATCH-FIX-OPENSUSE -- Lower minimum exiv2 version to 0.26 Patch1: 0001-Revert-Exiv2-is-now-released-with-exported-targets-u.patch +# PATCH-FIX-UPSTREAM +Patch2: fix-build-with-opencv-4.2.patch +Patch3: dlib-update-to-work-with-latest-version-of-OpenCV.patch BuildRequires: QtAV-devel >= 1.12 BuildRequires: bison BuildRequires: boost-devel @@ -179,6 +182,8 @@ # Leap 15 only has exiv2 0.26 %patch1 -p1 %endif +%patch2 -p1 +%patch3 -p1 # Remove build time references so build-compare can do its work FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') ++++++ dlib-update-to-work-with-latest-version-of-OpenCV.patch ++++++ >From 34dc7303045877226ebdd6cd07ce6384c0881eb8 Mon Sep 17 00:00:00 2001 From: Davis King <da...@dlib.net> Date: Sun, 22 Dec 2019 07:52:08 -0500 Subject: [PATCH] Fix opencv version check to work on all opencv versions Index: digikam-6.4.0/core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/cv_image.h =================================================================== --- digikam-6.4.0.orig/core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/cv_image.h +++ digikam-6.4.0/core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/cv_image.h @@ -52,7 +52,16 @@ public: << "\n\t img.channels(): " << img.channels() << "\n\t img.pixel_traits<pixel_type>::num: " << pixel_traits<pixel_type>::num ); +// Note, do NOT use CV_VERSION_MAJOR because in OpenCV 2 CV_VERSION_MAJOR actually held +// CV_VERSION_MINOR and instead they used CV_VERSION_EPOCH. So for example, in OpenCV +// 2.4.9.1 CV_VERSION_MAJOR==4 and CV_VERSION_EPOCH==2. However, CV_MAJOR_VERSION has always +// (seemingly) held the actual major version number, so we use that to test for the OpenCV major +// version. +#if CV_MAJOR_VERSION > 3 + IplImage temp = cvIplImage(img); +#else IplImage temp = img; +#endif init(&temp); } ++++++ fix-build-with-opencv-4.2.patch ++++++ >From cff33fbc9c7c69f92be990cef0f19e63ac1f7654 Mon Sep 17 00:00:00 2001 From: Antonio Rojas <aro...@archlinux.org> Date: Sat, 21 Dec 2019 14:46:46 +0100 Subject: [PATCH] Fix build with opencv 4.2 Port away from old API which is removed in 4.2 Differential Revision: https://phabricator.kde.org/D26143 --- .../facesengine/detection/opencv-face/opencvfacedetector_p.cpp | 2 +- .../facesengine/detection/opencv-face/opencvfacedetector_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: digikam-6.4.0/core/libs/facesengine/detection/opencvfacedetector.cpp =================================================================== --- digikam-6.4.0.orig/core/libs/facesengine/detection/opencvfacedetector.cpp +++ digikam-6.4.0/core/libs/facesengine/detection/opencvfacedetector.cpp @@ -166,7 +166,7 @@ public: * of the region of interest of this cascade (still relative to whole image). * For frontal face cascades, returns the given parameter unchanged. */ - cv::Rect faceROI(const CvRect& faceRect) const + cv::Rect faceROI(const cv::Rect& faceRect) const { return cv::Rect(lround(faceRect.x + roi.x() * faceRect.width), lround(faceRect.y + roi.y() * faceRect.height),