Source: hdrmerge
Version: 0.5+git20200117-3.1
Severity: important
Tags: patch ftbfs
X-Debbugs-Cc: gur...@phys.ethz.ch
Control: forwarded -1 https://github.com/jcelaya/hdrmerge/pull/222

Hi,

hdrmerge fails to build with the new stable series of the Exiv2 library,
i.e. 0.28.x; that version is available in experimental as of this
writing.

There is a proposed patch upstream to fix this [1], and sadly it has
been sitting there for some months now (hdrmerge does not seem an
actively developed project). I extracted the patch/commit from that
upstream PR, and verified that it builds fine with both Exiv2 0.27 and
Exiv2 0.28; you can find it attached to this bug. Would you review this
patch, and upload it so that hdrmerge rebuilds cleanly once a newer
Exiv2 is uploaded to unstable?

[1] https://github.com/jcelaya/hdrmerge/pull/222

Thanks,
-- 
Pino
Author: Lukáš Jirkovský <l.jirkov...@gmail.com>
Description: Adapt to Exiv2 0.28.0 API change.
Last-Update: 2023-08-03
Forwarded: https://github.com/jcelaya/hdrmerge/pull/222

diff --git a/src/ExifTransfer.cpp b/src/ExifTransfer.cpp
index bc8f4f9..0598172 100644
--- a/src/ExifTransfer.cpp
+++ b/src/ExifTransfer.cpp
@@ -41,7 +41,11 @@ private:
     QString srcFile, dstFile;
     const uint8_t * data;
     size_t dataSize;
+#if EXIV2_TEST_VERSION(0,28,0)
+    Exiv2::Image::UniquePtr src, dst;
+#else
     Exiv2::Image::AutoPtr src, dst;
+#endif
 
     void copyXMP();
     void copyIPTC();
@@ -58,7 +62,11 @@ void hdrmerge::Exif::transfer(const QString & srcFile, const 
QString & dstFile,
 
 void ExifTransfer::copyMetadata() {
     try {
+#if EXIV2_TEST_VERSION(0,28,0)
+        dst = Exiv2::ImageFactory::open(BasicIo::UniquePtr(new MemIo(data, 
dataSize)));
+#else
         dst = Exiv2::ImageFactory::open(BasicIo::AutoPtr(new MemIo(data, 
dataSize)));
+#endif
         dst->readMetadata();
     } catch (Exiv2::Error & e) {
         std::cerr << "Exiv2 error: " << e.what() << std::endl;
diff --git a/src/RawParameters.cpp b/src/RawParameters.cpp
index 40b77de..e6a38eb 100644
--- a/src/RawParameters.cpp
+++ b/src/RawParameters.cpp
@@ -49,7 +49,11 @@ void RawParameters::loadCamXyzFromDng() {
                 cc[j][i] = i == j ? 1.0 : 0.0;
             }
         }
+#if EXIV2_TEST_VERSION(0,28,0)
+        Exiv2::Image::UniquePtr src = 
Exiv2::ImageFactory::open(fileName.toLocal8Bit().constData());
+#else
         Exiv2::Image::AutoPtr src = 
Exiv2::ImageFactory::open(fileName.toLocal8Bit().constData());
+#endif
         src->readMetadata();
         const Exiv2::ExifData & srcExif = src->exifData();
 
-- 
2.43.0

Reply via email to