pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/krita



Module Name:    pkgsrc
Committed By:   mrg
Date:           Thu Jul  6 23:27:01 UTC 2023

Modified Files:
        pkgsrc/graphics/krita: distinfo
Added Files:
        pkgsrc/graphics/krita/patches: patch-libs_ui_kisexiv2_kis_exif_io.cpp
            patch-libs_ui_kisexiv2_kis_exiv2.cpp
            patch-libs_ui_kisexiv2_kis_exiv2.h
            patch-libs_ui_kisexiv2_kis_iptc_io.cpp
            patch-libs_ui_kisexiv2_kis_xmp_io.cpp
            patch-plugins_impex_jpeg_kis_jpeg_converter.cc

Log Message:
port to exiv2 0.28.

upstream has moved on and these files no longer exist, so these patches
will be obsolete when krita itself is upgraded.

convert Exiv2::Value::AutoPtr to Exiv2::Value::UniquePtr.
convert Exiv2::AnyError to Exiv2::Error.
convert toLong() to toInt64().
convert size_ to size(), and pData_ to c_str() (c_data() might be OK
here, but the caller converts to char *).
convert locateIptcIrb() caller to use references not pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/graphics/krita/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exif_io.cpp \
    pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.cpp \
    pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.h \
    pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_iptc_io.cpp \
    pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_xmp_io.cpp \
    pkgsrc/graphics/krita/patches/patch-plugins_impex_jpeg_kis_jpeg_converter.cc

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

Modified files:

Index: pkgsrc/graphics/krita/distinfo
diff -u pkgsrc/graphics/krita/distinfo:1.15 pkgsrc/graphics/krita/distinfo:1.16
--- pkgsrc/graphics/krita/distinfo:1.15 Thu Apr 13 20:53:40 2023
+++ pkgsrc/graphics/krita/distinfo      Thu Jul  6 23:27:01 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2023/04/13 20:53:40 mrg Exp $
+$NetBSD: distinfo,v 1.16 2023/07/06 23:27:01 mrg Exp $
 
 BLAKE2s (krita-4.4.8.tar.gz) = f99a2cbeb347c8ebccec4723e8ccf174ab7627a5b84f2de8c669a5cf33efecbf
 SHA512 (krita-4.4.8.tar.gz) = 53b9814fcf61fbaee06e81f456aa9de7ab09df99e04932251984c8ae190248e48fa20762bdb7be503ea267e1fb835095b105ce4bf2078fd510ab5a8ef6d82f81
@@ -7,10 +7,16 @@ SHA1 (patch-CMakeLists.txt) = 6cc4be72fb
 SHA1 (patch-krita_data_CMakeLists.txt) = bc0a37c1a60a2e0702c4a87b70ae0abf8359cc45
 SHA1 (patch-libs_image_CMakeLists.txt) = 42d0c1777f54aadeab4462b0f576a14e9c627146
 SHA1 (patch-libs_pigment_CMakeLists.txt) = c5c95326b6090f152ee54e8e7e629bf1df043fae
+SHA1 (patch-libs_ui_kisexiv2_kis_exif_io.cpp) = 5c87db34a21b95ebf7f952af13064dab356da06f
+SHA1 (patch-libs_ui_kisexiv2_kis_exiv2.cpp) = 2dc34158c5449fb26fdb09857320e8a76bd1a304
+SHA1 (patch-libs_ui_kisexiv2_kis_exiv2.h) = 57ac062510c75ab95e4a10318e1213588bacfbaf
+SHA1 (patch-libs_ui_kisexiv2_kis_iptc_io.cpp) = 79b70971601289d5a6f0d537a185b086f38ee36b
+SHA1 (patch-libs_ui_kisexiv2_kis_xmp_io.cpp) = 319ae2e4d0aa3af0c215de396e5978eedf7b59fd
 SHA1 (patch-plugins_color_lcms2engine_CMakeLists.txt) = 5b9a84c2db4f7c5f5876b60061a0950be484ac84
 SHA1 (patch-plugins_color_lcms2engine_tests_CMakeLists.txt) = aec29d538aef1247c9ac69c60d965677c1c16a96
 SHA1 (patch-plugins_impex_CMakeLists.txt) = 95e6fe736e2c2151a6ad4b5ef490c0777ca098fa
 SHA1 (patch-plugins_impex_exr_exr__converter.cc) = 1bfcbdea7f748900f48c5e070d7f5d5984a9b3bf
+SHA1 (patch-plugins_impex_jpeg_kis_jpeg_converter.cc) = 3cf8f107b1bb45beade836ef04f98cda7b7a5ac1
 SHA1 (patch-plugins_impex_raw_3rdparty_libkdcraw_src_kdcraw.cpp) = 10acf4968269c84c517b561ba73dad516cd65f86
 SHA1 (patch-plugins_impex_raw_CMakeLists.txt) = 3a94be6cb488fb8b8b2667dfb7a9b0dfa4496ef5
 SHA1 (patch-xcftools.h) = eeeed207e9b1995999a16efbbae91ed8f6255f48

Added files:

Index: pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exif_io.cpp
diff -u /dev/null pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exif_io.cpp:1.1
--- /dev/null   Thu Jul  6 23:27:01 2023
+++ pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exif_io.cpp        Thu Jul  6 23:27:01 2023
@@ -0,0 +1,81 @@
+$NetBSD: patch-libs_ui_kisexiv2_kis_exif_io.cpp,v 1.1 2023/07/06 23:27:01 mrg Exp $
+
+Build with exiv2 0.28.
+
+--- libs/ui/kisexiv2/kis_exif_io.cpp.orig      2021-08-24 00:56:28.000000000 -0700
++++ libs/ui/kisexiv2/kis_exif_io.cpp   2023-07-06 13:28:20.995859764 -0700
+@@ -46,7 +46,7 @@
+ // ---- Exception conversion functions ---- //
+ 
+ // convert ExifVersion and FlashpixVersion to a KisMetaData value
+-KisMetaData::Value exifVersionToKMDValue(const Exiv2::Value::AutoPtr value)
++KisMetaData::Value exifVersionToKMDValue(const Exiv2::Value::UniquePtr value)
+ {
+     const Exiv2::DataValue* dvalue = dynamic_cast<const Exiv2::DataValue*>(&*value);
+     if (dvalue) {
+@@ -71,7 +71,7 @@
+ }
+ 
+ // Convert an exif array of integer string to a KisMetaData array of integer
+-KisMetaData::Value exifArrayToKMDIntOrderedArray(const Exiv2::Value::AutoPtr value)
++KisMetaData::Value exifArrayToKMDIntOrderedArray(const Exiv2::Value::UniquePtr value)
+ {
+     QList<KisMetaData::Value> v;
+     const Exiv2::DataValue* dvalue = dynamic_cast<const Exiv2::DataValue*>(&*value);
+@@ -103,7 +103,7 @@
+     return new Exiv2::DataValue((const Exiv2::byte*)s.data(), s.size());
+ }
+ 
+-QDateTime exivValueToDateTime(const Exiv2::Value::AutoPtr value)
++QDateTime exivValueToDateTime(const Exiv2::Value::UniquePtr value)
+ {
+     return QDateTime::fromString(value->toString().c_str(), Qt::ISODate);
+ }
+@@ -138,7 +138,7 @@
+ }
+ 
+ 
+-KisMetaData::Value exifOECFToKMDOECFStructure(const Exiv2::Value::AutoPtr value, Exiv2::ByteOrder order)
++KisMetaData::Value exifOECFToKMDOECFStructure(const Exiv2::Value::UniquePtr value, Exiv2::ByteOrder order)
+ {
+     QMap<QString, KisMetaData::Value> oecfStructure;
+     const Exiv2::DataValue* dvalue = dynamic_cast<const Exiv2::DataValue*>(&*value);
+@@ -223,7 +223,7 @@
+     return new Exiv2::DataValue((const Exiv2::byte*)array.data(), array.size());
+ }
+ 
+-KisMetaData::Value deviceSettingDescriptionExifToKMD(const Exiv2::Value::AutoPtr value)
++KisMetaData::Value deviceSettingDescriptionExifToKMD(const Exiv2::Value::UniquePtr value)
+ {
+     QMap<QString, KisMetaData::Value> deviceSettingStructure;
+     QByteArray array;
+@@ -279,7 +279,7 @@
+     return new Exiv2::DataValue((const Exiv2::byte*)array.data(), array.size());
+ }
+ 
+-KisMetaData::Value cfaPatternExifToKMD(const Exiv2::Value::AutoPtr value, Exiv2::ByteOrder order)
++KisMetaData::Value cfaPatternExifToKMD(const Exiv2::Value::UniquePtr value, Exiv2::ByteOrder order)
+ {
+     QMap<QString, KisMetaData::Value> cfaPatternStructure;
+     const Exiv2::DataValue* dvalue = dynamic_cast<const Exiv2::DataValue*>(&*value);
+@@ -328,9 +328,9 @@
+ 
+ // Read and write Flash //
+ 
+-KisMetaData::Value flashExifToKMD(const Exiv2::Value::AutoPtr value)
++KisMetaData::Value flashExifToKMD(const Exiv2::Value::UniquePtr value)
+ {
+-    uint16_t v = value->toLong();
++    uint16_t v = value->toInt64();
+     QMap<QString, KisMetaData::Value> flashStructure;
+     bool fired = (v & 0x01);  // bit 1 is whether flash was fired or not
+     flashStructure["Fired"] = QVariant(fired);
+@@ -483,7 +483,7 @@
+                     dbgMetaData << "No exif value was created for" << entry.qualifiedName() << " as" << exivKey;// << " of KMD value" << entry.value();
+                 }
+             }
+-        } catch (Exiv2::AnyError& e) {
++        } catch (Exiv2::Error& e) {
+             dbgMetaData << "exiv error " << e.what();
+         }
+     }
Index: pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.cpp
diff -u /dev/null pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.cpp:1.1
--- /dev/null   Thu Jul  6 23:27:01 2023
+++ pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.cpp  Thu Jul  6 23:27:01 2023
@@ -0,0 +1,29 @@
+$NetBSD: patch-libs_ui_kisexiv2_kis_exiv2.cpp,v 1.1 2023/07/06 23:27:01 mrg Exp $
+
+Build with exiv2 0.28.
+
+--- libs/ui/kisexiv2/kis_exiv2.cpp.orig        2021-08-24 00:56:28.000000000 -0700
++++ libs/ui/kisexiv2/kis_exiv2.cpp     2023-07-06 13:23:55.815213204 -0700
+@@ -30,7 +30,7 @@
+ // ---- Generic conversion functions ---- //
+ 
+ // Convert an exiv value to a KisMetaData value
+-KisMetaData::Value exivValueToKMDValue(const Exiv2::Value::AutoPtr value, bool forceSeq, KisMetaData::Value::ValueType arrayType)
++KisMetaData::Value exivValueToKMDValue(const Exiv2::Value::UniquePtr value, bool forceSeq, KisMetaData::Value::ValueType arrayType)
+ {
+     switch (value->typeId()) {
+     case Exiv2::signedByte:
+@@ -51,11 +51,11 @@
+     case Exiv2::signedShort:
+     case Exiv2::signedLong: {
+         if (value->count() == 1 && !forceSeq) {
+-            return KisMetaData::Value((int)value->toLong());
++            return KisMetaData::Value((int)value->toInt64());
+         } else {
+             QList<KisMetaData::Value> array;
+             for (int i = 0; i < value->count(); i++)
+-                array.push_back(KisMetaData::Value((int)value->toLong(i)));
++                array.push_back(KisMetaData::Value((int)value->toInt64(i)));
+             return KisMetaData::Value(array, arrayType);
+         }
+     }
Index: pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.h
diff -u /dev/null pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.h:1.1
--- /dev/null   Thu Jul  6 23:27:01 2023
+++ pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_exiv2.h    Thu Jul  6 23:27:01 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-libs_ui_kisexiv2_kis_exiv2.h,v 1.1 2023/07/06 23:27:01 mrg Exp $
+
+Build with exiv2 0.28.
+
+--- libs/ui/kisexiv2/kis_exiv2.h.orig  2021-08-24 00:56:28.000000000 -0700
++++ libs/ui/kisexiv2/kis_exiv2.h       2023-07-06 13:21:06.245580233 -0700
+@@ -25,7 +25,7 @@
+ #include "kritaui_export.h"
+ 
+ /// Convert an exiv value to a KisMetaData value
+-KisMetaData::Value exivValueToKMDValue(const Exiv2::Value::AutoPtr value, bool forceSeq, KisMetaData::Value::ValueType arrayType = KisMetaData::Value::UnorderedArray);
++KisMetaData::Value exivValueToKMDValue(const Exiv2::Value::UniquePtr value, bool forceSeq, KisMetaData::Value::ValueType arrayType = KisMetaData::Value::UnorderedArray);
+ 
+ /// Convert a KisMetaData to an Exiv value
+ Exiv2::Value* kmdValueToExivValue(const KisMetaData::Value& value, Exiv2::TypeId type);
Index: pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_iptc_io.cpp
diff -u /dev/null pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_iptc_io.cpp:1.1
--- /dev/null   Thu Jul  6 23:27:01 2023
+++ pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_iptc_io.cpp        Thu Jul  6 23:27:01 2023
@@ -0,0 +1,33 @@
+$NetBSD: patch-libs_ui_kisexiv2_kis_iptc_io.cpp,v 1.1 2023/07/06 23:27:01 mrg Exp $
+
+Build with exiv2 0.28.
+
+--- libs/ui/kisexiv2/kis_iptc_io.cpp.orig      2021-08-24 00:56:28.000000000 -0700
++++ libs/ui/kisexiv2/kis_iptc_io.cpp   2023-07-06 13:42:14.791576472 -0700
+@@ -121,7 +121,7 @@
+                 if (v && v->typeId() != Exiv2::invalidTypeId) {
+                     iptcData.add(iptcKey, v);
+                 }
+-            } catch (Exiv2::AnyError& e) {
++            } catch (Exiv2::Error& e) {
+                 dbgMetaData << "exiv error " << e.what();
+             }
+         }
+@@ -139,7 +139,7 @@
+         header.append(photoshopBimId_);
+         header.append(photoshopIptc_);
+         header.append(QByteArray(2, 0));
+-        qint32 size = rawData.size_;
++        qint32 size = rawData.size();
+         QByteArray sizeArray(4, 0);
+         sizeArray[0] = (char)((size & 0xff000000) >> 24);
+         sizeArray[1] = (char)((size & 0x00ff0000) >> 16);
+@@ -149,7 +149,7 @@
+         ioDevice->write(header);
+     }
+ 
+-    ioDevice->write((const char*) rawData.pData_, rawData.size_);
++    ioDevice->write((const char*) rawData.c_str(), rawData.size());
+     ioDevice->close();
+     return true;
+ }
Index: pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_xmp_io.cpp
diff -u /dev/null pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_xmp_io.cpp:1.1
--- /dev/null   Thu Jul  6 23:27:01 2023
+++ pkgsrc/graphics/krita/patches/patch-libs_ui_kisexiv2_kis_xmp_io.cpp Thu Jul  6 23:27:01 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-libs_ui_kisexiv2_kis_xmp_io.cpp,v 1.1 2023/07/06 23:27:01 mrg Exp $
+
+Build with exiv2 0.28.
+
+--- libs/ui/kisexiv2/kis_xmp_io.cpp.orig       2021-08-24 00:56:28.000000000 -0700
++++ libs/ui/kisexiv2/kis_xmp_io.cpp    2023-07-06 13:21:06.244731108 -0700
+@@ -244,7 +244,7 @@
+                     Q_ASSERT(schema);
+                 }
+             }
+-            const Exiv2::Value::AutoPtr value = it->getValue();
++            const Exiv2::Value::UniquePtr value = it->getValue();
+ 
+             QString structName;
+             int arrayIndex = -1;
Index: pkgsrc/graphics/krita/patches/patch-plugins_impex_jpeg_kis_jpeg_converter.cc
diff -u /dev/null pkgsrc/graphics/krita/patches/patch-plugins_impex_jpeg_kis_jpeg_converter.cc:1.1
--- /dev/null   Thu Jul  6 23:27:01 2023
+++ pkgsrc/graphics/krita/patches/patch-plugins_impex_jpeg_kis_jpeg_converter.cc        Thu Jul  6 23:27:01 2023
@@ -0,0 +1,23 @@
+$NetBSD: patch-plugins_impex_jpeg_kis_jpeg_converter.cc,v 1.1 2023/07/06 23:27:01 mrg Exp $
+
+Build with exiv2 0.28.
+
+--- plugins/impex/jpeg/kis_jpeg_converter.cc.orig      2021-08-24 00:56:28.000000000 -0700
++++ plugins/impex/jpeg/kis_jpeg_converter.cc   2023-07-06 15:12:17.582284622 -0700
+@@ -33,6 +33,7 @@
+ }
+ 
+ #include <exiv2/jpgimage.hpp>
++#include <exiv2/photoshop.hpp>
+ 
+ #include <QFile>
+ #include <QBuffer>
+@@ -389,7 +390,7 @@
+             uint32_t sizeHdr = 0;
+             // Find actual Iptc data within the APP13 segment
+             if (!Exiv2::Photoshop::locateIptcIrb((Exiv2::byte*)(marker->data + 14),
+-                                                 marker->data_length - 14, &record, &sizeHdr, &sizeIptc)) {
++                                                 marker->data_length - 14, &record, sizeHdr, sizeIptc)) {
+                 if (sizeIptc) {
+                     // Decode the IPTC data
+                     QByteArray byteArray((const char*)(record + sizeHdr), sizeIptc);



Home | Main Index | Thread Index | Old Index