FreeBSD Bugzilla – Attachment 243159 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/ufraw: make compatible with exiv2 0.28
0006-graphics-ufraw-make-compatible-with-exiv2-0.28.patch (text/plain), 5.19 KB, created by
Matthias Andree
on 2023-07-02 22:17:46 UTC
(
hide
)
Description:
graphics/ufraw: make compatible with exiv2 0.28
Filename:
MIME Type:
Creator:
Matthias Andree
Created:
2023-07-02 22:17:46 UTC
Size:
5.19 KB
patch
obsolete
>From 1cba08c4232b44af3f260cf7ef18fef6f9c511a2 Mon Sep 17 00:00:00 2001 >From: Matthias Andree <mandree@FreeBSD.org> >Date: Mon, 3 Jul 2023 00:08:28 +0200 >Subject: [PATCH 6/7] graphics/ufraw: make compatible with exiv2 0.28 > >PR: 272311 >--- > graphics/ufraw/Makefile | 6 +- > graphics/ufraw/files/patch-ufraw__exiv2.cc | 74 ++++++++++++++++++++++ > 2 files changed, 78 insertions(+), 2 deletions(-) > create mode 100644 graphics/ufraw/files/patch-ufraw__exiv2.cc > >diff --git a/graphics/ufraw/Makefile b/graphics/ufraw/Makefile >index 3a9caf1c450a..6ba1718afe17 100644 >--- a/graphics/ufraw/Makefile >+++ b/graphics/ufraw/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= ufraw > PORTVERSION= 0.22.20210424 >-PORTREVISION= 7 >+PORTREVISION= 8 > CATEGORIES= graphics > > MAINTAINER= rodrigo@FreeBSD.org >@@ -11,6 +11,7 @@ LICENSE= GPLv2 > > LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ > libfreetype.so:print/freetype2 \ >+ libharfbuzz.so:print/harfbuzz \ > libjasper.so:graphics/jasper \ > liblcms2.so:graphics/lcms2 \ > libpng.so:graphics/png \ >@@ -18,7 +19,7 @@ LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ > > USES= autoreconf compiler:c++11-lang desktop-file-utils gettext \ > gmake gnome jpeg pkgconfig >-USE_CXXSTD= gnu++98 >+USE_CXXSTD= gnu++14 > USE_GITHUB= yes > GH_ACCOUNT= sergiomb2 > GH_TAGNAME= f34669b >@@ -30,6 +31,7 @@ CONFIGURE_ARGS= --enable-extras \ > --disable-mime > > CPPFLAGS+= -I${LOCALBASE}/include >+#CXXFLAGS+= -D_NOEXCEPT=noexcept > LDFLAGS+= -lpthread -L${LOCALBASE}/lib > > CONFLICTS_INSTALL= dcraw >diff --git a/graphics/ufraw/files/patch-ufraw__exiv2.cc b/graphics/ufraw/files/patch-ufraw__exiv2.cc >new file mode 100644 >index 000000000000..bd04c1dfae93 >--- /dev/null >+++ b/graphics/ufraw/files/patch-ufraw__exiv2.cc >@@ -0,0 +1,74 @@ >+--- ufraw_exiv2.cc.orig 2021-04-25 05:24:28 UTC >++++ ufraw_exiv2.cc >+@@ -50,10 +50,10 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf) >+ uf->inputExifBuf = NULL; >+ uf->inputExifBufLen = 0; >+ >+- Exiv2::Image::AutoPtr image; >++ Exiv2::Image::UniquePtr image; >+ if (uf->unzippedBuf != NULL) { >+- image = Exiv2::ImageFactory::open( >+- (const Exiv2::byte*)uf->unzippedBuf, uf->unzippedBufLen); >++ image = std::move(Exiv2::ImageFactory::open( >++ (const Exiv2::byte*)uf->unzippedBuf, uf->unzippedBufLen)); >+ } else { >+ char *filename = uf_win32_locale_filename_from_utf8(uf->filename); >+ image = Exiv2::ImageFactory::open(filename); >+@@ -66,7 +66,9 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf) >+ if (exifData.empty()) { >+ std::string error(uf->filename); >+ error += ": No Exif data found in the file"; >+-#if EXIV2_TEST_VERSION(0,27,0) >++#if EXIV2_TEST_VERSION(0,28,0) >++ throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, error); >++#elif EXIV2_TEST_VERSION(0,27,0) >+ throw Exiv2::Error(Exiv2::kerErrorMessage, error); >+ #else >+ throw Exiv2::Error(1, error); >+@@ -135,7 +137,7 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf) >+ ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str()); >+ >+ return UFRAW_SUCCESS; >+- } catch (Exiv2::AnyError& e) { >++ } catch (Exiv2::Error& e) { >+ std::cerr.rdbuf(savecerr); >+ std::string s(e.what()); >+ ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str()); >+@@ -155,8 +157,8 @@ static Exiv2::ExifData ufraw_prepare_exifdata(ufraw_da >+ /* Reset orientation tag since UFRaw already rotates the image */ >+ if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) >+ != exifData.end()) { >+- ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%d' to '1'\n", >+- pos->key().c_str(), pos->value().toLong()); >++ ufraw_message(UFRAW_SET_LOG, "Resetting %s from '%ld' to '1'\n", >++ pos->key().c_str(), static_cast<long int>(pos->value().toInt64())); >+ pos->setValue("1"); /* 1 = Normal orientation */ >+ } >+ } >+@@ -327,7 +329,7 @@ extern "C" int ufraw_exif_prepare_output(ufraw_data *u >+ ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str()); >+ >+ return UFRAW_SUCCESS; >+- } catch (Exiv2::AnyError& e) { >++ } catch (Exiv2::Error& e) { >+ std::cerr.rdbuf(savecerr); >+ std::string s(e.what()); >+ ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str()); >+@@ -347,7 +349,7 @@ extern "C" int ufraw_exif_write(ufraw_data *uf) >+ >+ char *filename = >+ uf_win32_locale_filename_from_utf8(uf->conf->outputFilename); >+- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); >++ Exiv2::Image::UniquePtr image { Exiv2::ImageFactory::open(filename) }; >+ uf_win32_locale_filename_free(filename); >+ assert(image.get() != 0); >+ >+@@ -367,7 +369,7 @@ extern "C" int ufraw_exif_write(ufraw_data *uf) >+ ufraw_message(UFRAW_SET_LOG, "%s\n", stderror.str().c_str()); >+ >+ return UFRAW_SUCCESS; >+- } catch (Exiv2::AnyError& e) { >++ } catch (Exiv2::Error& e) { >+ std::cerr.rdbuf(savecerr); >+ std::string s(e.what()); >+ ufraw_message(UFRAW_SET_WARNING, "%s\n", s.c_str()); >-- >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:
rodrigo
:
maintainer-approval+
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