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 4E22D15806E for ; Mon, 29 May 2023 07:37:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 94699E0841; Mon, 29 May 2023 07:37:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 79F99E0841 for ; Mon, 29 May 2023 07:37:36 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 78B18340B9B for ; Mon, 29 May 2023 07:37:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 16D98A67 for ; Mon, 29 May 2023 07:37:34 +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: <1685345842.803295e8ae3ca539dea6f01ddeecbbd903e38bce.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/photoqt/, media-gfx/photoqt/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/photoqt/Manifest media-gfx/photoqt/files/photoqt-3.2-exiv2-0.28.patch media-gfx/photoqt/photoqt-3.2.ebuild X-VCS-Directories: media-gfx/photoqt/files/ media-gfx/photoqt/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 803295e8ae3ca539dea6f01ddeecbbd903e38bce X-VCS-Branch: master Date: Mon, 29 May 2023 07:37:34 +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: 238f9934-1e0d-48ac-bb1d-9eae7c15bc34 X-Archives-Hash: da443da39d6e35dfca7237e6b6828648 commit: 803295e8ae3ca539dea6f01ddeecbbd903e38bce Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon May 29 07:27:37 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon May 29 07:37:22 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=803295e8 media-gfx/photoqt: add 3.2, fix build with >=exiv2-0.28 Closes: https://bugs.gentoo.org/896348 Closes: https://bugs.gentoo.org/906491 Signed-off-by: Andreas Sturmlechner gentoo.org> media-gfx/photoqt/Manifest | 1 + .../photoqt/files/photoqt-3.2-exiv2-0.28.patch | 116 +++++++++++++++++++++ media-gfx/photoqt/photoqt-3.2.ebuild | 75 +++++++++++++ 3 files changed, 192 insertions(+) diff --git a/media-gfx/photoqt/Manifest b/media-gfx/photoqt/Manifest index 900b20d3660d..e71da2ca3239 100644 --- a/media-gfx/photoqt/Manifest +++ b/media-gfx/photoqt/Manifest @@ -1 +1,2 @@ DIST photoqt-2.9.1.tar.gz 3708647 BLAKE2B dd8c958709ebd830558f150f59c90c317d3f5edb363f92e9fadcd1506de4c97a41f6766670e202081397081c231604028298771eb52911255dae53bfa92a1a8d SHA512 c2ac3bce2ffa0962b243808cdd2495d45af3bd5703389de5e9626a518a8edf25646a317ff420dc0fdd8dc60a53104b1b5ec7e473087454d5c2f0b967066dc192 +DIST photoqt-3.2.tar.gz 965895 BLAKE2B ae1e159401b24a1bede344e4d398dbd6c2ae13fd467a4eac9ef15ea2d15933dc1756325a5a4f305a5f447bfd1a9e2d636e0b9367d0201ca356393c033c4f2f0f SHA512 ab7030d0ed6edf79373b1a99b1b8469cd567f04e5c233a87496084424603d8c241f7b473c22d323f4df8480d3f74918a987d2d590ec5026f1b7ca2c92b5c6bba diff --git a/media-gfx/photoqt/files/photoqt-3.2-exiv2-0.28.patch b/media-gfx/photoqt/files/photoqt-3.2-exiv2-0.28.patch new file mode 100644 index 000000000000..b1da118c1537 --- /dev/null +++ b/media-gfx/photoqt/files/photoqt-3.2-exiv2-0.28.patch @@ -0,0 +1,116 @@ +From 376fe8c3ef6b16d63995f76a194e2c1d788b28b1 Mon Sep 17 00:00:00 2001 +From: Lukas Spies +Date: Sun, 28 May 2023 20:23:32 -0500 +Subject: [PATCH 1/2] [exiv2] fix compilation with Exiv2 v0.28.0 + +--- + cplusplus/filefoldermodel/filefoldermodel.cpp | 4 ++++ + cplusplus/scripts/handlingfacetags.cpp | 4 ++++ + cplusplus/scripts/metadata.cpp | 4 ++++ + 3 files changed, 12 insertions(+) + +diff --git a/cplusplus/filefoldermodel/filefoldermodel.cpp b/cplusplus/filefoldermodel/filefoldermodel.cpp +index b6258735..56b120b7 100644 +--- a/cplusplus/filefoldermodel/filefoldermodel.cpp ++++ b/cplusplus/filefoldermodel/filefoldermodel.cpp +@@ -560,7 +560,11 @@ void PQFileFolderModel::advancedSortMainView() { + } catch (Exiv2::Error& e) { + // An error code of 11 means unknown file type + // Since we always try to read any file's meta data, this happens a lot ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType) ++#else + if(e.code() != 11) ++#endif + LOG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL; + else + DBG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL; +diff --git a/cplusplus/scripts/handlingfacetags.cpp b/cplusplus/scripts/handlingfacetags.cpp +index d90ece73..562cf200 100644 +--- a/cplusplus/scripts/handlingfacetags.cpp ++++ b/cplusplus/scripts/handlingfacetags.cpp +@@ -57,7 +57,11 @@ QVariantList PQHandlingFaceTags::getFaceTags(QString filename) { + image->readMetadata(); + } catch (Exiv2::Error& e) { + // An error code of 11 means image not supported. This is much more reliable than, e.g., checking a file ending ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType) ++#else + if(e.code() != 11) ++#endif + LOG << CURDATE << "PQHandlingFaceTags::getFaceTags() - ERROR reading metadata (caught exception): " << e << NL; + else + DBG << CURDATE << "PQHandlingFaceTags::getFaceTags() - ERROR reading metadata (caught exception): " << e << NL; +diff --git a/cplusplus/scripts/metadata.cpp b/cplusplus/scripts/metadata.cpp +index 87e23474..a7d3e076 100644 +--- a/cplusplus/scripts/metadata.cpp ++++ b/cplusplus/scripts/metadata.cpp +@@ -120,7 +120,11 @@ void PQMetaData::updateMetadata(QString path) { + } catch (Exiv2::Error& e) { + // An error code of 11 means unknown file type + // Since we always try to read any file's meta data, this happens a lot ++#if EXIV2_TEST_VERSION(0, 28, 0) ++ if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType) ++#else + if(e.code() != 11) ++#endif + LOG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL; + else + DBG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL; +-- +2.40.1 + + +From 6190de9e47c358cf54748fa2a3593108831aa768 Mon Sep 17 00:00:00 2001 +From: Lukas Spies +Date: Sun, 28 May 2023 20:27:08 -0500 +Subject: [PATCH 2/2] [exiv2] switch to proper exvi2 errorcode + +--- + cplusplus/filefoldermodel/filefoldermodel.cpp | 2 +- + cplusplus/scripts/handlingfacetags.cpp | 2 +- + cplusplus/scripts/metadata.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cplusplus/filefoldermodel/filefoldermodel.cpp b/cplusplus/filefoldermodel/filefoldermodel.cpp +index 56b120b7..c8cf199a 100644 +--- a/cplusplus/filefoldermodel/filefoldermodel.cpp ++++ b/cplusplus/filefoldermodel/filefoldermodel.cpp +@@ -561,7 +561,7 @@ void PQFileFolderModel::advancedSortMainView() { + // An error code of 11 means unknown file type + // Since we always try to read any file's meta data, this happens a lot + #if EXIV2_TEST_VERSION(0, 28, 0) +- if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType) ++ if(e.code() != Exiv2::ErrorCode::kerFileContainsUnknownImageType) + #else + if(e.code() != 11) + #endif +diff --git a/cplusplus/scripts/handlingfacetags.cpp b/cplusplus/scripts/handlingfacetags.cpp +index 562cf200..94a7bca6 100644 +--- a/cplusplus/scripts/handlingfacetags.cpp ++++ b/cplusplus/scripts/handlingfacetags.cpp +@@ -58,7 +58,7 @@ QVariantList PQHandlingFaceTags::getFaceTags(QString filename) { + } catch (Exiv2::Error& e) { + // An error code of 11 means image not supported. This is much more reliable than, e.g., checking a file ending + #if EXIV2_TEST_VERSION(0, 28, 0) +- if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType) ++ if(e.code() != Exiv2::ErrorCode::kerFileContainsUnknownImageType) + #else + if(e.code() != 11) + #endif +diff --git a/cplusplus/scripts/metadata.cpp b/cplusplus/scripts/metadata.cpp +index a7d3e076..fabc2d74 100644 +--- a/cplusplus/scripts/metadata.cpp ++++ b/cplusplus/scripts/metadata.cpp +@@ -121,7 +121,7 @@ void PQMetaData::updateMetadata(QString path) { + // An error code of 11 means unknown file type + // Since we always try to read any file's meta data, this happens a lot + #if EXIV2_TEST_VERSION(0, 28, 0) +- if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType) ++ if(e.code() != Exiv2::ErrorCode::kerFileContainsUnknownImageType) + #else + if(e.code() != 11) + #endif +-- +2.40.1 + diff --git a/media-gfx/photoqt/photoqt-3.2.ebuild b/media-gfx/photoqt/photoqt-3.2.ebuild new file mode 100644 index 000000000000..514da69340d7 --- /dev/null +++ b/media-gfx/photoqt/photoqt-3.2.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_KDEINSTALLDIRS=false +inherit ecm optfeature + +DESCRIPTION="Simple but powerful Qt-based image viewer" +HOMEPAGE="https://photoqt.org/" +SRC_URI="https://photoqt.org/pkgs/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="devil exif freeimage graphicsmagick imagemagick mpv pdf raw" + +COMMON_DEPEND=" + app-arch/libarchive:= + app-arch/unrar + dev-libs/pugixml + dev-qt/qtdbus:5 + dev-qt/qtdeclarative:5 + dev-qt/qtgui:5[jpeg] + dev-qt/qtimageformats:5 + dev-qt/qtmultimedia:5[qml] + dev-qt/qtnetwork:5 + dev-qt/qtprintsupport:5 + dev-qt/qtsql:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + devil? ( media-libs/devil ) + exif? ( media-gfx/exiv2:=[bmff] ) + freeimage? ( media-libs/freeimage ) + imagemagick? ( + !graphicsmagick? ( media-gfx/imagemagick:=[cxx] ) + graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] ) + ) + mpv? ( media-video/mpv:=[libmpv] ) + pdf? ( app-text/poppler[qt5] ) + raw? ( media-libs/libraw:= ) +" +DEPEND="${COMMON_DEPEND} + dev-qt/qtconcurrent:5 +" +RDEPEND="${COMMON_DEPEND} + dev-qt/qtgraphicaleffects:5 + dev-qt/qtquickcontrols:5 + dev-qt/qtquickcontrols2:5 +" +BDEPEND="dev-qt/linguist-tools:5" + +PATCHES=( "${FILESDIR}/${P}-exiv2-0.28.patch" ) # upstream git master, bug #906491 + +src_configure() { + local mycmakeargs=( + -DCHROMECAST=OFF # TODO needs python + -DDEVIL=$(usex devil) + -DEXIV2=$(usex exif) + -DEXIV2_ENABLE_BMFF=$(usex exif) + -DFREEIMAGE=$(usex freeimage) + -DGRAPHICSMAGICK=$(usex graphicsmagick $(usex imagemagick)) + -DIMAGEMAGICK=$(usex imagemagick $(usex !graphicsmagick)) + -DVIDEO_MPV=$(usex mpv) + -DPOPPLER=$(usex pdf) + -DRAW=$(usex raw) + ) + ecm_src_configure +} + +pkg_postinst() { + optfeature "additional image formats like AVIF, EPS, HEIF/HEIC, PSD, etc." kde-frameworks/kimageformats + ecm_pkg_postinst +}