From nobody Sun Jul 09 22:09:58 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QzhBt3KbFz4mqw8; Sun, 9 Jul 2023 22:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QzhBt2d05z3DGW; Sun, 9 Jul 2023 22:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688940598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAbP8h/5FdO2VMo8vBnCPZowae4GWKhBwznWsa8vRsw=; b=KnCMP5lYe5+S7eTN72b+mHb19nGgOPcd5ddJdnMyNGRiN5ZSdi3JyUMZKvNJpuAbFfw6X7 AtIgZLoSUgcoRqSb3D8Rqjz+Bu3lSagsBMoXL5kwN4d4dqDgE4FlnsJu96JyD4ejXrEErh m+q57cqUZL+c3Rd1p7bc+GKnMawG+de8dXwYuv+1WdKkr1kyRyvvTTXw+4Fs4/91R8DHsE EHh3O8FwgpH6IPs8dvB/uYySr3RsqvclLAgk6FoRZz6iEpyMWpViKWVDrlazKMfnzCDLLy 1s5TBtdM2tQP8DB1fqHtU7KLSsb3oJgQsndHTsDHA6AN6e7MFZN/2JKvJWbvMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688940598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAbP8h/5FdO2VMo8vBnCPZowae4GWKhBwznWsa8vRsw=; b=EBIi6hbgCq8HLT5OJ7PEXFmMNnw0XsLDcWinLvzz3GmrJbFjKeLK/NoGxVVMdibZp+qTFn pGNXUdbWMOF+mCV9VnLnNYe8xUdlJPjEjMC91ckLIx/3rZJMFCKMtjImTjgOO0DoZbcX8M wyRlbcFyY7Rgr/DW0FriPrxWPsTyMXShCNexkFzLZwnnkj/QI/ttOl6zeglg04d3qO2pIJ syWp4s7Q3rMwIHYid6AY7V/0DELrM8Ki5uc0BKyFKZ+YQIYPv1AU9Gy4Vl/kSS9bapcD91 cwBOZNc5IlRI4kVvwpYMb6A2ts4Ku5irzJ918o3+5B4RRc8c6OlL4llTE3u+nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688940598; a=rsa-sha256; cv=none; b=bzz0Rb+lsmbee+6KZo17dSaf+YK4qScMuIC/zisYFD3FiT1nBLbtMNL3mLn5GHsMpd3a1J +pqAUU8/OzDgQGQE1dB+Z4TLAs80uUcuSIr2cIRGHR4gS/gobZmiHEkeWgfWiKRt/qljmg KcOe2YrzmE81+2ng4evn3V5I0/TSAsGdryzqqLwP6ovaNTBdJg1tiN5IZ7Zml0uwzSa1KS SE8HICrIv67NqaCyvwksuw6lI/EWkyTMKegugyZ3Dm04exxW4HALt+C+qNQM1zYa0w98fD tnY94gTgsDtcbETPpVety6nWpRJv74Q5E8+jZD7niw8DiiBOL9302byb9p5bgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QzhBt1YNSzKv0; Sun, 9 Jul 2023 22:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 369M9wWf034608; Sun, 9 Jul 2023 22:09:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 369M9w1m034607; Sun, 9 Jul 2023 22:09:58 GMT (envelope-from git) Date: Sun, 9 Jul 2023 22:09:58 GMT Message-Id: <202307092209.369M9w1m034607@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Andree Subject: git: 7314f3d14ab7 - main - graphics/digikam: make compatible with exiv2 0.28 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mandree X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7314f3d14ab7912d70800cae62bf5ffc778376f3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=7314f3d14ab7912d70800cae62bf5ffc778376f3 commit 7314f3d14ab7912d70800cae62bf5ffc778376f3 Author: Matthias Andree AuthorDate: 2023-07-03 00:04:45 +0000 Commit: Matthias Andree CommitDate: 2023-07-09 22:09:12 +0000 graphics/digikam: make compatible with exiv2 0.28 NOTE: Upstream has just tagged digikam 8.1.0 which should also work with exiv2 0.28, see here: https://invent.kde.org/graphics/digikam/-/blob/v8.1.0/NEWS But the web site does not yet mention 8.1.0 and the release tarball is not available, so upgrading might be premature. PR: 272311 --- graphics/digikam/Makefile | 2 +- ..._metadataengine_engine_metaengine__comments.cpp | 11 +++ ...s_metadataengine_engine_metaengine__data__p.cpp | 11 +++ ...libs_metadataengine_engine_metaengine__exif.cpp | 98 ++++++++++++++++++++++ ...libs_metadataengine_engine_metaengine__iptc.cpp | 29 +++++++ ...libs_metadataengine_engine_metaengine__item.cpp | 65 ++++++++++++++ ...re_libs_metadataengine_engine_metaengine__p.cpp | 11 +++ ...core_libs_metadataengine_engine_metaengine__p.h | 22 +++++ ..._libs_metadataengine_engine_metaengine__xmp.cpp | 20 +++++ 9 files changed, 268 insertions(+), 1 deletion(-) diff --git a/graphics/digikam/Makefile b/graphics/digikam/Makefile index 7a7e1e3a9e10..6309bb4fce25 100644 --- a/graphics/digikam/Makefile +++ b/graphics/digikam/Makefile @@ -1,6 +1,6 @@ PORTNAME= digikam DISTVERSION= 7.10.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= graphics kde MASTER_SITES= KDE/stable/${PORTNAME}/${PORTVERSION} DIST_SUBDIR= KDE/${PORTNAME}/${PORTVERSION} diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__comments.cpp b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__comments.cpp new file mode 100644 index 000000000000..ea033e9b1ef8 --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__comments.cpp @@ -0,0 +1,11 @@ +--- core/libs/metadataengine/engine/metaengine_comments.cpp.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_comments.cpp +@@ -64,7 +64,7 @@ bool MetaEngine::canWriteComment(const QString& filePa + catch (Exiv2::AnyError& e) + { + qCCritical(DIGIKAM_METAENGINE_LOG) << "Cannot check Comment access mode with Exiv2 (Error #" +- << e.code() << ": " << QString::fromStdString(e.what()) << ")"; ++ << static_cast(e.code()) << ": " << QString::fromStdString(e.what()) << ")"; + } + catch (...) + { diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__data__p.cpp b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__data__p.cpp new file mode 100644 index 000000000000..0131c92db68c --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__data__p.cpp @@ -0,0 +1,11 @@ +--- core/libs/metadataengine/engine/metaengine_data_p.cpp.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_data_p.cpp +@@ -52,7 +52,7 @@ void MetaEngineData::Private::clear() + catch (Exiv2::AnyError& e) + { + qCCritical(DIGIKAM_METAENGINE_LOG) << "Cannot clear data container with Exiv2 " +- << "(Error #" << e.code() << ": " ++ << "(Error #" << static_cast(e.code()) << ": " + << QString::fromStdString(e.what()) + << ")"; + } diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__exif.cpp b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__exif.cpp new file mode 100644 index 000000000000..4bf3eb5d4c7f --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__exif.cpp @@ -0,0 +1,98 @@ +--- core/libs/metadataengine/engine/metaengine_exif.cpp.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_exif.cpp +@@ -80,7 +80,7 @@ bool MetaEngine::canWriteExif(const QString& filePath) + catch (Exiv2::AnyError& e) + { + qCCritical(DIGIKAM_METAENGINE_LOG) << "Cannot check Exif access mode with Exiv2:(Error #" +- << e.code() << ": " << QString::fromStdString(e.what()) << ")"; ++ << static_cast(e.code()) << ": " << QString::fromStdString(e.what()) << ")"; + } + catch (...) + { +@@ -739,7 +739,7 @@ bool MetaEngine::getExifTagLong(const char* exifTagNam + + if ((it != exifData.end()) && (it->count() > 0)) + { +- val = it->toLong(component); ++ val = it->toInt64(component); + + return true; + } +@@ -812,7 +812,7 @@ QVariant MetaEngine::getExifTagVariant(const char* exi + { + if ((int)it->count() > component) + { +- return QVariant((int)it->toLong(component)); ++ return QVariant((int)it->toInt64(component)); + } + else + { +@@ -915,7 +915,7 @@ QString MetaEngine::getExifTagString(const char* exifT + QString tagValue; + QString key = QLatin1String(it->key().c_str()); + +- if ((key == QLatin1String("Exif.CanonCs.LensType")) && (it->toLong() == 65535)) ++ if ((key == QLatin1String("Exif.CanonCs.LensType")) && (it->toInt64() == 65535)) + { + // FIXME: workaround for a possible crash in Exiv2 pretty-print function for the Exif.CanonCs.LensType. + +@@ -987,12 +987,12 @@ QImage MetaEngine::getExifThumbnail(bool fixOrientatio + Exiv2::ExifThumbC thumb(d->exifMetadata()); + Exiv2::DataBuf const c1 = thumb.copy(); + +- if (c1.size_ == 0) ++ if (c1.size() == 0) + { + return thumbnail; + } + +- thumbnail.loadFromData(c1.pData_, c1.size_); ++ thumbnail.loadFromData(c1.c_data(), c1.size()); + + if (!thumbnail.isNull()) + { +@@ -1010,7 +1010,7 @@ QImage MetaEngine::getExifThumbnail(bool fixOrientatio + + if (it != exifData.end() && it->count()) + { +- long orientation = it->toLong(); ++ long orientation = it->toInt64(); + + //qCDebug(DIGIKAM_METAENGINE_LOG) << "Exif Thumbnail Orientation: " << (int)orientation; + +@@ -1092,12 +1092,12 @@ bool MetaEngine::setTiffThumbnail(const QImage& thumbI + + Exiv2::ExifData::const_iterator pos = d->exifMetadata().findKey(Exiv2::ExifKey("Exif.Image.NewSubfileType")); + +- if ((pos == d->exifMetadata().end()) || (pos->count() != 1) || (pos->toLong() != 0)) ++ if ((pos == d->exifMetadata().end()) || (pos->count() != 1) || (pos->toInt64() != 0)) + { + + #if EXIV2_TEST_VERSION(0,27,0) + +- throw Exiv2::Error(Exiv2::kerErrorMessage, "Exif.Image.NewSubfileType missing or not set as main image"); ++ throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, "Exif.Image.NewSubfileType missing or not set as main image"); + + #else + +@@ -1136,9 +1136,9 @@ bool MetaEngine::setTiffThumbnail(const QImage& thumbI + Exiv2::DataBuf buf((Exiv2::byte*)data.data(), data.size()); + Exiv2::ULongValue val; + val.read("0"); +- val.setDataArea(buf.pData_, buf.size_); ++ val.setDataArea(buf.c_data(), buf.size()); + d->exifMetadata()["Exif.SubImage1.JPEGInterchangeFormat"] = val; +- d->exifMetadata()["Exif.SubImage1.JPEGInterchangeFormatLength"] = uint32_t(buf.size_); ++ d->exifMetadata()["Exif.SubImage1.JPEGInterchangeFormatLength"] = uint32_t(buf.size()); + d->exifMetadata()["Exif.SubImage1.Compression"] = uint16_t(6); // JPEG (old-style) + d->exifMetadata()["Exif.SubImage1.NewSubfileType"] = uint32_t(1); // Thumbnail image + +@@ -1261,7 +1261,7 @@ MetaEngine::MetaDataMap MetaEngine::getExifTagsDataLis + { + tagValue = QString::number(md->value().size()); + } +- else if (key == QLatin1String("Exif.CanonCs.LensType") && md->toLong() == 65535) ++ else if (key == QLatin1String("Exif.CanonCs.LensType") && md->toInt64() == 65535) + { + // FIXME: workaround for a possible crash in Exiv2 pretty-print function for the Exif.CanonCs.LensType. + diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__iptc.cpp b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__iptc.cpp new file mode 100644 index 000000000000..2d3ccae32866 --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__iptc.cpp @@ -0,0 +1,29 @@ +--- core/libs/metadataengine/engine/metaengine_iptc.cpp.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_iptc.cpp +@@ -29,6 +29,8 @@ + #include "digikam_debug.h" + #include "digikam_config.h" + ++#include ++ + #if defined(Q_CC_CLANG) + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wdeprecated-declarations" +@@ -65,7 +67,7 @@ bool MetaEngine::canWriteIptc(const QString& filePath) + catch (Exiv2::AnyError& e) + { + qCCritical(DIGIKAM_METAENGINE_LOG) << "Cannot check Iptc access mode with Exiv2:(Error #" +- << e.code() << ": " << QString::fromStdString(e.what()) << ")"; ++ << static_cast(e.code()) << ": " << QString::fromStdString(e.what()) << ")"; + } + catch (...) + { +@@ -121,7 +123,7 @@ QByteArray MetaEngine::getIptc(bool addIrbHeader) cons + c2 = Exiv2::IptcParser::encode(d->iptcMetadata()); + } + +- QByteArray data((const char*)c2.pData_, c2.size_); ++ QByteArray data(reinterpret_cast(c2.c_data()), c2.size()); + + return data; + } diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__item.cpp b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__item.cpp new file mode 100644 index 000000000000..b28099023389 --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__item.cpp @@ -0,0 +1,65 @@ +--- core/libs/metadataengine/engine/metaengine_item.cpp.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_item.cpp +@@ -127,7 +127,7 @@ QSize MetaEngine::getItemDimensions() const + + if ((it != exifData.end()) && it->count()) + { +- width = it->toLong(); ++ width = it->toInt64(); + } + + Exiv2::ExifKey key2("Exif.Photo.PixelYDimension"); +@@ -135,7 +135,7 @@ QSize MetaEngine::getItemDimensions() const + + if ((it2 != exifData.end()) && it2->count()) + { +- height = it2->toLong(); ++ height = it2->toInt64(); + } + + if ((width != -1) && (height != -1)) +@@ -153,7 +153,7 @@ QSize MetaEngine::getItemDimensions() const + + if ((it3 != exifData.end()) && it3->count()) + { +- width = it3->toLong(); ++ width = it3->toInt64(); + } + + Exiv2::ExifKey key4("Exif.Image.ImageLength"); +@@ -161,7 +161,7 @@ QSize MetaEngine::getItemDimensions() const + + if ((it4 != exifData.end()) && it4->count()) + { +- height = it4->toLong(); ++ height = it4->toInt64(); + } + + if ((width != -1) && (height != -1)) +@@ -320,7 +320,7 @@ MetaEngine::ImageOrientation MetaEngine::getItemOrient + + if ((it != exifData.end()) && it->count()) + { +- orientation = it->toLong(); ++ orientation = it->toInt64(); + + //qCDebug(DIGIKAM_METAENGINE_LOG) << "Orientation => Exif.MinoltaCs7D.Rotation =>" << (int)orientation; + +@@ -347,7 +347,7 @@ MetaEngine::ImageOrientation MetaEngine::getItemOrient + + if ((it != exifData.end()) && it->count()) + { +- orientation = it->toLong(); ++ orientation = it->toInt64(); + + //qCDebug(DIGIKAM_METAENGINE_LOG) << "Orientation => Exif.MinoltaCs5D.Rotation =>" << (int)orientation; + +@@ -376,7 +376,7 @@ MetaEngine::ImageOrientation MetaEngine::getItemOrient + + if ((it != exifData.end()) && it->count()) + { +- orientation = it->toLong(); ++ orientation = it->toInt64(); + + //qCDebug(DIGIKAM_METAENGINE_LOG) << "Orientation => Exif.Image.Orientation =>" << (int)orientation; + diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__p.cpp b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__p.cpp new file mode 100644 index 000000000000..722990b80fc4 --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__p.cpp @@ -0,0 +1,11 @@ +--- core/libs/metadataengine/engine/metaengine_p.cpp.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_p.cpp +@@ -542,7 +542,7 @@ bool MetaEngine::Private::saveOperations(const QFileIn + void MetaEngine::Private::printExiv2ExceptionError(const QString& msg, Exiv2::AnyError& e) + { + qCCritical(DIGIKAM_METAENGINE_LOG) << msg.toLatin1().constData() +- << " (Error #" << e.code() << ": " << QString::fromStdString(e.what()); ++ << " (Error #" << static_cast(e.code()) << ": " << QString::fromStdString(e.what()); + } + + void MetaEngine::Private::printExiv2MessageHandler(int lvl, const char* msg) diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__p.h b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__p.h new file mode 100644 index 000000000000..a32ff29c2b30 --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__p.h @@ -0,0 +1,22 @@ +--- core/libs/metadataengine/engine/metaengine_p.h.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_p.h +@@ -90,6 +90,10 @@ + ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) ) + #endif + ++#if EXIV2_TEST_VERSION(0,28,0) ++# define AnyError Error ++#endif ++ + #if EXIV2_TEST_VERSION(0,27,99) + # define AutoPtr UniquePtr + #endif +@@ -182,7 +186,7 @@ class Q_DECL_HIDDEN MetaEngine::Private (public) + * Generic method to print the Exiv2 C++ Exception error message from 'e'. + * 'msg' string is printed using qDebug rules. + */ +- static void printExiv2ExceptionError(const QString& msg, Exiv2::AnyError& e); ++ static void printExiv2ExceptionError(const QString& msg, Exiv2::Error& e); + + /** + * Generic method to print debug message from Exiv2. diff --git a/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__xmp.cpp b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__xmp.cpp new file mode 100644 index 000000000000..285ef0ed2e5a --- /dev/null +++ b/graphics/digikam/files/patch-core_libs_metadataengine_engine_metaengine__xmp.cpp @@ -0,0 +1,20 @@ +--- core/libs/metadataengine/engine/metaengine_xmp.cpp.orig 2023-03-12 13:19:02 UTC ++++ core/libs/metadataengine/engine/metaengine_xmp.cpp +@@ -67,7 +67,7 @@ bool MetaEngine::canWriteXmp(const QString& filePath) + catch (Exiv2::AnyError& e) + { + qCCritical(DIGIKAM_METAENGINE_LOG) << "Cannot check Xmp access mode with Exiv2:(Error #" +- << e.code() << ": " << QString::fromStdString(e.what()) << ")"; ++ << static_cast(e.code()) << ": " << QString::fromStdString(e.what()) << ")"; + } + catch (...) + { +@@ -1014,7 +1014,7 @@ QVariant MetaEngine::getXmpTagVariant(const char* xmpT + case Exiv2::signedShort: + case Exiv2::signedLong: + { +- return QVariant((int)it->toLong()); ++ return QVariant((int)it->toInt64()); + } + + case Exiv2::unsignedRational: