Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/kphotoalbum/, media-gfx/kphotoalbum/files/
Date: Mon, 31 Dec 2018 21:14:54
Message-Id: 1546290824.4329dfc748a9f4a27af7fc8833592d7acbc0f85a.asturm@gentoo
commit:     4329dfc748a9f4a27af7fc8833592d7acbc0f85a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 31 17:30:04 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec 31 21:13:44 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4329dfc7

media-gfx/kphotoalbum: Fix build with exiv2-0.27

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kphotoalbum-5.4-exiv2-0.27.patch         | 61 ++++++++++++++++++++++
 media-gfx/kphotoalbum/kphotoalbum-5.4.ebuild       |  2 +
 2 files changed, 63 insertions(+)

diff --git a/media-gfx/kphotoalbum/files/kphotoalbum-5.4-exiv2-0.27.patch b/media-gfx/kphotoalbum/files/kphotoalbum-5.4-exiv2-0.27.patch
new file mode 100644
index 00000000000..7b7f612b94f
--- /dev/null
+++ b/media-gfx/kphotoalbum/files/kphotoalbum-5.4-exiv2-0.27.patch
@@ -0,0 +1,61 @@
+From 41c7da0531c8a1eb7046345c2b991e7a5d1e6657 Mon Sep 17 00:00:00 2001
+From: Johannes Zarl-Zierl <johannes@××××××××××.at>
+Date: Sun, 30 Dec 2018 23:36:24 +0100
+Subject: Use Exiv2 0.27 if available.
+
+Beginning with version 0.27, Exiv2 ships with cmake package config
+files.
+---
+ CMakeLists.txt | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3012f7a..5dcc29c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,17 @@ if(JPEG_FOUND)
+     include_directories(${JPEG_INCLUDE_DIR})
+ endif()
+ 
+-find_package(Exiv2 REQUIRED)
++### 2018-12-30 jzarl
++# When Exiv2 0.26 can be deprecated, FindExiv2.cmake should be removed
++# and only find_package(exiv2) should be used
++find_package(exiv2 CONFIG QUIET)
++if(exiv2_FOUND)
++    # search againg with REQUIRED, so that the feature summary correctly shows exiv as required dependency
++    find_package(exiv2 CONFIG REQUIRED)
++    set(EXIV2_LIBRARIES exiv2lib)
++else()
++    find_package(Exiv2 REQUIRED)
++endif()
+ 
+ find_package(KF5Kipi 5.1.0)
+ set_package_properties(KF5Kipi
+-- 
+cgit v1.1
+From cf4f7645b3c94246a1fcf664f1c865a93ae2b684 Mon Sep 17 00:00:00 2001
+From: Johannes Zarl-Zierl <johannes@××××××××××.at>
+Date: Sun, 30 Dec 2018 23:43:14 +0100
+Subject: Fix compilation with exiv2 0.27
+
+---
+ Exif/Info.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Exif/Info.cpp b/Exif/Info.cpp
+index be4c88f..9545360 100644
+--- a/Exif/Info.cpp
++++ b/Exif/Info.cpp
+@@ -28,7 +28,8 @@
+ #include <QFile>
+ 
+ #include <exiv2/image.hpp>
+-#include <exiv2/exif.hpp>
++#include <exiv2/exv_conf.h>
++#include <exiv2/version.hpp>
+ 
+ using namespace Exif;
+ 
+-- 
+cgit v1.1

diff --git a/media-gfx/kphotoalbum/kphotoalbum-5.4.ebuild b/media-gfx/kphotoalbum/kphotoalbum-5.4.ebuild
index ce7c3284e2a..6aaff0db914 100644
--- a/media-gfx/kphotoalbum/kphotoalbum-5.4.ebuild
+++ b/media-gfx/kphotoalbum/kphotoalbum-5.4.ebuild
@@ -49,6 +49,8 @@ RDEPEND="${DEPEND}
 
 DOCS=( ChangeLog README )
 
+PATCHES=( "${FILESDIR}/${P}-exiv2-0.27.patch" )
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake-utils_use_find_package kipi KF5Kipi)