summaryrefslogtreecommitdiff
path: root/graphics/libkexiv2
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2019-11-02 13:51:12 +0000
committermaya <maya@pkgsrc.org>2019-11-02 13:51:12 +0000
commitb1c4679077f384283aff77fea09c13f3b9ac3718 (patch)
tree1b5069be82106ee583973a796b6e8483fb4d73b5 /graphics/libkexiv2
parent24a10312a2f0c02dee92586dca33abc70951eed9 (diff)
downloadpkgsrc-b1c4679077f384283aff77fea09c13f3b9ac3718.tar.gz
libkexiv2: fix build with newer exiv2.
Diffstat (limited to 'graphics/libkexiv2')
-rw-r--r--graphics/libkexiv2/distinfo5
-rw-r--r--graphics/libkexiv2/patches/patch-CMakeLists.txt25
-rw-r--r--graphics/libkexiv2/patches/patch-libkexiv2_kexiv2__p.h26
-rw-r--r--graphics/libkexiv2/patches/patch-libkexiv2_kexiv2exif.cpp20
4 files changed, 75 insertions, 1 deletions
diff --git a/graphics/libkexiv2/distinfo b/graphics/libkexiv2/distinfo
index 3350590e1e2..e35b8b17462 100644
--- a/graphics/libkexiv2/distinfo
+++ b/graphics/libkexiv2/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.19 2016/01/10 19:43:10 markd Exp $
+$NetBSD: distinfo,v 1.20 2019/11/02 13:51:12 maya Exp $
SHA1 (libkexiv2-15.08.3.tar.xz) = 09adf7887dc644431a6930ba645162707c16bb3d
RMD160 (libkexiv2-15.08.3.tar.xz) = 190de195363cd668336efa8a0f1995d7f658a6c0
SHA512 (libkexiv2-15.08.3.tar.xz) = f20463dc7d54404c933fb30d55702111aaa1238a521de066c18e91d54f8fe8cb56c51ff4b76100f7508c5b42e24895b864d7ce5b2032652154844f7522c1c1ad
Size (libkexiv2-15.08.3.tar.xz) = 137376 bytes
+SHA1 (patch-CMakeLists.txt) = 321dcdb78b0c2cfbeb3b7237aa3a3cb7c8425a01
+SHA1 (patch-libkexiv2_kexiv2__p.h) = d906d1f970710ee99c290bcc9ecd06336ab7e116
+SHA1 (patch-libkexiv2_kexiv2exif.cpp) = b9a198f0c6a02f40bc8e962e9429ebf4f2772765
diff --git a/graphics/libkexiv2/patches/patch-CMakeLists.txt b/graphics/libkexiv2/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..20db1c332c8
--- /dev/null
+++ b/graphics/libkexiv2/patches/patch-CMakeLists.txt
@@ -0,0 +1,25 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2019/11/02 13:51:12 maya Exp $
+
+Workaround kdelibs4's FindExiv2.cmake not matching for newer exiv2.
+Use pkgconfig instead.
+
+--- CMakeLists.txt.orig 2015-04-30 19:04:22.000000000 +0000
++++ CMakeLists.txt
+@@ -10,6 +10,7 @@ message(STATUS "------------------------
+ message(STATUS "Starting CMake configuration for: libkexiv2")
+
+ find_package(KDE4 REQUIRED)
++find_package(PkgConfig)
+
+ include(KDE4Defaults)
+ include(MacroLibrary)
+@@ -23,8 +24,7 @@ include_directories(${QDBUS_INCLUDE_DIRS
+ set(LIBKEXIV2_AREA_CODE_GENERAL 51003)
+ add_definitions(-DKDE_DEFAULT_DEBUG_AREA=${LIBKEXIV2_AREA_CODE_GENERAL})
+
+-set(EXIV2_MIN_VERSION "0.24")
+-find_package(Exiv2)
++pkg_check_modules(EXIV2 exiv2>=0.25)
+ MACRO_LOG_FEATURE(EXIV2_FOUND "Exiv2" "Required to build libkexiv2." "http://www.exiv2.org"
+ TRUE ${EXIV2_MIN_VERSION} "")
+
diff --git a/graphics/libkexiv2/patches/patch-libkexiv2_kexiv2__p.h b/graphics/libkexiv2/patches/patch-libkexiv2_kexiv2__p.h
new file mode 100644
index 00000000000..1514e391957
--- /dev/null
+++ b/graphics/libkexiv2/patches/patch-libkexiv2_kexiv2__p.h
@@ -0,0 +1,26 @@
+$NetBSD: patch-libkexiv2_kexiv2__p.h,v 1.1 2019/11/02 13:51:12 maya Exp $
+
+New exiv2 support.
+from https://github.com/KDE/libkexiv2/commit/d1be9298c7f2b9c717cda154d41732f230ea13a6
+
+--- libkexiv2/kexiv2_p.h.orig 2015-04-30 19:04:22.000000000 +0000
++++ libkexiv2/kexiv2_p.h
+@@ -74,17 +74,7 @@
+ #pragma GCC visibility push(default)
+ #endif
+
+-#include <exiv2/exv_conf.h>
+-#include <exiv2/error.hpp>
+-#include <exiv2/image.hpp>
+-#include <exiv2/jpgimage.hpp>
+-#include <exiv2/datasets.hpp>
+-#include <exiv2/tags.hpp>
+-#include <exiv2/preview.hpp>
+-#include <exiv2/properties.hpp>
+-#include <exiv2/types.hpp>
+-#include <exiv2/exif.hpp>
+-#include <exiv2/xmpsidecar.hpp>
++#include <exiv2/exiv2.hpp>
+
+ // Check if Exiv2 support XMP
+
diff --git a/graphics/libkexiv2/patches/patch-libkexiv2_kexiv2exif.cpp b/graphics/libkexiv2/patches/patch-libkexiv2_kexiv2exif.cpp
new file mode 100644
index 00000000000..e2c48cacc89
--- /dev/null
+++ b/graphics/libkexiv2/patches/patch-libkexiv2_kexiv2exif.cpp
@@ -0,0 +1,20 @@
+$NetBSD: patch-libkexiv2_kexiv2exif.cpp,v 1.1 2019/11/02 13:51:12 maya Exp $
+
+New exiv2 support.
+From https://github.com/KDE/libkexiv2/commit/d1be9298c7f2b9c717cda154d41732f230ea13a6
+
+--- libkexiv2/kexiv2exif.cpp.orig 2015-04-30 19:04:22.000000000 +0000
++++ libkexiv2/kexiv2exif.cpp
+@@ -986,7 +986,12 @@ bool KExiv2::setTiffThumbnail(const QIma
+
+ if (pos == d->exifMetadata().end() || pos->count() != 1 || pos->toLong() != 0)
+ {
++
++#if EXIV2_TEST_VERSION(0,27,0)
++ throw Exiv2::Error(Exiv2::kerErrorMessage, "Exif.Image.NewSubfileType missing or not set as main image");
++#else
+ throw Exiv2::Error(1, "Exif.Image.NewSubfileType missing or not set as main image");
++#endif
+ }
+
+ // Remove sub-IFD tags