summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-12-25 16:12:11 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2018-12-25 22:23:19 +0100
commit6c9ac5f10af7c87b21d9eb1276cb4692cb4d4932 (patch)
tree895e6cd9f0b3db4571d501bb310a5299f226ec18 /kde-misc/krename
parentmedia-gfx/exiv2: 0.27.0 version bump (diff)
downloadgentoo-6c9ac5f10af7c87b21d9eb1276cb4692cb4d4932.tar.gz
gentoo-6c9ac5f10af7c87b21d9eb1276cb4692cb4d4932.tar.bz2
gentoo-6c9ac5f10af7c87b21d9eb1276cb4692cb4d4932.zip
kde-misc/krename: Backport >=exiv-0.27 support from master
Instead of adding FindLibExiv2.cmake through the patch we will just bump minimum depend to FRAMEWORKS_MINIMAL=5.53.0. Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-misc/krename')
-rw-r--r--kde-misc/krename/files/krename-5.0.0-exiv2-0.27.patch188
-rw-r--r--kde-misc/krename/krename-5.0.0-r1.ebuild55
2 files changed, 243 insertions, 0 deletions
diff --git a/kde-misc/krename/files/krename-5.0.0-exiv2-0.27.patch b/kde-misc/krename/files/krename-5.0.0-exiv2-0.27.patch
new file mode 100644
index 000000000000..fdc13a1815e3
--- /dev/null
+++ b/kde-misc/krename/files/krename-5.0.0-exiv2-0.27.patch
@@ -0,0 +1,188 @@
+From ec90823494f5ec9bb2e8098f44209f383ef8c22a Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Tue, 20 Nov 2018 18:24:29 +0100
+Subject: Use #cmakedefine01 instead of macro_bool_to_01
+
+---
+ CMakeLists.txt | 13 +++++--------
+ config-krename.h.cmake | 10 +++++-----
+ 3 files changed, 10 insertions(+), 33 deletions(-)
+ delete mode 100644 cmake/modules/MacroBoolTo01.cmake
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -80,13 +80,10 @@ set_package_properties(Freetype PROPERTIES
+
+ feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+
+-
+-# Update configuration
+-include(MacroBoolTo01)
+-macro_bool_to_01(TAGLIB_FOUND HAVE_TAGLIB)
+-macro_bool_to_01(EXIV2_FOUND HAVE_EXIV2)
+-macro_bool_to_01(PoDoFo_FOUND HAVE_PODOFO)
+-macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE)
++set(HAVE_TAGLIB ${TAGLIB_FOUND})
++set(HAVE_EXIV2 ${LibExiv2_FOUND})
++set(HAVE_PODOFO ${PoDoFo_FOUND})
++set(HAVE_FREETYPE ${FREETYPE_FOUND})
+ configure_file(config-krename.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-krename.h)
+
+ # Directories
+--- a/config-krename.h.cmake
++++ b/config-krename.h.cmake
+@@ -1,15 +1,15 @@
+ /* config.h. Generated by cmake from config.h.cmake */
+
+ /* have TagLib */
+-#define HAVE_TAGLIB ${HAVE_TAGLIB}
++#cmakedefine01 HAVE_TAGLIB
+
+ /* have Exiv2 */
+-#define HAVE_EXIV2 ${HAVE_EXIV2}
++#cmakedefine01 HAVE_EXIV2
+
+ /* have PoDoFo */
+-#define HAVE_PODOFO ${HAVE_PODOFO}
++#cmakedefine01 HAVE_PODOFO
+
+ /* have Freetype */
+-#define HAVE_FREETYPE ${HAVE_FREETYPE}
++#cmakedefine01 HAVE_FREETYPE
+
+-#define VERSION "${KRENAME_VERSION}"
++#define VERSION "${krename_VERSION}"
+--
+cgit v1.1
+
+From b22de9135ba2a5abdbd2b275a60933a50f074010 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Tue, 20 Nov 2018 18:26:47 +0100
+Subject: Fix building against exiv2-0.27
+
+One neeeded part is to copy over the new FindLibExiv2 module from
+ECM which has not appeared in a release yet (it will with 5.53.0).
+I'll probably add that version as a requirement and remove the copy
+again in the near future.
+The other part includes raising the cmake version requirement to
+3.7.0, which was released over 2 years ago. (The version comparison
+could be easily solved differently and less elegantly, but let's see
+if people with ancient cmakes complain).
+---
+ CMakeLists.txt | 15 ++---
+ config-krename.h.cmake | 3 +
+ src/CMakeLists.txt | 8 +--
+ src/exiv2plugin.cpp | 8 ++-
+ 6 files changed, 137 insertions(+), 91 deletions(-)
+ delete mode 100644 cmake/modules/FindExiv2.cmake
+ create mode 100644 cmake/modules/FindLibExiv2.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,5 @@
+-project(krename)
+
+-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
++cmake_minimum_required(VERSION 3.7)
++
++project(krename VERSION "5.0.0")
+
+@@ -39,10 +40,6 @@ add_definitions(
+ -DQT_STRICT_ITERATORS
+ )
+
+-set(KRENAME_VERSION "5.0.0")
+-
+-include(FindGettext)
+-
+ # Find taglib
+ set(TAGLIB_MIN_VERSION "1.5")
+ find_package(Taglib ${TAGLIB_MIN_VERSION})
+@@ -58,11 +55,12 @@ set_package_properties(Taglib PROPERTIES
+ TYPE OPTIONAL)
+
+ # Find exiv2
+-find_package(Exiv2 0.13) # AccessMode was added in 0.13
+-set_package_properties(Exiv2 PROPERTIES
+- DESCRIPTION "A library to access image metadata"
+- URL "http://www.exiv2.org"
+- TYPE OPTIONAL)
++find_package(LibExiv2 0.13) # AccessMode was added in 0.13
++set_package_properties(LibExiv2 PROPERTIES TYPE OPTIONAL)
++
++if (LibExiv2_VERSION VERSION_GREATER_EQUAL "0.27")
++ set(HAVE_LIBEXIV2_0_27 TRUE)
++endif()
+
+ # Find podofo
+ find_package(PoDoFo)
+--- a/config-krename.h.cmake
++++ b/config-krename.h.cmake
+@@ -6,6 +6,9 @@
+ /* have Exiv2 */
+ #cmakedefine01 HAVE_EXIV2
+
++/* Defined if we have libexiv2 >= 0.27 */
++#cmakedefine HAVE_LIBEXIV2_0_27
++
+ /* have PoDoFo */
+ #cmakedefine01 HAVE_PODOFO
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -23,7 +23,7 @@ if(FREETYPE_FOUND)
+ include_directories(${FREETYPE_INCLUDE_DIRS})
+ endif()
+
+-add_definitions(${TAGLIB_CFLAGS} ${EXIV2_CFLAGS})
++add_definitions(${TAGLIB_CFLAGS})
+ # Exiv2 needs exceptions
+ kde_enable_exceptions()
+
+@@ -67,7 +67,7 @@ set(krename_SRCS
+ snumplugin.cpp
+ )
+
+-if(EXIV2_FOUND)
++if(LibExiv2_FOUND)
+ set(krename_SRCS ${krename_SRCS}
+ exiv2plugin.cpp
+ )
+@@ -137,9 +137,9 @@ if(TAGLIB_FOUND)
+ ${TAGLIB_LIBRARIES}
+ )
+ endif()
+-if(EXIV2_FOUND)
++if(LibExiv2_FOUND)
+ target_link_libraries(krename
+- ${EXIV2_LIBRARIES}
++ LibExiv2::LibExiv2
+ )
+ endif()
+ if(PoDoFo_FOUND)
+--- a/src/exiv2plugin.cpp
++++ b/src/exiv2plugin.cpp
+@@ -17,13 +17,19 @@
+
+ #include "exiv2plugin.h"
+
++#include "../config-krename.h"
++
+ #include <KLocalizedString>
+
+ #include <exiv2/error.hpp>
+ #include <exiv2/exif.hpp>
+ #include <exiv2/image.hpp>
+ #include <exiv2/iptc.hpp>
+-#include <exiv2/xmp.hpp>
++#ifdef HAVE_LIBEXIV2_0_27
++ #include <exiv2/xmp_exiv2.hpp>
++#else
++ #include <exiv2/xmp.hpp>
++#endif
+ #include <exiv2/tags.hpp>
+
+ #include "batchrenamer.h"
+--
+cgit v1.1
diff --git a/kde-misc/krename/krename-5.0.0-r1.ebuild b/kde-misc/krename/krename-5.0.0-r1.ebuild
new file mode 100644
index 000000000000..b0d09e4cb5cd
--- /dev/null
+++ b/kde-misc/krename/krename-5.0.0-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FRAMEWORKS_MINIMAL="5.53.0"
+KDE_TEST="true"
+inherit kde5
+
+DESCRIPTION="Powerful batch file renamer"
+HOMEPAGE="http://www.krename.net/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="exif pdf taglib truetype"
+
+DEPEND="
+ $(add_frameworks_dep kcompletion)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kcrash)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kitemviews)
+ $(add_frameworks_dep kjobwidgets)
+ $(add_frameworks_dep kjs)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kxmlgui)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ exif? ( media-gfx/exiv2:= )
+ pdf? ( app-text/podofo )
+ taglib? ( media-libs/taglib )
+ truetype? ( media-libs/freetype:2 )
+"
+RDEPEND="${DEPEND}
+ !kde-misc/krename:4
+"
+
+PATCHES=( "${FILESDIR}/${P}-exiv2-0.27.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package exif LibExiv2)
+ $(cmake-utils_use_find_package taglib Taglib)
+ $(cmake-utils_use_find_package pdf PoDoFo)
+ $(cmake-utils_use_find_package truetype Freetype)
+ )
+
+ kde5_src_configure
+}