diff options
Diffstat (limited to 'kde-misc/kdiff3')
-rw-r--r-- | kde-misc/kdiff3/Manifest | 3 | ||||
-rw-r--r-- | kde-misc/kdiff3/files/kdiff3-1.11.2-fix-fp-exception.patch | 55 | ||||
-rw-r--r-- | kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild (renamed from kde-misc/kdiff3/kdiff3-1.11.2.ebuild) | 2 |
3 files changed, 59 insertions, 1 deletions
diff --git a/kde-misc/kdiff3/Manifest b/kde-misc/kdiff3/Manifest index bb52147091d0..5cc1d815261e 100644 --- a/kde-misc/kdiff3/Manifest +++ b/kde-misc/kdiff3/Manifest @@ -1,5 +1,6 @@ +AUX kdiff3-1.11.2-fix-fp-exception.patch 2064 BLAKE2B 9525e31fd81697c8da767c494578294a38d5cf0926e6e3e0cfd391f18cb845d89840279270bb89d87e13a8f75ab36081f0480b49ede4043aa3be13a9391fd63d SHA512 b8d8f946879b461e4a7a40e49118a0499af9b494c9706d56dca8a1d471a2ba297c40fb20b4eeb03c1216c8470883677a66f3eabc1d234f961047174bc32b47ef DIST kdiff3-1.11.1.tar.xz 1140680 BLAKE2B 4a3e2f3300a4d8ebe390e3e7ad6392b26cdac919bfa80d2b24e145536a763cca924c8a811826972a92215da7c297662b805c60ce0ee5a57816a3549c059a8353 SHA512 5f481a3cd67e80db939eb795618a635bda2c08875eb826c3a1b6487b631374c48ab9b8a546d9b9504c1bcbc0ed9072f16452d6ef9fe181ce6850f741ced710ce DIST kdiff3-1.11.2.tar.xz 1141676 BLAKE2B 53ceb67ed232a2af81705d977ab691305a6a8a0fafce23d56601e7e24787a4cd81b044448251acefdb43a1ac142f53c1864fb64bd236d03a80105bbb8541805e SHA512 7318bbc867a369a656e78a9a5530a4329d176cdf170ff43278a8f9b9d821950c17f5a41266a0756bb84322ed78eb6d9d21f587968fedb7432656ec4f65c367cf EBUILD kdiff3-1.11.1.ebuild 1100 BLAKE2B f44c591b2a725f1ef0e8bd8d453e4dfa6972d82791176983675598ddf5e6aea99848891f988d083a9e8d332b5dbdbc8114eacfe19f8fff6c9be79e61dfcd89e7 SHA512 d36b2688a5cbfbedca20d95f65f88c7f5f5688de382f27bb5677568caa28f4c205d1d60ac92739346594df6f3f4c47062260bfd7e67ed8cbd0d7158e87d702d2 -EBUILD kdiff3-1.11.2.ebuild 1104 BLAKE2B 75018482108cc99cb5dea1c75b31e5a63d912a1db94b1297dfb13caefb4ddf7798c8e6883d7ba942f589624b69582ee7c2ee66ceef34247eba4dce14e0807856 SHA512 4a69c380cb7c4f97d855e1d9c9de76f3c1f08be0180bfb8b17bc68f42b3beced8ccb37d310bde5f77dffab062bacb11eff9bb12008d57d29724b95cfc724c9ab +EBUILD kdiff3-1.11.2-r1.ebuild 1176 BLAKE2B 2de1382b608f34302f4674bb20ee87733d780063ccb27e545ef61cb816cbe796698e801ef26b846e9161ef39ef316c65649c2a8e85413d1a2f3f7b9236254240 SHA512 0c56e83140d2d0e1e1e4a4c53aef10d9d1838b28f9fc54fc90304bdfdb4588ae3832d768f9a498d940e769597567cca636629e8ef5b38b31859b5fd53f3cba18 MISC metadata.xml 485 BLAKE2B fe3046c156af8000d379a96799587d89307e2664be0698ba9b847483f42031994707d16187740d9528a1d5ab26276802ae44218b820f949a35f3caef58223210 SHA512 f8c55957fdd76bf1019a3f543705bb4118deea1673d2fd1dab94528869f4ae65d34f81493f59bd4de40b02a64f9cacd054d7e576167fd8d18346b06e4bda5065 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 <reeves.87@gmail.com> +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.ebuild b/kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild index 070dd90af8ee..35a32af7049c 100644 --- a/kde-misc/kdiff3/kdiff3-1.11.2.ebuild +++ b/kde-misc/kdiff3/kdiff3-1.11.2-r1.ebuild @@ -38,6 +38,8 @@ RDEPEND="${COMMON_DEPEND} sys-apps/diffutils " +PATCHES=( "${FILESDIR}/${P}-fix-fp-exception.patch" ) # KDE-bug 487338 + src_configure() { local mycmakeargs=( -DBUILD_WITH_QT6=ON |