pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/geeqie geeqie: Apply a patch from git to fix ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5efca5887587
branches:  trunk
changeset: 398344:5efca5887587
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Jul 17 00:16:49 2019 +0000

description:
geeqie: Apply a patch from git to fix building with exiv2>=0.27

Pointed out by wiz, thanks.

diffstat:

 graphics/geeqie/distinfo                   |   3 +-
 graphics/geeqie/patches/patch-src_exiv2.cc |  94 ++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 1 deletions(-)

diffs (113 lines):

diff -r 5aefa59e1dc4 -r 5efca5887587 graphics/geeqie/distinfo
--- a/graphics/geeqie/distinfo  Tue Jul 16 22:50:24 2019 +0000
+++ b/graphics/geeqie/distinfo  Wed Jul 17 00:16:49 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2018/01/10 09:38:32 wiz Exp $
+$NetBSD: distinfo,v 1.13 2019/07/17 00:16:49 nia Exp $
 
 SHA1 (geeqie-1.4.tar.xz) = bef0e6c6a0aba8b957375087bcb570cb9dac64b1
 RMD160 (geeqie-1.4.tar.xz) = 1e3ffccba08edc2739051f1252ca653f008de35b
@@ -8,4 +8,5 @@
 SHA1 (patch-ac) = e551d5e733354902254c1a392be5738da6c88170
 SHA1 (patch-configure.in) = d606bab2b701a48af92fc90404740d9a16492e44
 SHA1 (patch-doc_Makefile.am) = 9ffbcd6f8e5bc5710b61dfbfb020e92497d3414f
+SHA1 (patch-src_exiv2.cc) = 67a08c87fe66defb1c43b509b1069b591943559d
 SHA1 (patch-src_layout__util.c) = cb5d82d7c02690fcad6ef8139788100928d03ac1
diff -r 5aefa59e1dc4 -r 5efca5887587 graphics/geeqie/patches/patch-src_exiv2.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/geeqie/patches/patch-src_exiv2.cc        Wed Jul 17 00:16:49 2019 +0000
@@ -0,0 +1,94 @@
+$NetBSD: patch-src_exiv2.cc,v 1.1 2019/07/17 00:16:50 nia Exp $
+
+Fix building with exiv2-0.27
+
+Upstream commit:
+https://github.com/BestImageViewer/geeqie/commit/f9213c8ad796cf4571b2606435c32753040ec645.patch
+
+--- src/exiv2.cc.orig  2017-12-31 12:31:21.000000000 +0000
++++ src/exiv2.cc
+@@ -22,17 +22,25 @@
+ 
+ #ifdef HAVE_EXIV2
+ 
+-#include <exiv2/image.hpp>
+-#include <exiv2/exif.hpp>
++// Don't include the <exiv2/version.hpp> file directly
++// Early Exiv2 versions didn't have version.hpp and the macros.
++#include <exiv2/exiv2.hpp>
+ #include <iostream>
+ #include <string>
+ 
+ // EXIV2_TEST_VERSION is defined in Exiv2 0.15 and newer.
++#ifdef EXIV2_VERSION
+ #ifndef EXIV2_TEST_VERSION
+-# define EXIV2_TEST_VERSION(major,minor,patch) \
++#define EXIV2_TEST_VERSION(major,minor,patch) \
+       ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
+ #endif
++#else
++#define EXIV2_TEST_VERSION(major,minor,patch) (false)
++#endif
+ 
++#if EXIV2_TEST_VERSION(0,27,0)
++#define HAVE_EXIV2_ERROR_CODE
++#endif
+ 
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -40,27 +48,8 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ 
+-#if !EXIV2_TEST_VERSION(0,17,90)
+-#include <exiv2/tiffparser.hpp>
+-#include <exiv2/tiffcomposite.hpp>
+-#include <exiv2/tiffvisitor.hpp>
+-#include <exiv2/tiffimage.hpp>
+-#include <exiv2/cr2image.hpp>
+-#include <exiv2/crwimage.hpp>
+-#if EXIV2_TEST_VERSION(0,16,0)
+-#include <exiv2/orfimage.hpp>
+-#endif
+-#if EXIV2_TEST_VERSION(0,13,0)
+-#include <exiv2/rafimage.hpp>
+-#endif
+-#include <exiv2/futils.hpp>
+-#else
+-#include <exiv2/preview.hpp>
+-#endif
+-
+-#if EXIV2_TEST_VERSION(0,17,0)
+-#include <exiv2/convert.hpp>
+-#include <exiv2/xmpsidecar.hpp>
++#if EXIV2_TEST_VERSION(0,27,0)
++#define EXV_PACKAGE "exiv2"
+ #endif
+ 
+ extern "C" {
+@@ -374,7 +363,11 @@ public:
+ #endif
+                       Exiv2::Image *image = imageData_->image();
+ 
+-                      if (!image) Exiv2::Error(21);
++#ifdef HAVE_EXIV2_ERROR_CODE
++                      if (!image) throw Exiv2::Error(Exiv2::ErrorCode::kerInputDataReadFailed);
++#else
++                      if (!image) throw Exiv2::Error(21);
++#endif
+                       image->setExifData(exifData_);
+                       image->setIptcData(iptcData_);
+ #if EXIV2_TEST_VERSION(0,16,0)
+@@ -394,8 +387,12 @@ public:
+                       sidecar->setXmpData(xmpData_);
+                       sidecar->writeMetadata();
+ #else
++#ifdef HAVE_EXIV2_ERROR_CODE
++                      throw Exiv2::Error(Exiv2::ErrorCode::kerNotAnImage, "xmp");
++#else
+                       throw Exiv2::Error(3, "xmp");
+ #endif
++#endif
+                       }
+       }
+ 



Home | Main Index | Thread Index | Old Index