pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/gexiv2



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sat Jul  1 22:14:59 UTC 2023

Modified Files:
        pkgsrc/graphics/gexiv2: distinfo
Added Files:
        pkgsrc/graphics/gexiv2/patches: patch-gexiv2_gexiv2-metadata-exif.cpp
            patch-gexiv2_gexiv2-metadata-gps.cpp
            patch-gexiv2_gexiv2-metadata-iptc.cpp
            patch-gexiv2_gexiv2-metadata-xmp.cpp
            patch-gexiv2_gexiv2-metadata.cpp
            patch-gexiv2_gexiv2-preview-image.cpp
            patch-gexiv2_gexiv2-stream-io.cpp patch-gexiv2_gexiv2-stream-io.h
            patch-gexiv2_meson.build patch-meson.build
            patch-test_python_test__metadata.py

Log Message:
gexiv2: fix build with exiv2 0.28.0 using upstream patches.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/graphics/gexiv2/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-exif.cpp \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-gps.cpp \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-iptc.cpp \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-xmp.cpp \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata.cpp \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-preview-image.cpp \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.cpp \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.h \
    pkgsrc/graphics/gexiv2/patches/patch-gexiv2_meson.build \
    pkgsrc/graphics/gexiv2/patches/patch-meson.build \
    pkgsrc/graphics/gexiv2/patches/patch-test_python_test__metadata.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/gexiv2/distinfo
diff -u pkgsrc/graphics/gexiv2/distinfo:1.12 pkgsrc/graphics/gexiv2/distinfo:1.13
--- pkgsrc/graphics/gexiv2/distinfo:1.12        Wed May 17 10:54:21 2023
+++ pkgsrc/graphics/gexiv2/distinfo     Sat Jul  1 22:14:58 2023
@@ -1,5 +1,16 @@
-$NetBSD: distinfo,v 1.12 2023/05/17 10:54:21 wiz Exp $
+$NetBSD: distinfo,v 1.13 2023/07/01 22:14:58 wiz Exp $
 
 BLAKE2s (gexiv2-0.14.1.tar.xz) = 22e5e884cb248e3a332fa204d2da6e2905f3cdb760a0dfbacf7b405f52d992d1
 SHA512 (gexiv2-0.14.1.tar.xz) = f510e49c0b2633bcc370ca21af0822032f04f5d5b57c7f76807797601b0a98b7749fdf68df37a405c9d90734adf75282a3dad59c24830874f64f7bd33152052d
 Size (gexiv2-0.14.1.tar.xz) = 387604 bytes
+SHA1 (patch-gexiv2_gexiv2-metadata-exif.cpp) = 55f9e5f7f8bff841359b53f3682c58133a1b92ed
+SHA1 (patch-gexiv2_gexiv2-metadata-gps.cpp) = ca85d6a85da7a0f6cfdfbfa715906ffcac8a0098
+SHA1 (patch-gexiv2_gexiv2-metadata-iptc.cpp) = f5cfde230049ef08594f71a95ad188d274928e2d
+SHA1 (patch-gexiv2_gexiv2-metadata-xmp.cpp) = d00cce03e2ef2815fe795b2c75054c9b1c6d0dac
+SHA1 (patch-gexiv2_gexiv2-metadata.cpp) = a03aa972c783a2cac20125fcc42183ebaac13c84
+SHA1 (patch-gexiv2_gexiv2-preview-image.cpp) = c85191e9eca7001e8b1c4ee584f8cfebf17a1a75
+SHA1 (patch-gexiv2_gexiv2-stream-io.cpp) = 21bbf132420ac046ed699cd26c1b7cb226c3c632
+SHA1 (patch-gexiv2_gexiv2-stream-io.h) = db9e18736c171475423e4ee703b1fbe4a4920f44
+SHA1 (patch-gexiv2_meson.build) = 8d106c99fa1ada8e22ec82567b38f223be9e6ad3
+SHA1 (patch-meson.build) = 06cf41e7773326d5b9cea57f1a7eed13d4d72cfe
+SHA1 (patch-test_python_test__metadata.py) = 95e372d9daaffc921b9436b5cd0be2eb446965d5

Added files:

Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-exif.cpp
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-exif.cpp:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-exif.cpp        Sat Jul  1 22:14:58 2023
@@ -0,0 +1,160 @@
+$NetBSD: patch-gexiv2_gexiv2-metadata-exif.cpp,v 1.1 2023/07/01 22:14:58 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-metadata-exif.cpp.orig       2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-metadata-exif.cpp
+@@ -8,6 +8,8 @@
+  * SPDX-License-Identifier: GPL-2.0-or-later
+  */
+ 
++#include <config.h>
++
+ #include "gexiv2-metadata.h"
+ #include "gexiv2-metadata-private.h"
+ #include <string>
+@@ -116,7 +118,7 @@ gchar* gexiv2_metadata_get_exif_tag_stri
+         if (it != exif_data.end())
+             return g_strdup (it->toString ().c_str ());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
+@@ -146,7 +148,7 @@ gchar** gexiv2_metadata_get_exif_tag_mul
+             return array;
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     array = g_new(gchar*, 1);
+@@ -187,7 +189,7 @@ gboolean gexiv2_metadata_set_exif_tag_mu
+         }
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return FALSE;
+@@ -214,7 +216,7 @@ gchar* gexiv2_metadata_get_exif_tag_inte
+             return g_strdup (os.str ().c_str ());
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
+@@ -232,7 +234,7 @@ gboolean gexiv2_metadata_set_exif_tag_st
+         
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -251,11 +253,15 @@ glong gexiv2_metadata_get_exif_tag_long 
+         Exiv2::ExifData::iterator it = exif_data.findKey(Exiv2::ExifKey(tag));
+         while (it != exif_data.end() && it->count() == 0)
+             it++;
+-        
++#ifdef EXIV2_EXIFDATUM_HAS_TO_LONG
+         if (it != exif_data.end())
+             return it->toLong ();
++#else
++        if (it != exif_data.end())
++            return static_cast<glong>(it->toInt64());
++#endif
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return 0;
+@@ -272,7 +278,7 @@ gboolean gexiv2_metadata_set_exif_tag_lo
+         
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -303,7 +309,7 @@ gboolean gexiv2_metadata_try_get_exif_ta
+             return TRUE;
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -324,7 +330,7 @@ gboolean gexiv2_metadata_try_set_exif_ta
+         
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -413,7 +419,7 @@ const gchar* gexiv2_metadata_get_exif_ta
+         Exiv2::ExifKey key(tag);
+         return g_intern_string(key.tagLabel().c_str());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -427,7 +433,7 @@ const gchar* gexiv2_metadata_get_exif_ta
+         Exiv2::ExifKey key(tag);
+         return g_intern_string(key.tagDesc().c_str());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -441,7 +447,7 @@ const gchar* gexiv2_metadata_get_exif_ta
+         Exiv2::ExifKey key(tag);
+         return Exiv2::TypeInfo::typeName(key.defaultTypeId());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -455,7 +461,7 @@ gboolean gexiv2_metadata_exif_tag_suppor
+       // Exif does not support multiple values, but still check if @tag is valid
+         const Exiv2::ExifKey key(tag);
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return FALSE;
+@@ -484,7 +490,7 @@ GBytes* gexiv2_metadata_get_exif_tag_raw
+             }
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string ("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
+@@ -522,7 +528,7 @@ GBytes * gexiv2_metadata_get_exif_data (
+ 
+         return g_bytes_new_take (data, blob.size());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-gps.cpp
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-gps.cpp:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-gps.cpp Sat Jul  1 22:14:58 2023
@@ -0,0 +1,70 @@
+$NetBSD: patch-gexiv2_gexiv2-metadata-gps.cpp,v 1.1 2023/07/01 22:14:58 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-metadata-gps.cpp.orig        2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-metadata-gps.cpp
+@@ -90,7 +90,7 @@ gboolean gexiv2_metadata_try_get_gps_lon
+ 
+         return TRUE;
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     } catch (std::invalid_argument &e) {
+         g_set_error_literal(error, g_quark_from_string("GExiv2"), 0, e.what());
+     }
+@@ -141,7 +141,7 @@ gboolean gexiv2_metadata_try_get_gps_lat
+ 
+         return TRUE;
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     } catch (std::invalid_argument &e) {
+         g_set_error_literal(error, g_quark_from_string("GExiv2"), 0, e.what());
+     }
+@@ -181,7 +181,7 @@ gboolean gexiv2_metadata_try_get_gps_alt
+ 
+         return TRUE;
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     } catch (std::invalid_argument &e) {
+         g_set_error_literal(error, g_quark_from_string("GExiv2"), 0, e.what());
+     }
+@@ -300,7 +300,7 @@ gboolean gexiv2_metadata_try_set_gps_inf
+ 
+         return gexiv2_metadata_try_update_gps_info (self, longitude, latitude, altitude, error);
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return FALSE;
+@@ -393,7 +393,7 @@ gboolean gexiv2_metadata_try_update_gps_
+         
+         return TRUE;
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return FALSE;
+@@ -434,7 +434,7 @@ void gexiv2_metadata_try_delete_gps_info
+                 ++exif_it;
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     /* FIXME: two blocks shall ensure to erase in xmp data, if erasing in exif
+@@ -454,7 +454,7 @@ void gexiv2_metadata_try_delete_gps_info
+         
+     } catch (Exiv2::Error& e) {
+         if (error && *error == nullptr)
+-            g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++            g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-iptc.cpp
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-iptc.cpp:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-iptc.cpp        Sat Jul  1 22:14:58 2023
@@ -0,0 +1,97 @@
+$NetBSD: patch-gexiv2_gexiv2-metadata-iptc.cpp,v 1.1 2023/07/01 22:14:58 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-metadata-iptc.cpp.orig       2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-metadata-iptc.cpp
+@@ -140,7 +140,7 @@ gchar* gexiv2_metadata_get_iptc_tag_stri
+             return g_strdup (os.str().c_str());
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return nullptr;
+@@ -186,7 +186,7 @@ gchar* gexiv2_metadata_get_iptc_tag_inte
+             return g_strdup (os.str().c_str());
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return nullptr;
+@@ -234,7 +234,7 @@ gboolean gexiv2_metadata_set_iptc_tag_st
+ 
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -271,7 +271,7 @@ gchar** gexiv2_metadata_get_iptc_tag_mul
+         
+         return values;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     g_slist_free_full (list, g_free);
+@@ -347,7 +347,7 @@ gboolean gexiv2_metadata_set_iptc_tag_mu
+ 
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -361,7 +361,7 @@ const gchar* gexiv2_metadata_get_iptc_ta
+         Exiv2::IptcKey key (tag);
+         return Exiv2::IptcDataSets::dataSetTitle (key.tag (), key.record ());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -375,7 +375,7 @@ const gchar* gexiv2_metadata_get_iptc_ta
+         Exiv2::IptcKey key (tag);
+         return Exiv2::IptcDataSets::dataSetDesc (key.tag (), key.record ());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -389,7 +389,7 @@ const gchar* gexiv2_metadata_get_iptc_ta
+         Exiv2::IptcKey key (tag);
+         return Exiv2::TypeInfo::typeName(Exiv2::IptcDataSets::dataSetType(key.tag(), key.record()));
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -403,7 +403,7 @@ gboolean gexiv2_metadata_iptc_tag_suppor
+         const Exiv2::IptcKey key(tag); // Check to see if @tag is valid
+         return (Exiv2::IptcDataSets::dataSetRepeatable(key.tag(), key.record()) ? TRUE : FALSE);
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return FALSE;
+@@ -464,7 +464,7 @@ GBytes* gexiv2_metadata_get_iptc_tag_raw
+             return g_byte_array_free_to_bytes(concatenated_raw_arrays);
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-xmp.cpp
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-xmp.cpp:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata-xmp.cpp Sat Jul  1 22:14:58 2023
@@ -0,0 +1,222 @@
+$NetBSD: patch-gexiv2_gexiv2-metadata-xmp.cpp,v 1.1 2023/07/01 22:14:58 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-metadata-xmp.cpp.orig        2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-metadata-xmp.cpp
+@@ -8,6 +8,8 @@
+  * SPDX-License-Identifier: GPL-2.0-or-later
+  */
+ 
++#include <config.h>
++
+ #include "gexiv2-metadata-private.h"
+ #include "gexiv2-metadata.h"
+ 
+@@ -48,7 +50,7 @@ gchar *gexiv2_metadata_try_generate_xmp_
+             return g_strdup(packet.c_str());
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
+@@ -79,7 +81,7 @@ gchar *gexiv2_metadata_try_get_xmp_packe
+     try {
+         return g_strdup(self->priv->image->xmpPacket().c_str());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -187,7 +189,7 @@ gchar* gexiv2_metadata_get_xmp_tag_strin
+         if (it != xmp_data.end())
+             return g_strdup (it->toString ().c_str ());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
+@@ -214,7 +216,7 @@ gchar* gexiv2_metadata_get_xmp_tag_inter
+             return g_strdup (os.str ().c_str ());
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
+@@ -257,7 +259,7 @@ gboolean gexiv2_metadata_try_set_xmp_tag
+         xmp_data.add(Exiv2::XmpKey(tag), &tv);
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -294,7 +296,7 @@ gboolean gexiv2_metadata_set_xmp_tag_str
+         
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -313,11 +315,16 @@ glong gexiv2_metadata_get_xmp_tag_long (
+         Exiv2::XmpData::iterator it = xmp_data.findKey(Exiv2::XmpKey(tag));
+         while (it != xmp_data.end() && it->count() == 0)
+             it++;
+-        
++
++#ifdef EXIV2_XMPDATUM_HAS_TO_LONG
+         if (it != xmp_data.end())
+             return it->toLong ();
++#else
++        if (it != xmp_data.end())
++            return static_cast<glong>(it->toInt64());
++#endif
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return 0;
+@@ -334,7 +341,7 @@ gboolean gexiv2_metadata_set_xmp_tag_lon
+         
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -414,7 +421,7 @@ gchar** gexiv2_metadata_get_xmp_tag_mult
+         if (array) {
+             g_strfreev(array);
+         }
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     array = g_new(gchar*, 1);
+@@ -450,7 +457,7 @@ gchar** gexiv2_metadata_get_xmp_tag_mult
+             return array;
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     gchar **array = g_new (gchar*, 1);
+@@ -488,7 +495,7 @@ gboolean gexiv2_metadata_set_xmp_tag_mul
+ 
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return FALSE;
+@@ -501,7 +508,7 @@ const gchar* gexiv2_metadata_get_xmp_tag
+     try {
+         return Exiv2::XmpProperties::propertyTitle(Exiv2::XmpKey(tag));
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -514,7 +521,7 @@ const gchar* gexiv2_metadata_get_xmp_tag
+     try {
+         return Exiv2::XmpProperties::propertyDesc(Exiv2::XmpKey(tag));
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -527,7 +534,7 @@ const gchar* gexiv2_metadata_get_xmp_tag
+     try {
+         return Exiv2::TypeInfo::typeName(Exiv2::XmpProperties::propertyType(Exiv2::XmpKey(tag)));
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     
+     return NULL;
+@@ -569,7 +576,7 @@ gboolean gexiv2_metadata_xmp_tag_support
+             return TRUE;
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     return FALSE;
+ }
+@@ -597,7 +604,7 @@ GBytes* gexiv2_metadata_get_xmp_tag_raw 
+             }
+         }
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return nullptr;
+@@ -622,15 +629,21 @@ gboolean gexiv2_metadata_try_register_xm
+     g_return_val_if_fail(prefix != nullptr, FALSE);
+     g_return_val_if_fail(error == nullptr || *error == nullptr, FALSE);
+ 
++#if defined(EXIV2_HAS_ANY_ERROR)
++    using Exiv2ErrorProxy = Exiv2::AnyError;
++#else
++    using Exiv2ErrorProxy = Exiv2::Error;
++#endif
++
+     try {
+         Exiv2::XmpProperties::ns(prefix);
+-    } catch (Exiv2::AnyError& e1) {
++    } catch (Exiv2ErrorProxy& e1) {
+         // No namespace, OK to register
+         try {
+             Exiv2::XmpProperties::registerNs(name, prefix);
+             return TRUE;
+-        } catch (Exiv2::AnyError& e2) {
+-            g_set_error_literal(error, g_quark_from_string("GExiv2"), e2.code(), e2.what());
++        } catch (Exiv2ErrorProxy& e2) {
++            g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e2.code()), e2.what());
+         }
+     }
+ 
+@@ -670,7 +683,7 @@ gboolean gexiv2_metadata_try_unregister_
+             }
+         }
+     } catch (Exiv2::Error& e2) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e2.code(), e2.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e2.code()), e2.what());
+     }
+     return FALSE;
+ }
+@@ -692,7 +705,7 @@ void gexiv2_metadata_try_unregister_all_
+     try {
+         Exiv2::XmpProperties::unregisterNs();
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -739,7 +752,7 @@ char* gexiv2_metadata_try_get_xmp_namesp
+ 
+         result = g_strdup(info.c_str());
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     g_clear_pointer(&list, g_strfreev);
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata.cpp
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata.cpp:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-metadata.cpp     Sat Jul  1 22:14:58 2023
@@ -0,0 +1,451 @@
+$NetBSD: patch-gexiv2_gexiv2-metadata.cpp,v 1.1 2023/07/01 22:14:58 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-metadata.cpp.orig    2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-metadata.cpp
+@@ -9,19 +9,22 @@
+  */
+ 
+ #include "gexiv2-metadata.h"
+-#include "gexiv2-metadata-private.h"
+-#include "gexiv2-stream-io.h"
++
++#include "gexiv2-log-private.h"
++#include "gexiv2-log.h"
+ #include "gexiv2-managed-stream.h"
+-#include "gexiv2-preview-properties.h"
+-#include "gexiv2-preview-properties-private.h"
+-#include "gexiv2-preview-image.h"
++#include "gexiv2-metadata-private.h"
+ #include "gexiv2-preview-image-private.h"
+-#include "gexiv2-log.h"
+-#include "gexiv2-log-private.h"
+-#include <string>
++#include "gexiv2-preview-image.h"
++#include "gexiv2-preview-properties-private.h"
++#include "gexiv2-preview-properties.h"
++#include "gexiv2-stream-io.h"
++
+ #include <cmath>
+-#include <glib-object.h>
++#include <config.h>
+ #include <gio/gio.h>
++#include <glib-object.h>
++#include <string>
+ 
+ #ifdef G_OS_WIN32
+ #include <glib/gwin32.h>
+@@ -46,7 +49,7 @@ public:
+         , _eof{false}
+         {}
+ #if EXIV2_TEST_VERSION(0,27,99)
+-    using size_type = long;
++    using size_type = size_t;
+ #else
+     using size_type = long;
+ #endif
+@@ -66,6 +69,9 @@ public:
+     using ptr_type = Exiv2::BasicIo::AutoPtr;
+ #endif
+ 
++#if EXIV2_TEST_VERSION(0, 27, 99)
++    void populateFakeData() override{};
++#endif
+     int open() override {
+         if (_seekable == nullptr)
+             return 0;
+@@ -91,9 +97,17 @@ public:
+     Exiv2::DataBuf read(size_type rcount) override {
+         Exiv2::DataBuf b{rcount};
+ 
++#ifdef EXIV2_DATABUF_HAS_PRIVATE_PDATA
++        auto bytes_read = this->read(b.data(), rcount);
++#else
+         auto bytes_read = this->read(b.pData_, rcount);
++#endif
+         if (bytes_read > 0 && bytes_read != rcount) {
++#ifdef EXIV2_DATABUF_HAS_PRIVATE_PDATA
++            b = Exiv2::DataBuf{b};
++#else
+             b.reset({b.pData_, bytes_read});
++#endif
+         }
+ 
+         return b;
+@@ -188,7 +202,7 @@ public:
+ 
+     int munmap() override { return 0; }
+ 
+-    long tell() const override {
++    size_type tell() const override {
+         if (_seekable != nullptr && g_seekable_can_seek (_seekable)) {
+             return static_cast<long>(g_seekable_tell (_seekable));
+         } else {
+@@ -204,10 +218,21 @@ public:
+ 
+     bool eof() const override { return _eof; }
+ 
++#if EXIV2_TEST_VERSION(0, 27, 99)
++    const std::string& path() const noexcept override {
++        static std::string info{"GIO Wrapper"};
++        return info;
++    }
++#else
+     std::string path() const override { return "GIO Wrapper"; }
++#endif
+ 
+ #ifdef EXV_UNICODE_PATH
++#ifdef EXIV2_TEST_VERSION(0, 27, 99)
++    const std::wstring& wpath() const noexcept override {
++#else
+     std::wstring wpath() const override {
++#endif
+         std::string p = path();
+         std::wstring w(p.length(), L' ');
+         std::copy(p.begin(), p.end(), w.begin());
+@@ -395,7 +420,7 @@ static void gexiv2_metadata_init_interna
+         if (priv->preview_manager)
+             delete priv->preview_manager;
+ 
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -416,7 +441,7 @@ static gboolean gexiv2_metadata_open_int
+ 
+         return !(error && *error);
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return FALSE;
+@@ -476,11 +501,11 @@ gboolean gexiv2_metadata_open_path(GExiv
+ 
+         return gexiv2_metadata_open_internal (self, error);
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+ #ifdef EXV_UNICODE_PATH
+     catch (Exiv2::WError &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+ #endif
+ 
+@@ -503,7 +528,7 @@ gboolean gexiv2_metadata_open_buf(GExiv2
+ 
+ gboolean gexiv2_metadata_open_stream (GExiv2Metadata *self, ManagedStreamCallbacks* cb, GError **error) {
+     g_return_val_if_fail (GEXIV2_IS_METADATA (self), FALSE);
+-    
++
+     try {
+         StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
+ #if EXIV2_TEST_VERSION(0,27,99)
+@@ -514,7 +539,7 @@ gboolean gexiv2_metadata_open_stream (GE
+         
+         return gexiv2_metadata_open_internal (self, error);
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+     
+     return FALSE;
+@@ -533,7 +558,7 @@ gboolean gexiv2_metadata_from_stream(GEx
+ 
+         return gexiv2_metadata_open_internal (self, error);
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ 
+     return FALSE;
+@@ -584,7 +609,7 @@ gboolean gexiv2_metadata_from_app1_segme
+         return TRUE;
+     } catch (Exiv2::Error &e) {
+         delete self->priv->image.release();
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     return FALSE;
+ }
+@@ -653,7 +678,7 @@ static gboolean gexiv2_metadata_save_int
+ 
+         return TRUE;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     return FALSE;
+ }
+@@ -675,11 +700,11 @@ gboolean gexiv2_metadata_save_external (
+                                              Exiv2::ImageFactory::create(Exiv2::ImageType::xmp, local_path),
+                                              error);
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+ #ifdef EXV_UNICODE_PATH
+     catch (Exiv2::WError &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+ #endif
+ 
+@@ -701,11 +726,11 @@ gboolean gexiv2_metadata_save_file (GExi
+ 
+         return gexiv2_metadata_save_internal(self, Exiv2::ImageFactory::open(local_path), error);
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+ #ifdef EXV_UNICODE_PATH
+     catch (Exiv2::WError &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+ #endif
+     
+@@ -713,8 +738,8 @@ gboolean gexiv2_metadata_save_file (GExi
+ }
+ 
+ gboolean gexiv2_metadata_save_stream (GExiv2Metadata *self, ManagedStreamCallbacks* cb, GError **error) {
+-    g_return_val_if_fail (GEXIV2_IS_METADATA (self), FALSE);
+-    
++    g_return_val_if_fail(GEXIV2_IS_METADATA(self), FALSE);
++
+     try {
+         StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
+         
+@@ -724,7 +749,7 @@ gboolean gexiv2_metadata_save_stream (GE
+         return gexiv2_metadata_save_internal (self, Exiv2::ImageFactory::open (stream_ptr), error);
+ #endif
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+     
+     return FALSE;
+@@ -761,7 +786,7 @@ gboolean gexiv2_metadata_try_has_tag(GEx
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return FALSE;
+ }
+@@ -797,7 +822,7 @@ gboolean gexiv2_metadata_try_clear_tag(G
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return FALSE;
+ }
+@@ -954,7 +979,7 @@ void gexiv2_metadata_try_set_orientation
+         gexiv2_metadata_clear_exif_tag(self, "Exif.MinoltaCs7D.Rotation");
+         gexiv2_metadata_clear_exif_tag(self, "Exif.MinoltaCs5D.Rotation");
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -1075,7 +1100,7 @@ void gexiv2_metadata_try_set_metadata_pi
+         xmp_data["Xmp.tiff.ImageWidth"] = static_cast<uint32_t>(width);
+         xmp_data["Xmp.exif.PixelXDimension"] = static_cast<uint32_t>(width);
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -1104,7 +1129,7 @@ void gexiv2_metadata_try_set_metadata_pi
+         xmp_data["Xmp.tiff.ImageLength"] = static_cast<uint32_t>(height);
+         xmp_data["Xmp.exif.PixelYDimension"] = static_cast<uint32_t>(height);
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -1226,7 +1251,7 @@ void gexiv2_metadata_try_set_comment(GEx
+         /* Do not need to write to acdsee properties, just read from them */
+         // xmp_data ["Xmp.acdsee.notes"] = comment;
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -1273,7 +1298,7 @@ gchar* gexiv2_metadata_try_get_tag_strin
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return nullptr;
+ }
+@@ -1295,7 +1320,7 @@ gboolean gexiv2_metadata_try_set_tag_str
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return FALSE;
+ }
+@@ -1353,7 +1378,7 @@ gchar* gexiv2_metadata_try_get_tag_inter
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return nullptr;
+ }
+@@ -1393,7 +1418,7 @@ gchar** gexiv2_metadata_try_get_tag_mult
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return nullptr;
+ }
+@@ -1416,7 +1441,7 @@ gboolean gexiv2_metadata_try_set_tag_mul
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return FALSE;
+ }
+@@ -1459,7 +1484,7 @@ gchar** gexiv2_metadata_get_tag_multiple
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(&error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(&error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     g_warning("%s", error->message);
+     g_clear_error(&error);
+ 
+@@ -1499,7 +1524,7 @@ glong gexiv2_metadata_try_get_tag_long(G
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return 0;
+ }
+@@ -1536,7 +1561,7 @@ gboolean gexiv2_metadata_try_set_tag_lon
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return FALSE;
+ }
+@@ -1691,6 +1716,12 @@ gboolean gexiv2_metadata_get_exif_thumbn
+     g_return_val_if_fail(self->priv->image.get() != nullptr, FALSE);
+ 
+     Exiv2::ExifThumb thumb = Exiv2::ExifThumb(self->priv->image->exifData());
++#ifdef EXIV2_DATABUF_HAS_PRIVATE_PDATA
++    auto buf = thumb.copy();
++    *buffer = reinterpret_cast<guint8*>(g_malloc(buf.size()));
++    std::copy(buf.begin(), buf.end(), *buffer);
++    *size = buf.size();
++#else
+     Exiv2::DataBuf data = thumb.copy();
+     if (data.pData_ == nullptr)
+         return FALSE;
+@@ -1698,6 +1729,7 @@ gboolean gexiv2_metadata_get_exif_thumbn
+     *buffer = (guint8*) g_malloc(data.size_);
+     memcpy(*buffer, data.pData_, data.size_);
+     *size = data.size_;
++#endif
+ 
+     return TRUE;
+ }
+@@ -1713,7 +1745,7 @@ gboolean gexiv2_metadata_set_exif_thumbn
+         
+         return TRUE;
+     } catch (Exiv2::Error &e) {
+-        g_set_error_literal (error, g_quark_from_string ("GExiv2"), e.code (), e.what ());
++        g_set_error_literal (error, g_quark_from_string ("GExiv2"), static_cast<int>(e.code()), e.what ());
+     }
+     
+     return FALSE;
+@@ -1745,7 +1777,7 @@ void gexiv2_metadata_try_set_exif_thumbn
+         Exiv2::ExifThumb thumb = Exiv2::ExifThumb(self->priv->image->exifData());
+         thumb.setJpegThumbnail(buffer, size);
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -1769,7 +1801,7 @@ void gexiv2_metadata_try_erase_exif_thum
+         Exiv2::ExifThumb thumb = Exiv2::ExifThumb(self->priv->image->exifData());
+         thumb.erase();
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+ }
+ 
+@@ -1788,7 +1820,7 @@ const gchar* gexiv2_metadata_try_get_tag
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return nullptr;
+ }
+@@ -1824,7 +1856,7 @@ const gchar* gexiv2_metadata_try_get_tag
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return nullptr;
+ }
+@@ -1860,7 +1892,7 @@ const gchar* gexiv2_metadata_try_get_tag
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return nullptr;
+ }
+@@ -1899,7 +1931,7 @@ gboolean gexiv2_metadata_try_tag_support
+ 
+     // Invalid tag (Family name)
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return FALSE;
+ }
+@@ -1921,7 +1953,7 @@ GBytes* gexiv2_metadata_try_get_tag_raw(
+ 
+     // Invalid "familyName"
+     Exiv2::Error e(Exiv2::ErrorCode::kerInvalidKey, tag);
+-    g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++    g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+ 
+     return nullptr;
+ }
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-preview-image.cpp
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-preview-image.cpp:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-preview-image.cpp        Sat Jul  1 22:14:59 2023
@@ -0,0 +1,25 @@
+$NetBSD: patch-gexiv2_gexiv2-preview-image.cpp,v 1.1 2023/07/01 22:14:59 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-preview-image.cpp.orig       2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-preview-image.cpp
+@@ -66,7 +66,7 @@ GExiv2PreviewImage* gexiv2_preview_image
+ 
+         g_object_unref(self);
+ 
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     return nullptr;
+ }
+@@ -141,7 +141,7 @@ glong gexiv2_preview_image_try_write_fil
+     try {
+         return self->priv->image->writeFile(path);
+     } catch (Exiv2::Error& e) {
+-        g_set_error_literal(error, g_quark_from_string("GExiv2"), e.code(), e.what());
++        g_set_error_literal(error, g_quark_from_string("GExiv2"), static_cast<int>(e.code()), e.what());
+     }
+     return -1;
+ }
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.cpp
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.cpp:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.cpp    Sat Jul  1 22:14:59 2023
@@ -0,0 +1,77 @@
+$NetBSD: patch-gexiv2_gexiv2-stream-io.cpp,v 1.1 2023/07/01 22:14:59 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-stream-io.cpp.orig   2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-stream-io.cpp
+@@ -11,15 +11,16 @@
+  */
+ 
+ #include "gexiv2-stream-io.h"
++
+ #include "gexiv2-managed-stream.h"
+ 
++#include <config.h>
++#include <exception>
+ #include <exiv2/exiv2.hpp>
+ #include <gio/gio.h>
+ #include <glib.h>
+ #include <stdio.h>
+ 
+-#include <exception>
+-
+ StreamIo::StreamIo (ManagedStreamCallbacks* callbacks)
+     : cb (callbacks), memio(nullptr), is_open (FALSE), can_write(FALSE) {
+     /* at least reading and seeking must be possible to read metatada */
+@@ -138,7 +139,7 @@ int StreamIo::seek (long offset, Positio
+     return 0;
+ }
+ 
+-long StreamIo::tell () const {
++StreamIo::size_type StreamIo::tell() const {
+     return cb->Position (cb->handle);
+ }
+ 
+@@ -165,11 +166,14 @@ int StreamIo::close () {
+ 
+ Exiv2::DataBuf StreamIo::read (size_type read_count) {
+     Exiv2::DataBuf buffer (read_count);
+-    
++#ifdef EXIV2_DATABUF_HAS_PRIVATE_PDATA
++    long read_bytes = read(buffer.data(), read_count);
++    buffer.resize(read_bytes);
++#else
+     long read_bytes = read (buffer.pData_, buffer.size_);
+-
+     buffer.size_ = read_bytes;
+-    
++#endif
++
+     return buffer;
+ }
+ 
+@@ -209,12 +213,22 @@ bool StreamIo::eof () const {
+     return (cb->Length (cb->handle) == cb->Position (cb->handle));
+ }
+ 
++#if EXIV2_TEST_VERSION(0, 27, 99)
++const std::string& StreamIo::path() const noexcept {
++#else
+ std::string StreamIo::path () const {
+-    return "managed stream";
++#endif
++    static std::string info{"managed stream"};
++
++    return info;
+ }
+ 
+ #ifdef EXV_UNICODE_PATH
++#if EXIV2_TEST_VERSION(0, 27, 99)
++const std::wstring& StreamIo::wpath() const noexcept {
++#else
+ std::wstring StreamIo::wpath() const {
++#endif
+     std::string p = path();
+     std::wstring w(p.length(), L' ');
+     std::copy(p.begin(), p.end(), w.begin());
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.h
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.h:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_gexiv2-stream-io.h      Sat Jul  1 22:14:59 2023
@@ -0,0 +1,53 @@
+$NetBSD: patch-gexiv2_gexiv2-stream-io.h,v 1.1 2023/07/01 22:14:59 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/gexiv2-stream-io.h.orig     2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/gexiv2-stream-io.h
+@@ -24,10 +24,14 @@ class StreamIo : public Exiv2::BasicIo {
+ public:
+ #if EXIV2_TEST_VERSION(0,27,99)
+     using ptr_type = Exiv2::BasicIo::UniquePtr;
+-    using size_type = long;
++    using size_type = size_t;
++    using path_type = const std::string&;
++    using wpath_type = const std::wstring&;
+ #else
+     using ptr_type = Exiv2::BasicIo::AutoPtr;
+     using size_type = long;
++    using path_type = std::string;
++    using wpath_type = std::wstring;
+ #endif
+ 
+       StreamIo (ManagedStreamCallbacks* cb);
+@@ -45,14 +49,25 @@ public:
+       int seek (long offset, Position pos) override;
+       Exiv2::byte* mmap (bool isWriteable = false) override;
+       int munmap () override;
+-      long tell () const override;
+-      size_t size () const override;
++    size_type tell() const override;
++    size_t size () const override;
+       bool isopen () const override;
+       int error () const override;
+       bool eof () const override;
+-      std::string path () const override;
++#if EXIV2_TEST_VERSION(0, 27, 99)
++    void populateFakeData() override{};
++#endif
++#if EXIV2_TEST_VERSION(0, 27, 99)
++    const std::string& path() const noexcept override;
++#else
++    std::string path () const override;
++#endif
+ #ifdef EXV_UNICODE_PATH
+-      std::wstring wpath () const override;
++#if EXIV2_TEST_VERSION(0, 27, 99)
++    const std::wstring& wpath() const noexcept override;
++#else
++    std::wstring wpath() const override;
++#endif
+ #endif
+       ptr_type temporary () const;
+ 
Index: pkgsrc/graphics/gexiv2/patches/patch-gexiv2_meson.build
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-gexiv2_meson.build:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-gexiv2_meson.build     Sat Jul  1 22:14:59 2023
@@ -0,0 +1,16 @@
+$NetBSD: patch-gexiv2_meson.build,v 1.1 2023/07/01 22:14:59 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- gexiv2/meson.build.orig    2023-05-06 08:50:03.000000000 +0000
++++ gexiv2/meson.build
+@@ -61,7 +61,7 @@ gexiv2 = library('gexiv2',
+                   'gexiv2-preview-properties-private.h',
+                   'gexiv2-preview-image-private.h'] +
+                  gexiv2_headers +
+-                 [version_header] +
++                 [version_header, config_h] +
+                  enum_sources,
+                  include_directories : include_directories('..'),
+                  version: libversion,
Index: pkgsrc/graphics/gexiv2/patches/patch-meson.build
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-meson.build:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-meson.build    Sat Jul  1 22:14:59 2023
@@ -0,0 +1,66 @@
+$NetBSD: patch-meson.build,v 1.1 2023/07/01 22:14:59 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- meson.build.orig   2023-05-06 08:50:03.000000000 +0000
++++ meson.build
+@@ -32,6 +32,58 @@ bmff_test = '''#include <exiv2/exiv2.hpp
+ 
+ bmff_available = cpp.compiles(bmff_test, name : 'BMFF support in exiv2', dependencies : [exiv2])
+ 
++private_pdata_test = '''#include <exiv2/exiv2.hpp>
++#include <iostream>
++int main(void) {
++  Exiv2::DataBuf buf;
++  std::cout << buf.c_data() << std::endl;
++
++  return 0;
++}'''
++private_pdata = cpp.compiles(private_pdata_test, name : 'DataBuf is sealead in exiv2', dependencies : [exiv2])
++
++has_any_error_test = '''#include <exiv2/exiv2.hpp>
++#include <iostream>
++int main(void) {
++  Exiv2::AnyError *e;
++
++  return 0;
++}'''
++has_any_error = cpp.compiles(has_any_error_test, name : 'AnyError exists in exiv2', dependencies : [exiv2])
++
++xmpdatum_has_to_long_test = '''#include <exiv2/exiv2.hpp>
++#include <iostream>
++int main(void) {
++  Exiv2::XmpKey k{"Xmp.audio.Compressor"};
++  Exiv2::Xmpdatum d{k, nullptr};
++  d.toLong();
++
++  return 0;
++}'''
++xmpdatum_has_to_long = cpp.compiles(xmpdatum_has_to_long_test, name: 'Xmpdatum has toLong() in exiv2', dependencies : [exiv2])
++
++exifdatum_has_to_long_test = '''#include <exiv2/exiv2.hpp>
++#include <iostream>
++int main(void) {
++  Exiv2::ExifKey k{"Exif.Image.OECF"};
++  Exiv2::Exifdatum d{k, nullptr};
++  d.toLong();
++
++  return 0;
++}'''
++exifdatum_has_to_long = cpp.compiles(exifdatum_has_to_long_test, name: 'Exifdatum has toLong() in exiv2', dependencies : [exiv2])
++
++build_config = configuration_data ()
++build_config.set('EXIV2_DATABUF_HAS_PRIVATE_PDATA', private_pdata)
++build_config.set('EXIV2_HAS_ANY_ERROR', has_any_error)
++build_config.set('EXIV2_XMPDATUM_HAS_TO_LONG', xmpdatum_has_to_long)
++build_config.set('EXIV2_EXIFDATUM_HAS_TO_LONG', exifdatum_has_to_long)
++config_h = configure_file(
++  output: 'config.h',
++  configuration: build_config
++)
++
++
+ find_program('g-ir-scanner', required: get_option('introspection'))
+ 
+ if get_option('vapi')
Index: pkgsrc/graphics/gexiv2/patches/patch-test_python_test__metadata.py
diff -u /dev/null pkgsrc/graphics/gexiv2/patches/patch-test_python_test__metadata.py:1.1
--- /dev/null   Sat Jul  1 22:14:59 2023
+++ pkgsrc/graphics/gexiv2/patches/patch-test_python_test__metadata.py  Sat Jul  1 22:14:59 2023
@@ -0,0 +1,69 @@
+$NetBSD: patch-test_python_test__metadata.py,v 1.1 2023/07/01 22:14:59 wiz Exp $
+
+Fix build with exiv2 0.28.0.
+https://gitlab.gnome.org/GNOME/gexiv2/-/commit/06adc8fb70cb8c77c0cd364195d8251811106ef8
+
+--- test/python/test_metadata.py.orig  2023-05-06 08:50:03.000000000 +0000
++++ test/python/test_metadata.py
+@@ -323,18 +323,15 @@ class TestMetadata(unittest.TestCase):
+             buf = fd.read()
+         metadata = GExiv2.Metadata()
+         metadata.open_buf(buf)
+-        self.assertEqual(len(metadata.get_exif_tags()), 111)
++        self.assertGreaterEqual(len(metadata.get_exif_tags()), 111)
+ 
+     def test_open_path(self):
+         metadata = GExiv2.Metadata()
+         metadata.open_path(self.get_input_file())
+-        self.assertEqual(len(metadata.get_exif_tags()), 111)
++        self.assertGreaterEqual(len(metadata.get_exif_tags()), 111)
+ 
+     def test_get_tag_string(self):
+-        self.assertEqual(
+-            [(tag, self.metadata.get_tag_string(tag))
+-             for tag in self.metadata.get_exif_tags()
+-             if len(self.metadata.get_tag_string(tag)) < 100],
++        reference_data = dict(
+             [('Exif.Image.DateTime', '2012:11:02 09:04:27'),
+              ('Exif.Image.ExifTag', '234'),
+              ('Exif.Image.ImageDescription', '          '),
+@@ -440,12 +437,20 @@ class TestMetadata(unittest.TestCase):
+              ('Exif.Thumbnail.XResolution', '300/1'),
+              ('Exif.Thumbnail.YResolution', '300/1'),
+              ])
++        
++        data = dict([(tag, self.metadata.get_tag_string(tag))
++             for tag in self.metadata.get_exif_tags()
++             if len(self.metadata.get_tag_string(tag)) < 100])
++        
++        self.assertEqual(data, data | reference_data)
++
+ 
+     def test_get_tag_interpreted_string(self):
+-        self.assertEqual(
++        data = dict(
+             [(tag, self.metadata.get_tag_interpreted_string(tag))
+              for tag in self.metadata.get_exif_tags()
+-             if len(self.metadata.get_tag_interpreted_string(tag)) < 100],
++             if len(self.metadata.get_tag_interpreted_string(tag)) < 100]);
++        reference_data = dict(
+             [('Exif.Image.DateTime', '2012:11:02 09:04:27'),
+              ('Exif.Image.ExifTag', '234'),
+              ('Exif.Image.ImageDescription', '          '),
+@@ -551,6 +556,7 @@ class TestMetadata(unittest.TestCase):
+              ('Exif.Thumbnail.XResolution', '300'),
+              ('Exif.Thumbnail.YResolution', '300'),
+              ])
++        self.assertEqual(data, data | reference_data)
+ 
+     def test_has_tag(self):
+         self.assertTrue(self.metadata.has_tag('Exif.Image.DateTime'))
+@@ -564,7 +570,7 @@ class TestMetadata(unittest.TestCase):
+         self.assertFalse(self.metadata.has_tag('Exif.Image.DateTime'))
+ 
+     def test_clear(self):
+-        self.assertEqual(len(self.metadata.get_exif_tags()), 111)
++        self.assertGreaterEqual(len(self.metadata.get_exif_tags()), 111)
+         self.assertTrue(self.metadata.has_tag('Exif.Image.DateTime'))
+         self.assertIsNone(self.metadata.clear())
+         self.assertFalse(self.metadata.has_tag('Exif.Image.DateTime'))



Home | Main Index | Thread Index | Old Index