From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5582915806E for ; Mon, 22 May 2023 17:33:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9122BE0AC4; Mon, 22 May 2023 17:33:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6DE17E0AC4 for ; Mon, 22 May 2023 17:33:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 62C7233BEBE for ; Mon, 22 May 2023 17:33:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 424BAA67 for ; Mon, 22 May 2023 17:33:38 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1684776731.bc7d8c325d342435ed3d3f52627f3ea46d472835.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-apps/gwenview/files/gwenview-23.04.1-exiv2-0.28.patch kde-apps/gwenview/gwenview-23.04.1.ebuild X-VCS-Directories: kde-apps/gwenview/ kde-apps/gwenview/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: bc7d8c325d342435ed3d3f52627f3ea46d472835 X-VCS-Branch: master Date: Mon, 22 May 2023 17:33:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ea5dab81-e657-4b39-928f-82a39dd62cb7 X-Archives-Hash: fdd9f0af5778ae64a37211baad78102c commit: bc7d8c325d342435ed3d3f52627f3ea46d472835 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon May 22 17:32:11 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon May 22 17:32:11 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc7d8c32 kde-apps/gwenview: Fix build with >=exiv2-0.28 Closes: https://bugs.gentoo.org/906467 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/gwenview-23.04.1-exiv2-0.28.patch | 83 ++++++++++++++++++++++ kde-apps/gwenview/gwenview-23.04.1.ebuild | 2 + 2 files changed, 85 insertions(+) diff --git a/kde-apps/gwenview/files/gwenview-23.04.1-exiv2-0.28.patch b/kde-apps/gwenview/files/gwenview-23.04.1-exiv2-0.28.patch new file mode 100644 index 000000000000..dde9b1c2321e --- /dev/null +++ b/kde-apps/gwenview/files/gwenview-23.04.1-exiv2-0.28.patch @@ -0,0 +1,83 @@ +From a7275c90bf51a352783c723116a716af419896f4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= +Date: Sun, 21 May 2023 01:09:59 +0200 +Subject: [PATCH] Fix build with exiv2 >= 0.28 + +--- + lib/jpegcontent.cpp | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/lib/jpegcontent.cpp b/lib/jpegcontent.cpp +index 284fb6e61..286333f69 100644 +--- a/lib/jpegcontent.cpp ++++ b/lib/jpegcontent.cpp +@@ -301,7 +301,11 @@ Orientation JpegContent::orientation() const + if (it == d->mExifData.end() || it->count() == 0 || it->typeId() != Exiv2::unsignedShort) { + return NOT_AVAILABLE; + } ++#if EXIV2_TEST_VERSION(0,28,0) ++ return Orientation(it->toUint32()); ++#else + return Orientation(it->toLong()); ++#endif + } + + int JpegContent::dotsPerMeterX() const +@@ -321,7 +325,11 @@ int JpegContent::dotsPerMeter(const QString &keyName) const + if (it == d->mExifData.end()) { + return 0; + } ++#if EXIV2_TEST_VERSION(0,28,0) ++ int res = it->toUint32(); ++#else + int res = it->toLong(); ++#endif + QString keyVal = QStringLiteral("Exif.Image.") + keyName; + Exiv2::ExifKey keyResolution(keyVal.toLocal8Bit().data()); + it = d->mExifData.findKey(keyResolution); +@@ -337,9 +345,17 @@ int JpegContent::dotsPerMeter(const QString &keyName) const + const float INCHESPERMETER = (100. / 2.54); + switch (res) { + case 3: // dots per cm ++#if EXIV2_TEST_VERSION(0,28,0) ++ return int(it->toUint32() * 100); ++#else + return int(it->toLong() * 100); ++#endif + default: // dots per inch ++#if EXIV2_TEST_VERSION(0,28,0) ++ return int(it->toUint32() * INCHESPERMETER); ++#else + return int(it->toLong() * INCHESPERMETER); ++#endif + } + + return 0; +@@ -568,15 +584,24 @@ QImage JpegContent::thumbnail() const + auto it = d->mExifData.findKey(Exiv2::ExifKey("Exif.Canon.ThumbnailImageValidArea")); + // ensure ThumbnailImageValidArea actually specifies a rectangle, i.e. there must be 4 coordinates + if (it != d->mExifData.end() && it->count() == 4) { ++#if EXIV2_TEST_VERSION(0,28,0) ++ QRect validArea(QPoint(it->toUint32(0), it->toUint32(2)), QPoint(it->toUint32(1), it->toUint32(3))); ++#else + QRect validArea(QPoint(it->toLong(0), it->toLong(2)), QPoint(it->toLong(1), it->toLong(3))); ++#endif + image = image.copy(validArea); + } else { + // Unfortunately, Sony does not provide an exif tag that specifies the valid area of the + // embedded thumbnail. Need to derive it from the size of the preview image instead. + it = d->mExifData.findKey(Exiv2::ExifKey("Exif.Sony1.PreviewImageSize")); + if (it != d->mExifData.end() && it->count() == 2) { ++#if EXIV2_TEST_VERSION(0,28,0) ++ const long prevHeight = it->toUint32(0); ++ const long prevWidth = it->toUint32(1); ++#else + const long prevHeight = it->toLong(0); + const long prevWidth = it->toLong(1); ++#endif + + if (image.width() > 0 && prevWidth > 0) { + const double scale = prevWidth / image.width(); +-- +GitLab + diff --git a/kde-apps/gwenview/gwenview-23.04.1.ebuild b/kde-apps/gwenview/gwenview-23.04.1.ebuild index 423f549f8d73..62079ea15c37 100644 --- a/kde-apps/gwenview/gwenview-23.04.1.ebuild +++ b/kde-apps/gwenview/gwenview-23.04.1.ebuild @@ -82,6 +82,8 @@ BDEPEND=" dev-util/wayland-scanner " +PATCHES=( "${FILESDIR}/${P}-exiv2-0.28.patch" ) # bug 906467 + src_prepare() { ecm_src_prepare if ! use mpris; then