FreeBSD Bugzilla – Attachment 243138 Details for
Bug 272311
graphics/exiv2: upgrade to v0.28
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
graphics/geeqie: make compatible with exiv2 0.28
0009-graphics-geeqie-make-compatible-with-exiv2-0.28.patch (text/plain), 4.14 KB, created by
Matthias Andree
on 2023-07-02 14:54:30 UTC
(
hide
)
Description:
graphics/geeqie: make compatible with exiv2 0.28
Filename:
MIME Type:
Creator:
Matthias Andree
Created:
2023-07-02 14:54:30 UTC
Size:
4.14 KB
patch
obsolete
>From d8b9445396f52fe1809e06d302174ec812c987ae Mon Sep 17 00:00:00 2001 >From: Matthias Andree <mandree@FreeBSD.org> >Date: Sun, 2 Jul 2023 14:32:40 +0200 >Subject: [PATCH 09/20] graphics/geeqie: make compatible with exiv2 0.28 > >Mostly https://github.com/BestImageViewer/geeqie/commit/86d5f780bae35d0fc2122646ff415633b5f15a60 >without the #if mess. > >Note there is a remaining NEF crasher reported against newer 2.1, >supposedly fixed by https://github.com/BestImageViewer/geeqie/commit/c45cca777aa3477eaf297db99f337e18d9683c61 >which is not part of this commit. > >PR: 272311 >--- > graphics/geeqie/Makefile | 3 +- > graphics/geeqie/files/patch-src_exiv2.cc | 95 ++++++++++++++++++++++++ > 2 files changed, 97 insertions(+), 1 deletion(-) > create mode 100644 graphics/geeqie/files/patch-src_exiv2.cc > >diff --git a/graphics/geeqie/Makefile b/graphics/geeqie/Makefile >index 18b81ae56e22..93c569abfa5a 100644 >--- a/graphics/geeqie/Makefile >+++ b/graphics/geeqie/Makefile >@@ -1,7 +1,7 @@ > PORTNAME= geeqie > DISTVERSIONPREFIX= v > DISTVERSION= 2.0.1 >-PORTREVISION= 11 >+PORTREVISION= 12 > CATEGORIES= graphics > > MAINTAINER= amdmi3@FreeBSD.org >@@ -21,6 +21,7 @@ USE_GNOME= cairo gdkpixbuf2 gtk30 glib20 > USE_GITHUB= yes > GH_ACCOUNT= BestImageViewer > SHEBANG_FILES= plugins/*/geeqie-* >+CFLAGS= -Wno-deprecated-declarations > > PORTDOCS= * > >diff --git a/graphics/geeqie/files/patch-src_exiv2.cc b/graphics/geeqie/files/patch-src_exiv2.cc >new file mode 100644 >index 000000000000..cf6ee24db1d5 >--- /dev/null >+++ b/graphics/geeqie/files/patch-src_exiv2.cc >@@ -0,0 +1,95 @@ >+--- src/exiv2.cc.orig 2022-08-12 09:36:37 UTC >++++ src/exiv2.cc >+@@ -52,6 +52,11 @@ >+ #define EXV_PACKAGE "exiv2" >+ #endif >+ >++#if EXIV2_TEST_VERSION(0,28,0) >++#define AnyError Error >++#define AutoPtr UniquePtr >++#endif >++ >+ extern "C" { >+ #include <glib.h> >+ >+@@ -176,7 +181,7 @@ struct _ExifDataOriginal : public _ExifData (public) >+ { >+ cp_data_ = NULL; >+ cp_length_ = 0; >+- image_ = image; >++ image_ = std::move(image); >+ valid_ = TRUE; >+ } >+ >+@@ -364,7 +369,7 @@ struct _ExifDataProcessed : public _ExifData (public) >+ Exiv2::Image *image = imageData_->image(); >+ >+ #ifdef HAVE_EXIV2_ERROR_CODE >+- if (!image) throw Exiv2::Error(Exiv2::kerInputDataReadFailed); >++ if (!image) throw Exiv2::Error(Exiv2::ErrorCode::kerInputDataReadFailed); >+ #else >+ if (!image) throw Exiv2::Error(21); >+ #endif >+@@ -388,7 +393,7 @@ struct _ExifDataProcessed : public _ExifData (public) >+ sidecar->writeMetadata(); >+ #else >+ #ifdef HAVE_EXIV2_ERROR_CODE >+- throw Exiv2::Error(Exiv2::kerNotAnImage, "xmp"); >++ throw Exiv2::Error(Exiv2::ErrorCode::kerNotAnImage, "xmp"); >+ #else >+ throw Exiv2::Error(3, "xmp"); >+ #endif >+@@ -840,7 +845,7 @@ gint exif_item_get_integer(ExifItem *item, gint *value >+ { >+ try { >+ if (!item || exif_item_get_elements(item) == 0) return 0; >+- *value = ((Exiv2::Metadatum *)item)->toLong(); >++ *value = ((Exiv2::Metadatum *)item)->toInt64(); >+ return 1; >+ } >+ catch (Exiv2::AnyError& e) { >+@@ -1224,11 +1229,12 @@ guchar *exif_get_preview(ExifData *exif, guint *data_l >+ >+ Exiv2::PreviewImage image = pm.getPreviewImage(*pos); >+ >++ // https://github.com/BestImageViewer/geeqie/issues/1090 >+ Exiv2::DataBuf buf = image.copy(); >+- std::pair<Exiv2::byte*, long> p = buf.release(); >+- >+- *data_len = p.second; >+- return p.first; >++ *data_len = buf.size(); >++ auto b = buf.data(); >++ buf.reset(); >++ return b; >+ } >+ return NULL; >+ } >+@@ -1489,22 +1495,22 @@ unsigned long RawFile::preview_offset(void) >+ if (type == Exiv2::ImageType::cr2) >+ { >+ val = find(0x111, Group::ifd0); >+- if (val) return val->toLong(); >++ if (val) return val->toInt64(); >+ >+ return 0; >+ } >+ >+ val = find(0x201, Group::sub0_0); >+- if (val) return val->toLong(); >++ if (val) return val->toInt64(); >+ >+ val = find(0x201, Group::ifd0); >+- if (val) return val->toLong(); >++ if (val) return val->toInt64(); >+ >+ val = find(0x201, Group::ignr); // for PEF files, originally it was probably ifd2 >+- if (val) return val->toLong(); >++ if (val) return val->toInt64(); >+ >+ val = find(0x111, Group::sub0_1); // dng >+- if (val) return val->toLong(); >++ if (val) return val->toInt64(); >+ >+ return 0; >+ } >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mandree
:
maintainer-approval?
(
amdmi3
)
Actions:
View
|
Diff
Attachments on
bug 272311
:
243098
|
243100
|
243103
|
243104
|
243106
|
243111
|
243124
|
243125
|
243135
|
243136
|
243137
| 243138 |
243139
|
243140
|
243141
|
243142
|
243143
|
243144
|
243145
|
243146
|
243147
|
243148
|
243154
|
243155
|
243156
|
243157
|
243158
|
243159
|
243160
|
243166
|
243167
|
243168
|
243169
|
243170
|
243171
|
243172
|
243175
|
243176