pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/geeqie



Module Name:    pkgsrc
Committed By:   nia
Date:           Wed Jul 17 00:16:50 UTC 2019

Modified Files:
        pkgsrc/graphics/geeqie: distinfo
Added Files:
        pkgsrc/graphics/geeqie/patches: patch-src_exiv2.cc

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

Pointed out by wiz, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/graphics/geeqie/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/geeqie/patches/patch-src_exiv2.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/geeqie/distinfo
diff -u pkgsrc/graphics/geeqie/distinfo:1.12 pkgsrc/graphics/geeqie/distinfo:1.13
--- pkgsrc/graphics/geeqie/distinfo:1.12        Wed Jan 10 09:38:32 2018
+++ pkgsrc/graphics/geeqie/distinfo     Wed Jul 17 00:16:49 2019
@@ -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-Makefile.am) = 49aba28dcb6a3
 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

Added files:

Index: pkgsrc/graphics/geeqie/patches/patch-src_exiv2.cc
diff -u /dev/null pkgsrc/graphics/geeqie/patches/patch-src_exiv2.cc:1.1
--- /dev/null   Wed Jul 17 00:16:50 2019
+++ pkgsrc/graphics/geeqie/patches/patch-src_exiv2.cc   Wed Jul 17 00:16:50 2019
@@ -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