FreeBSD Bugzilla – Attachment 243167 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/luminance-qt5: make compatible with exiv2 0.28
0002-graphics-luminance-qt5-make-compatible-with-exiv2-0..patch (text/plain), 6.88 KB, created by
Matthias Andree
on 2023-07-03 09:53:36 UTC
(
hide
)
Description:
graphics/luminance-qt5: make compatible with exiv2 0.28
Filename:
MIME Type:
Creator:
Matthias Andree
Created:
2023-07-03 09:53:36 UTC
Size:
6.88 KB
patch
obsolete
>From 6e774fe0183a941e6fb58a90813330d67db17888 Mon Sep 17 00:00:00 2001 >From: Matthias Andree <mandree@FreeBSD.org> >Date: Mon, 3 Jul 2023 01:23:59 +0200 >Subject: [PATCH 2/7] graphics/luminance-qt5: make compatible with exiv2 0.28 > >PR: 272311 >--- > graphics/luminance-qt5/Makefile | 2 +- > .../files/patch-src_Exif_ExifOperations.cpp | 88 +++++++++++++++++++ > .../files/patch-src_Libpfs_exif_exifdata.cpp | 29 ++++++ > ...rc_TransplantExif_TransplantExifDialog.cpp | 11 +++ > 4 files changed, 129 insertions(+), 1 deletion(-) > create mode 100644 graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp > create mode 100644 graphics/luminance-qt5/files/patch-src_Libpfs_exif_exifdata.cpp > create mode 100644 graphics/luminance-qt5/files/patch-src_TransplantExif_TransplantExifDialog.cpp > >diff --git a/graphics/luminance-qt5/Makefile b/graphics/luminance-qt5/Makefile >index 1b0d2c852f74..f7fee8af15cc 100644 >--- a/graphics/luminance-qt5/Makefile >+++ b/graphics/luminance-qt5/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= luminance-hdr > DISTVERSION= 2.6.1.1 >-PORTREVISION= 20 >+PORTREVISION= 21 > CATEGORIES= graphics > MASTER_SITES= SF/qtpfsgui/luminance/${DISTVERSION} > >diff --git a/graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp b/graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp >new file mode 100644 >index 000000000000..439f147063d3 >--- /dev/null >+++ b/graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp >@@ -0,0 +1,88 @@ >+--- src/Exif/ExifOperations.cpp.orig 2021-01-11 09:41:28 UTC >++++ src/Exif/ExifOperations.cpp >+@@ -108,12 +108,12 @@ void copyExifData(const std::string &from, const std:: >+ #endif >+ >+ try { >+- Exiv2::Image::AutoPtr sourceImage; >++ Exiv2::Image::UniquePtr sourceImage; >+ Exiv2::ExifData srcExifData; >+ >+ if (!from.empty()) { >+ // get source exif data >+- sourceImage = Exiv2::ImageFactory::open(from); >++ sourceImage = std::move(Exiv2::ImageFactory::open(from)); >+ >+ sourceImage->readMetadata(); >+ srcExifData = sourceImage->exifData(); >+@@ -128,7 +128,7 @@ void copyExifData(const std::string &from, const std:: >+ } >+ >+ // get destination exif data >+- Exiv2::Image::AutoPtr destinationImage = Exiv2::ImageFactory::open(to); >++ Exiv2::Image::UniquePtr destinationImage = Exiv2::ImageFactory::open(to); >+ >+ if (dontOverwrite) { >+ // doesn't throw anything if it is empty >+@@ -212,7 +212,7 @@ void copyExifData(const std::string &from, const std:: >+ destinationImage->setExifData(srcExifData); >+ } >+ destinationImage->writeMetadata(); >+- } catch (Exiv2::AnyError &e) { >++ } catch (Exiv2::Error &e) { >+ #ifndef NDEBUG >+ qDebug() << e.what(); >+ #endif >+@@ -250,7 +250,7 @@ float obtain_avg_lum(const std::string& filename) >+ { >+ try >+ { >+- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); >++ Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename); >+ image->readMetadata(); >+ Exiv2::ExifData &exifData = image->exifData(); >+ if (exifData.empty()) >+@@ -329,7 +329,7 @@ allowed for ev computation purposes. >+ return -1; >+ } >+ } >+- catch (Exiv2::AnyError& e) >++ catch (Exiv2::Error& e) >+ { >+ return -1; >+ } >+@@ -338,7 +338,7 @@ allowed for ev computation purposes. >+ >+ float getExposureTime(const std::string &filename) { >+ try { >+- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); >++ Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename); >+ image->readMetadata(); >+ Exiv2::ExifData &exifData = image->exifData(); >+ if (exifData.empty()) return -1; >+@@ -374,14 +374,14 @@ float getExposureTime(const std::string &filename) { >+ } else { >+ return -1; >+ } >+- } catch (Exiv2::AnyError &e) { >++ } catch (Exiv2::Error &e) { >+ return -1; >+ } >+ } >+ >+ float getAverageLuminance(const std::string &filename) { >+ try { >+- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); >++ Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename); >+ image->readMetadata(); >+ Exiv2::ExifData &exifData = image->exifData(); >+ >+@@ -403,7 +403,7 @@ float getAverageLuminance(const std::string &filename) >+ << std::endl; >+ >+ return -1.0; >+- } catch (Exiv2::AnyError &e) { >++ } catch (Exiv2::Error &e) { >+ return -1.0; >+ } >+ } >diff --git a/graphics/luminance-qt5/files/patch-src_Libpfs_exif_exifdata.cpp b/graphics/luminance-qt5/files/patch-src_Libpfs_exif_exifdata.cpp >new file mode 100644 >index 000000000000..6a6eabf8d9dd >--- /dev/null >+++ b/graphics/luminance-qt5/files/patch-src_Libpfs_exif_exifdata.cpp >@@ -0,0 +1,29 @@ >+--- src/Libpfs/exif/exifdata.cpp.orig 2021-01-11 09:41:28 UTC >++++ src/Libpfs/exif/exifdata.cpp >+@@ -52,7 +52,7 @@ ExifData::ExifData(const std::string &filename) { from >+ void ExifData::fromFile(const std::string &filename) { >+ reset(); >+ try { >+- ::Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); >++ ::Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename); >+ image->readMetadata(); >+ ::Exiv2::ExifData &exifData = image->exifData(); >+ >+@@ -121,7 +121,7 @@ void ExifData::fromFile(const std::string &filename) { >+ */ >+ if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) != >+ exifData.end()) { >+- long rotation = it->toLong(); >++ long rotation = it->toInt64(); >+ switch (rotation) { >+ case 3: >+ m_orientation = 180; >+@@ -134,7 +134,7 @@ void ExifData::fromFile(const std::string &filename) { >+ break; >+ } >+ } >+- } catch (Exiv2::AnyError &e) { >++ } catch (Exiv2::Error &e) { >+ return; >+ } >+ } >diff --git a/graphics/luminance-qt5/files/patch-src_TransplantExif_TransplantExifDialog.cpp b/graphics/luminance-qt5/files/patch-src_TransplantExif_TransplantExifDialog.cpp >new file mode 100644 >index 000000000000..98db3ad724d6 >--- /dev/null >+++ b/graphics/luminance-qt5/files/patch-src_TransplantExif_TransplantExifDialog.cpp >@@ -0,0 +1,11 @@ >+--- src/TransplantExif/TransplantExifDialog.cpp.orig 2021-01-11 09:41:28 UTC >++++ src/TransplantExif/TransplantExifDialog.cpp >+@@ -347,7 +347,7 @@ void TransplantExifDialog::transplant_requested() { >+ QFile::encodeName((*i_dest)).constData(), >+ m_Ui->checkBox_dont_overwrite->isChecked()); >+ m_Ui->rightlist->item(index)->setBackground(QBrush("#a0ff87")); >+- } catch (Exiv2::AnyError &e) { >++ } catch (Exiv2::Error &e) { >+ add_log_message("ERROR:" + QString::fromStdString(e.what())); >+ m_Ui->rightlist->item(index)->setBackground(QBrush("#ff743d")); >+ } >-- >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:
h2+fbsdports
:
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