commit:     92fda0d8d649fb3fdd04d37f88be15b51b1b3955
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 10 20:56:17 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 10 20:58:56 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92fda0d8

app-text/diffpdf: Fix build w/ Qt-6.10.1

Thanks-to: Sam James <sam <AT> gentoo.org>
Closes: https://bugs.gentoo.org/966860
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-text/diffpdf/diffpdf-2.1.3-r4.ebuild          | 38 +++++++++++++++++++++++
 app-text/diffpdf/files/diffpdf-2.1.3-qt6.10.patch | 11 +++++++
 2 files changed, 49 insertions(+)

diff --git a/app-text/diffpdf/diffpdf-2.1.3-r4.ebuild 
b/app-text/diffpdf/diffpdf-2.1.3-r4.ebuild
new file mode 100644
index 000000000000..abbe9c339e59
--- /dev/null
+++ b/app-text/diffpdf/diffpdf-2.1.3-r4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake desktop
+
+DESCRIPTION="Program that textually or visually compares two PDF files"
+HOMEPAGE="https://web.archive.org/web/20250102202818/https://www.qtrac.eu/diffpdf-foss.html";
+SRC_URI="https://web.archive.org/web/20201229194512/http://www.qtrac.eu/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+       >=dev-build/cmake-3.16
+       >=dev-qt/qttools-6.4.2:6[linguist]
+"
+RDEPEND="
+       >=app-text/poppler-22.12[qt6]
+       >=dev-qt/qtbase-6.4.2:6[gui,widgets]
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-qt5.patch # bug #641850
+       "${FILESDIR}"/${P}-qt6.patch # bug #947239
+       "${FILESDIR}"/${P}-qt6.10.patch # bug #966860
+)
+
+src_install() {
+       cmake_src_install
+       einstalldocs
+       doman diffpdf.1
+       domenu "${FILESDIR}"/${PN}.desktop
+       newicon images/icon.png ${PN}.png
+}

diff --git a/app-text/diffpdf/files/diffpdf-2.1.3-qt6.10.patch 
b/app-text/diffpdf/files/diffpdf-2.1.3-qt6.10.patch
new file mode 100644
index 000000000000..5af2bb28d260
--- /dev/null
+++ b/app-text/diffpdf/files/diffpdf-2.1.3-qt6.10.patch
@@ -0,0 +1,11 @@
+--- a/textitem.cpp
++++ b/textitem.cpp
+@@ -161,7 +161,7 @@ void TextItems::debug(const int page, const int ToleranceY,
+         const QRect rect = item.toRect();
+         out << item.text;
+         if (!ComparingWords)
+-            out << QString(" %1").arg(item.text.at(0).unicode(), 4, 16,
++            out << QString(" 
%1").arg(static_cast<int>(item.text.at(0).unicode()), 4, 16,
+                                       QChar('0'));
+         if (Yx) {
+             const int y = normalizedY(static_cast<int>(item.rect.y()),
\ No newline at end of file

Reply via email to