From 7eccc108e96acf914cb7418bb849d0d6c6483e54 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 21 Jun 2023 12:37:12 +0000 Subject: [PATCH] extra/gimp-nufraw to 0.43.3-9 --- ...2.70.patch => 0001-nufraw-glib-2.70.patch} | 6 +- extra/gimp-nufraw/0002-exiv2-error.patch | 58 +++++++++++++++++++ extra/gimp-nufraw/PKGBUILD | 15 +++-- 3 files changed, 72 insertions(+), 7 deletions(-) rename extra/gimp-nufraw/{nufraw-glib-2.70.patch => 0001-nufraw-glib-2.70.patch} (63%) create mode 100644 extra/gimp-nufraw/0002-exiv2-error.patch diff --git a/extra/gimp-nufraw/nufraw-glib-2.70.patch b/extra/gimp-nufraw/0001-nufraw-glib-2.70.patch similarity index 63% rename from extra/gimp-nufraw/nufraw-glib-2.70.patch rename to extra/gimp-nufraw/0001-nufraw-glib-2.70.patch index 936b5ffa9..41f10bfba 100644 --- a/extra/gimp-nufraw/nufraw-glib-2.70.patch +++ b/extra/gimp-nufraw/0001-nufraw-glib-2.70.patch @@ -1,6 +1,6 @@ -diff -ru nufraw-0.43-3.orig/uf_glib.h nufraw-0.43-3/uf_glib.h ---- nufraw-0.43-3.orig/uf_glib.h 2022-02-23 09:03:44.700472919 +0100 -+++ nufraw-0.43-3/uf_glib.h 2022-02-23 09:04:50.260308805 +0100 +diff -ru nufraw/uf_glib.h nufraw/uf_glib.h +--- nufraw/uf_glib.h 2022-02-23 09:03:44.700472919 +0100 ++++ nufraw/uf_glib.h 2022-02-23 09:04:50.260308805 +0100 @@ -13,13 +13,13 @@ #ifndef _UF_GLIB_H #define _UF_GLIB_H diff --git a/extra/gimp-nufraw/0002-exiv2-error.patch b/extra/gimp-nufraw/0002-exiv2-error.patch new file mode 100644 index 000000000..665221c58 --- /dev/null +++ b/extra/gimp-nufraw/0002-exiv2-error.patch @@ -0,0 +1,58 @@ +diff --git a/nufraw_exiv2.cc b/nufraw_exiv2.cc +index 2de4cc3..45aea87 100644 +--- a/nufraw_exiv2.cc ++++ b/nufraw_exiv2.cc +@@ -54,7 +54,7 @@ extern "C" int nufraw_exif_read_input(nufraw_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); +@@ -135,7 +135,7 @@ extern "C" int nufraw_exif_read_input(nufraw_data *uf) + nufraw_message(NUFRAW_SET_LOG, "%s\n", stderror.str().c_str()); + + return NUFRAW_SUCCESS; +- } catch (Exiv2::AnyError& e) { ++ } catch (Exiv2::Error& e) { + std::cerr.rdbuf(savecerr); + std::string s(e.what()); + nufraw_message(NUFRAW_SET_WARNING, "%s\n", s.c_str()); +@@ -156,7 +156,7 @@ static Exiv2::ExifData nufraw_prepare_exifdata(nufraw_data *uf) + if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) + != exifData.end()) { + nufraw_message(NUFRAW_SET_LOG, "Resetting %s from '%d' to '1'\n", +- pos->key().c_str(), pos->value().toLong()); ++ pos->key().c_str(), pos->value().toInt64()); + pos->setValue("1"); /* 1 = Normal orientation */ + } + } +@@ -327,7 +327,7 @@ extern "C" int nufraw_exif_prepare_output(nufraw_data *uf) + nufraw_message(NUFRAW_SET_LOG, "%s\n", stderror.str().c_str()); + + return NUFRAW_SUCCESS; +- } catch (Exiv2::AnyError& e) { ++ } catch (Exiv2::Error& e) { + std::cerr.rdbuf(savecerr); + std::string s(e.what()); + nufraw_message(NUFRAW_SET_WARNING, "%s\n", s.c_str()); +@@ -347,7 +347,7 @@ extern "C" int nufraw_exif_write(nufraw_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 +367,7 @@ extern "C" int nufraw_exif_write(nufraw_data *uf) + nufraw_message(NUFRAW_SET_LOG, "%s\n", stderror.str().c_str()); + + return NUFRAW_SUCCESS; +- } catch (Exiv2::AnyError& e) { ++ } catch (Exiv2::Error& e) { + std::cerr.rdbuf(savecerr); + std::string s(e.what()); + nufraw_message(NUFRAW_SET_WARNING, "%s\n", s.c_str()); diff --git a/extra/gimp-nufraw/PKGBUILD b/extra/gimp-nufraw/PKGBUILD index 560f344ee..4fba595ee 100644 --- a/extra/gimp-nufraw/PKGBUILD +++ b/extra/gimp-nufraw/PKGBUILD @@ -6,7 +6,7 @@ pkgname=gimp-nufraw _realver=0.43-3 pkgver=0.43.3 -pkgrel=8 +pkgrel=9 pkgdesc='Converter for raw files; utility and GIMP plugin' url='https://sourceforge.net/projects/nufraw/' arch=('x86_64') @@ -17,16 +17,23 @@ conflicts=('gimp-ufraw') replaces=('gimp-ufraw') optdepends=('gimp: to use the gimp import plugin for raw images') source=("https://downloads.sourceforge.net/nufraw/nufraw-${_realver}.tar.gz" - nufraw-glib-2.70.patch + '0001-nufraw-glib-2.70.patch' + '0002-exiv2-error.patch' signed-char.patch) sha256sums=('2c7dcc1590993ec267b3112562b2433010d6f94f6acc6506c76aa29cf8c6c32c' - '0e422f77b277f3c38b454426ee155d1004e47ced8d5d05942448584557c9ed07' + '042aa55a757c4ed1198fe4628c87933f958d768c2cd5270db1b2e4369daaf090' + '01fd29b180662da1a1510236bc64fac614229adaf1bc7b11df8b88745d6458da' '93b20b1b6634de7b56a6b50fe35f320dbf68e9dc7b530c5540a88637a14d3fa0') prepare() { cd "nufraw-${_realver}" - patch -p1 < ../nufraw-glib-2.70.patch # Fix build with glib 2.70 + # fix build with glib 2.70 + patch -p1 < ../0001-nufraw-glib-2.70.patch + + # fix build with exiv2 0.28.0 + patch -p1 < ../0002-exiv2-error.patch + patch -p1 < ../signed-char.patch autoreconf -fi