--- /dev/null
+--- libkexiv2-4.14.3/libkexiv2/kexiv2_p.h~ 2014-10-07 08:07:22.000000000 +0200
++++ libkexiv2-4.14.3/libkexiv2/kexiv2_p.h 2019-02-13 09:22:54.475930308 +0100
+@@ -85,6 +85,8 @@
+ #include <exiv2/types.hpp>
+ #include <exiv2/exif.hpp>
+ #include <exiv2/xmpsidecar.hpp>
++#include <exiv2/exiv2.hpp>
++#include <exiv2/version.hpp>
+
+ // Check if Exiv2 support XMP
+
+--- libkexiv2-4.14.3/libkexiv2/kexiv2exif.cpp~ 2014-10-07 08:07:22.000000000 +0200
++++ libkexiv2-4.14.3/libkexiv2/kexiv2exif.cpp 2019-02-13 22:08:25.087400280 +0100
+@@ -986,7 +986,12 @@
+
+ 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
Summary(pl.UTF-8): libkexiv2 - biblioteka do obróbki metadanych obrazków
Name: kde4-libkexiv2
Version: 4.14.3
-Release: 5
+Release: 6
License: GPL v2+
Group: X11/Libraries
Source0: http://download.kde.org/%{_state}/%{version}/src/%{orgname}-%{version}.tar.xz
# Source0-md5: ba361677df71f5946a3f0b0bcace01a8
+Patch0: exiv2-0.27.patch
URL: http://www.kde.org/
BuildRequires: exiv2-devel >= 0.20
BuildRequires: kde4-kdelibs-devel
%prep
%setup -q -n %{orgname}-%{version}
+%patch0 -p1
%build
install -d build
cd build
%cmake \
- ../
+ ../ \
+ -DEXIV2_VERSION:STRING="0.27"
+
%{__make}
%install