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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BCFAA159C9B for ; Sat, 10 Aug 2024 07:57:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4E8222BC220; Sat, 10 Aug 2024 07:57:27 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30B792BC220 for ; Sat, 10 Aug 2024 07:57:27 +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 D961F343108 for ; Sat, 10 Aug 2024 07:57:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BDFF71EC9 for ; Sat, 10 Aug 2024 07:57:22 +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: <1723276604.5a59820eaa645944a7136c4d623da15364d6701f.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-misc/kdiff3/files/, kde-misc/kdiff3/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild X-VCS-Directories: kde-misc/kdiff3/files/ kde-misc/kdiff3/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 5a59820eaa645944a7136c4d623da15364d6701f X-VCS-Branch: master Date: Sat, 10 Aug 2024 07:57:22 +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: 38b7070b-1698-4af4-9012-f3b1358a2ca1 X-Archives-Hash: 13fe029c2d6ee0c1b29f042f0293f3d7 commit: 5a59820eaa645944a7136c4d623da15364d6701f Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Aug 9 21:12:58 2024 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Aug 10 07:56:44 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a59820e kde-misc/kdiff3: Handle 0 height QWidget in getNofVisibleLines Upstream commit 5965591080306c66a48e961d264f212989fdae94 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=487338 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/kdiff3-1.11.2-fix-fp-exception.patch | 55 ++++++++++++++++++++++ kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild | 49 +++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch b/kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch new file mode 100644 index 000000000000..b735d659f928 --- /dev/null +++ b/kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch @@ -0,0 +1,55 @@ +From 5965591080306c66a48e961d264f212989fdae94 Mon Sep 17 00:00:00 2001 +From: Michael Reeves +Date: Thu, 4 Jul 2024 07:50:21 -0400 +Subject: [PATCH] Handle 0 height QWidget in getNofVisibleLines + +BUG:487338 +FIXED-IN:1.11.3 +--- + src/difftextwindow.cpp | 8 +++++--- + src/mergeresultwindow.cpp | 3 ++- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/difftextwindow.cpp b/src/difftextwindow.cpp +index 783d13a66..85c0419fd 100644 +--- a/src/difftextwindow.cpp ++++ b/src/difftextwindow.cpp +@@ -574,7 +574,9 @@ LineRef DiffTextWindow::convertDiff3LineIdxToLine(const LineType d3lIdx) const + */ + LineRef getBestFirstLine(LineRef line, LineType nofLines, LineRef firstLine, LineType visibleLines) + { +- if(line < visibleLines) //well known result. ++ assert(visibleLines >= 0); // VisibleLines should not be < 0. ++ ++ if(line < visibleLines || visibleLines == 0) //well known result. + return 0; + + LineRef newFirstLine = firstLine; +@@ -1412,8 +1414,8 @@ void DiffTextWindow::resizeEvent(QResizeEvent* e) + LineType DiffTextWindow::getNofVisibleLines() const + { + QFontMetrics fm = fontMetrics(); +- +- return height() / fm.lineSpacing() - 1; ++ //QWidget::height() may return 0 with certian configurations with 0 length input files loaded. ++ return std::max((LineType)ceil(height() / fm.lineSpacing()) - 1, 0); + } + + qint32 DiffTextWindow::getVisibleTextAreaWidth() const +diff --git a/src/mergeresultwindow.cpp b/src/mergeresultwindow.cpp +index b1100569d..46e50c945 100644 +--- a/src/mergeresultwindow.cpp ++++ b/src/mergeresultwindow.cpp +@@ -471,7 +471,8 @@ qint32 MergeResultWindow::getVisibleTextAreaWidth() const + qint32 MergeResultWindow::getNofVisibleLines() const + { + QFontMetrics fm = fontMetrics(); +- return (height() - 3) / fm.lineSpacing() - 2; ++ //QWidget::height() may return 0 with certian configurations with 0 length input files loaded. ++ return std::max((qint32)ceil((height() - 3) / fm.lineSpacing()) - 2, 0); + } + + qint32 MergeResultWindow::getTextXOffset() const +-- +GitLab + diff --git a/kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild b/kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild new file mode 100644 index 000000000000..35a32af7049c --- /dev/null +++ b/kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_HANDBOOK="optional" +KFMIN=6.3.0 +QTMIN=6.6.2 +inherit ecm kde.org + +DESCRIPTION="Frontend to diff3 based on KDE Frameworks" +HOMEPAGE="https://apps.kde.org/kdiff3/ https://userbase.kde.org/KDiff3" +SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="" + +COMMON_DEPEND=" + >=dev-qt/qt5compat-${QTMIN}:6 + >=dev-qt/qtbase-${QTMIN}:6[gui,widgets] + >=kde-frameworks/kconfig-${KFMIN}:6 + >=kde-frameworks/kconfigwidgets-${KFMIN}:6 + >=kde-frameworks/kcoreaddons-${KFMIN}:6 + >=kde-frameworks/kcrash-${KFMIN}:6 + >=kde-frameworks/ki18n-${KFMIN}:6 + >=kde-frameworks/kio-${KFMIN}:6 + >=kde-frameworks/ktextwidgets-${KFMIN}:6 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:6 + >=kde-frameworks/kxmlgui-${KFMIN}:6 +" +DEPEND="${COMMON_DEPEND} + >=dev-libs/boost-1.82 +" +RDEPEND="${COMMON_DEPEND} + !${CATEGORY}/${PN}:5 + sys-apps/diffutils +" + +PATCHES=( "${FILESDIR}/${P}-fix-fp-exception.patch" ) # KDE-bug 487338 + +src_configure() { + local mycmakeargs=( + -DBUILD_WITH_QT6=ON + # TODO: -DENABLE_GDBINDEX? + ) + ecm_src_configure +}