public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2017-04-25 12:47 Michael Palimaka
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Palimaka @ 2017-04-25 12:47 UTC (permalink / raw
  To: gentoo-commits

commit:     253b68324cf4294d02524720a440f2cf14a085c5
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 25 12:47:06 2017 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Tue Apr 25 12:47:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=253b6832

kde-apps/konsole: backport patch from upstream solving --new-tab regression

Gentoo-bug: 615850
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 .../konsole/files/konsole-16.12.3-newtabs.patch    | 31 ++++++++++++
 kde-apps/konsole/konsole-16.12.3-r1.ebuild         | 59 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-16.12.3-newtabs.patch b/kde-apps/konsole/files/konsole-16.12.3-newtabs.patch
new file mode 100644
index 00000000000..45ee52bd260
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-16.12.3-newtabs.patch
@@ -0,0 +1,31 @@
+From e3de3ca72552c81bc8d7dbe5cf1568eedd33c31e Mon Sep 17 00:00:00 2001
+From: "Martin T. H. Sandsmark" <martin.sandsmark@kde.org>
+Date: Wed, 25 Jan 2017 22:25:48 +0100
+Subject: [PATCH] Fix opening of new tabs with multiple processes
+
+Make sure we re-use the process if the user wants a new tab.
+
+BUG: 373440
+REVIEW: 129886
+---
+ src/main.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index f4bb5af..33a2bdb 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -117,8 +117,8 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char* argv[])
+     parser->process(*app);
+     about.processCommandLine(parser.data());
+ 
+-    // Enable user to force multiple instances
+-    if (!Konsole::KonsoleSettings::useSingleInstance()) {
++    // Enable user to force multiple instances, unless a new tab is requested
++    if (!Konsole::KonsoleSettings::useSingleInstance() && !parser->isSet(QStringLiteral("new-tab"))) {
+         startupOption = KDBusService::Multiple;
+     }
+ 
+-- 
+2.10.2
+

diff --git a/kde-apps/konsole/konsole-16.12.3-r1.ebuild b/kde-apps/konsole/konsole-16.12.3-r1.ebuild
new file mode 100644
index 00000000000..551d2797b9f
--- /dev/null
+++ b/kde-apps/konsole/konsole-16.12.3-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="optional"
+KDE_TEST="true"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="KDE's terminal emulator"
+HOMEPAGE="https://www.kde.org/applications/system/konsole https://konsole.kde.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+DEPEND="
+	$(add_frameworks_dep kbookmarks)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep kdbusaddons)
+	$(add_frameworks_dep kguiaddons)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kinit)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep knotifyconfig)
+	$(add_frameworks_dep kparts)
+	$(add_frameworks_dep kpty)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtnetwork)
+	$(add_qt_dep qtprintsupport)
+	$(add_qt_dep qtscript)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+	X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-newtabs.patch" )
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package X X11)
+	)
+
+	kde5_src_configure
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2018-02-08  0:10 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2018-02-08  0:10 UTC (permalink / raw
  To: gentoo-commits

commit:     c93886a5ea884fffa1c01384e5e0873140a1b8e7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  7 16:02:45 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb  8 00:01:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c93886a5

kde-apps/konsole: Fix mouse wheel scrolling w/ libinput

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=386762
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../konsole-17.12.1-libinput-pixeldelta.patch      | 54 ++++++++++++++++++++
 kde-apps/konsole/konsole-17.12.1-r1.ebuild         | 58 ++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch b/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch
new file mode 100644
index 00000000000..37049b9b2f2
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-17.12.1-libinput-pixeldelta.patch
@@ -0,0 +1,54 @@
+From d25e5ac7089f2c81cc5ffe8e155ba8b3dfb11b97 Mon Sep 17 00:00:00 2001
+From: Kurt Hindenburg <kurt.hindenburg@gmail.com>
+Date: Wed, 7 Feb 2018 10:38:09 -0500
+Subject: Fix mouse wheel scrolling with libinput
+
+If the Libinput X server input driver is used we get a value for
+pixelDelta for a physical mouse wheel scroll, so we check that the
+source of the wheel event is actually a mouse, this was fixed in
+Qt 5.9.5*
+https://bugreports.qt.io/browse/QTBUG-59261
+
+Patch by ahmadsamir
+
+* fixed in Gentoo: Qt 5.9.4
+
+BUG: 386762
+Differential Revision: https://phabricator.kde.org/D9008
+---
+ src/ScrollState.cpp | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/ScrollState.cpp b/src/ScrollState.cpp
+index e5b486d..f71b142 100644
+--- a/src/ScrollState.cpp
++++ b/src/ScrollState.cpp
+@@ -25,10 +25,21 @@ using namespace Konsole;
+ 
+ void ScrollState::addWheelEvent(const QWheelEvent *wheel)
+ {
+-    if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
+-        _remainingScrollPixel = 0;
+-    } else {
+-        _remainingScrollPixel += wheel->pixelDelta().y();
++    // If the Libinput X server input driver is used we get a value for
++    // pixelDelta for a physical mouse wheel scroll, so we check that
++    // the source of the wheel event is actually a mouse, this has been
++    // fixed upstream in Qt 5.9.5: https://bugreports.qt.io/browse/QTBUG-59261
++    // Fixes Konsole BUG: https://bugs.kde.org/show_bug.cgi?id=386762
++#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 4))
++    if (wheel->source() != Qt::MouseEventNotSynthesized) {
++#else
++    if (true) {
++#endif
++        if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) {
++            _remainingScrollPixel = 0;
++        } else {
++            _remainingScrollPixel += wheel->pixelDelta().y();
++        }
+     }
+     _remainingScrollAngle += wheel->angleDelta().y();
+ }
+-- 
+cgit v0.11.2
+

diff --git a/kde-apps/konsole/konsole-17.12.1-r1.ebuild b/kde-apps/konsole/konsole-17.12.1-r1.ebuild
new file mode 100644
index 00000000000..8e2357bbc0a
--- /dev/null
+++ b/kde-apps/konsole/konsole-17.12.1-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="optional"
+KDE_TEST="true"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="KDE's terminal emulator"
+HOMEPAGE="https://www.kde.org/applications/system/konsole https://konsole.kde.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+DEPEND="
+	$(add_frameworks_dep kbookmarks)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep kdbusaddons)
+	$(add_frameworks_dep kguiaddons)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kinit)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep knotifyconfig)
+	$(add_frameworks_dep kparts)
+	$(add_frameworks_dep kpty)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtnetwork)
+	$(add_qt_dep qtprintsupport)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+	X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-libinput-pixeldelta.patch" )
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package X X11)
+	)
+
+	kde5_src_configure
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2018-12-23  1:25 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2018-12-23  1:25 UTC (permalink / raw
  To: gentoo-commits

commit:     6984d3c3f7cfb5f0dfbc1d166d7bf2be409280be
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 22 20:41:53 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 23 01:25:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6984d3c3

kde-apps/konsole: Fix drawing box chars

Fixed in 18.12.1.

Thanks-to: Lars Wendler <polynomial-c <AT> gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../konsole-18.12.0-fix-drawing-box-chars.patch    | 188 +++++++++++++++++++++
 kde-apps/konsole/konsole-18.12.0-r1.ebuild         |  59 +++++++
 2 files changed, 247 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-18.12.0-fix-drawing-box-chars.patch b/kde-apps/konsole/files/konsole-18.12.0-fix-drawing-box-chars.patch
new file mode 100644
index 00000000000..1847543737a
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-18.12.0-fix-drawing-box-chars.patch
@@ -0,0 +1,188 @@
+From 807ac77061604c2ac7cf84b0a0b29dd949a6c634 Mon Sep 17 00:00:00 2001
+From: "Martin T. H. Sandsmark" <martin.sandsmark@kde.org>
+Date: Thu, 6 Dec 2018 10:02:41 -0500
+Subject: fix drawing box chars, avoid storing and saving state all the time
+
+Summary:
+to get the box chars to be drawn correctly we need to turn on high
+quality antialiasing in qpainter. in addition only turn it on if
+antialiasing is enabled.
+
+lastly qpainter.save()/restore() is called very often, so try to avoid
+that if it isn't necessary.
+
+BUG: 401463
+
+Test Plan:
+`cat tests/boxes.txt`
+
+old:
+
+{F6428268}
+
+new:
+
+{F6450304}
+
+Reviewers: #konsole, hindenburg
+
+Reviewed By: #konsole, hindenburg
+
+Subscribers: wbauer, konsole-devel, #konsole
+
+Tags: #konsole
+
+Differential Revision: https://phabricator.kde.org/D16947
+
+(cherry picked from commit 14b3c8be2c15ed9711b1308b4a991de4aad5802d)
+---
+ src/TerminalDisplay.cpp | 45 ++++++++++++++++++++-------------------------
+ 1 file changed, 20 insertions(+), 25 deletions(-)
+
+diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
+index 722e200..2b14556 100644
+--- a/src/TerminalDisplay.cpp
++++ b/src/TerminalDisplay.cpp
+@@ -619,7 +619,7 @@ static void drawLineChar(QPainter& paint, int x, int y, int w, int h, uchar code
+ {
+     //Calculate cell midpoints, end points.
+     const int cx = x + w / 2;
+-    const int cy = y + h / 2;
++    const int cy = y + h / 2. - 0.5;
+     const int ex = x + w - 1;
+     const int ey = y + h - 1;
+ 
+@@ -671,33 +671,33 @@ static void drawLineChar(QPainter& paint, int x, int y, int w, int h, uchar code
+ 
+     //Intersection points.
+     if ((toDraw & Int11) != 0u) {
+-        paint.drawPoint(cx - 1, cy - 1);
++        paint.drawPoint(cx - 2, cy - 2);
+     }
+     if ((toDraw & Int12) != 0u) {
+-        paint.drawPoint(cx, cy - 1);
++        paint.drawPoint(cx - 1, cy - 2);
+     }
+     if ((toDraw & Int13) != 0u) {
+-        paint.drawPoint(cx + 1, cy - 1);
++        paint.drawPoint(cx - 0, cy - 2);
+     }
+ 
+     if ((toDraw & Int21) != 0u) {
+-        paint.drawPoint(cx - 1, cy);
++        paint.drawPoint(cx - 2, cy - 1);
+     }
+     if ((toDraw & Int22) != 0u) {
+-        paint.drawPoint(cx, cy);
++        paint.drawPoint(cx - 1, cy - 1);
+     }
+     if ((toDraw & Int23) != 0u) {
+-        paint.drawPoint(cx + 1, cy);
++        paint.drawPoint(cx - 0, cy - 1);
+     }
+ 
+     if ((toDraw & Int31) != 0u) {
+-        paint.drawPoint(cx - 1, cy + 1);
++        paint.drawPoint(cx - 2, cy);
+     }
+     if ((toDraw & Int32) != 0u) {
+-        paint.drawPoint(cx, cy + 1);
++        paint.drawPoint(cx - 1, cy);
+     }
+     if ((toDraw & Int33) != 0u) {
+-        paint.drawPoint(cx + 1, cy + 1);
++        paint.drawPoint(cx - 0, cy);
+     }
+ }
+ 
+@@ -705,7 +705,7 @@ static void drawOtherChar(QPainter& paint, int x, int y, int w, int h, uchar cod
+ {
+     //Calculate cell midpoints, end points.
+     const int cx = x + w / 2;
+-    const int cy = y + h / 2;
++    const int cy = y + h / 2. - 0.5; // Compensate for the translation, to match fonts
+     const int ex = x + w - 1;
+     const int ey = y + h - 1;
+ 
+@@ -792,16 +792,17 @@ void TerminalDisplay::drawLineCharString(QPainter& painter, int x, int y, const
+         const Character* attributes)
+ {
+     painter.save();
+-    painter.setRenderHint(QPainter::Antialiasing);
+ 
+-    const QPen& originalPen = painter.pen();
++    // For antialiasing, we need to shift it so the single pixel width is in the middle
++    painter.translate(0.5, 0.5);
+ 
+     if (((attributes->rendition & RE_BOLD) != 0) && _boldIntense) {
+-        QPen boldPen(originalPen);
+-        boldPen.setWidth(3);
++        QPen boldPen(painter.pen());
++        boldPen.setWidth(4);
+         painter.setPen(boldPen);
+     }
+ 
++
+     for (int i = 0 ; i < str.length(); i++) {
+         const uchar code = str[i].cell();
+         if (LineChars[code] != 0u) {
+@@ -909,10 +910,10 @@ void TerminalDisplay::drawBackground(QPainter& painter, const QRect& rect, const
+         QColor color(backgroundColor);
+         color.setAlpha(qAlpha(_blendColor));
+ 
+-        painter.save();
++        const QPainter::CompositionMode originalMode = painter.compositionMode();
+         painter.setCompositionMode(QPainter::CompositionMode_Source);
+         painter.fillRect(rect, color);
+-        painter.restore();
++        painter.setCompositionMode(originalMode);
+ #endif
+     } else {
+         painter.fillRect(rect, backgroundColor);
+@@ -1041,8 +1042,6 @@ void TerminalDisplay::drawTextFragment(QPainter& painter ,
+                                        const QString& text,
+                                        const Character* style)
+ {
+-    painter.save();
+-
+     // setup painter
+     const QColor foregroundColor = style->foregroundColor.color(_colorTable);
+     const QColor backgroundColor = style->backgroundColor.color(_colorTable);
+@@ -1062,8 +1061,6 @@ void TerminalDisplay::drawTextFragment(QPainter& painter ,
+ 
+     // draw text
+     drawCharacters(painter, rect, text, style, invertCharacterColor);
+-
+-    painter.restore();
+ }
+ 
+ void TerminalDisplay::drawPrinterFriendlyTextFragment(QPainter& painter,
+@@ -1071,8 +1068,6 @@ void TerminalDisplay::drawPrinterFriendlyTextFragment(QPainter& painter,
+         const QString& text,
+         const Character* style)
+ {
+-    painter.save();
+-
+     // Set the colors used to draw to black foreground and white
+     // background for printer friendly output when printing
+     Character print_style = *style;
+@@ -1081,8 +1076,6 @@ void TerminalDisplay::drawPrinterFriendlyTextFragment(QPainter& painter,
+ 
+     // draw text
+     drawCharacters(painter, rect, text, &print_style, false);
+-
+-    painter.restore();
+ }
+ 
+ void TerminalDisplay::setRandomSeed(uint randomSeed)
+@@ -1499,6 +1492,8 @@ void TerminalDisplay::paintEvent(QPaintEvent* pe)
+         drawBackground(paint, rect, getBackgroundColor(), true /* use opacity setting */);
+     }
+ 
++    paint.setRenderHint(QPainter::Antialiasing, _antialiasText);
++
+     foreach(const QRect & rect, dirtyImageRegion.rects()) {
+         drawContents(paint, rect);
+     }
+-- 
+cgit v1.1

diff --git a/kde-apps/konsole/konsole-18.12.0-r1.ebuild b/kde-apps/konsole/konsole-18.12.0-r1.ebuild
new file mode 100644
index 00000000000..63fec0b9fa7
--- /dev/null
+++ b/kde-apps/konsole/konsole-18.12.0-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="optional"
+KDE_TEST="true"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="KDE's terminal emulator"
+HOMEPAGE="https://www.kde.org/applications/system/konsole https://konsole.kde.org"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+DEPEND="
+	$(add_frameworks_dep kbookmarks)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep kdbusaddons)
+	$(add_frameworks_dep kguiaddons)
+	$(add_frameworks_dep kjobwidgets)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kinit)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knewstuff)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep knotifyconfig)
+	$(add_frameworks_dep kparts)
+	$(add_frameworks_dep kpty)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtgui)
+	$(add_qt_dep qtnetwork)
+	$(add_qt_dep qtprintsupport)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtxml)
+	X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-fix-drawing-box-chars.patch" ) # fixed in 18.12.1
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package X X11)
+	)
+
+	kde5_src_configure
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2020-03-23 23:57 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2020-03-23 23:57 UTC (permalink / raw
  To: gentoo-commits

commit:     6d0bc899f71f6c139a9020dd3ab75a0b41e54621
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 23 23:56:09 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 23 23:56:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d0bc899

kde-apps/konsole: Revert upstream ccache auto-detection

Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../konsole/files/konsole-19.12.3-no-ccache.patch  | 45 ++++++++++++++++++++++
 kde-apps/konsole/konsole-19.12.3.ebuild            |  5 ++-
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/kde-apps/konsole/files/konsole-19.12.3-no-ccache.patch b/kde-apps/konsole/files/konsole-19.12.3-no-ccache.patch
new file mode 100644
index 00000000000..9419ea5c612
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-19.12.3-no-ccache.patch
@@ -0,0 +1,45 @@
+From 3529286a0a4885ad3626a4081407fb56a8a568f9 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 24 Mar 2020 00:24:05 +0100
+Subject: [PATCH] Revert "CMakeLists.txt: use ccache if present"
+
+This was added for feature-parity with Meson-based projects; but an individual
+package is the wrong place for that. To avoid the proliferation of auto-
+detected ccache support in kde.org packages please submit such a proposal to
+kde-frameworks-devel instead, where it could be added for the benefit of all
+the projects using ECM. And more importantly, with a standard switch to disable
+it for packaging environments.
+
+This reverts commit 007c2a08523887cf9c0445a288ad82994bd02a57.
+
+Differential Revision: https://phabricator.kde.org/D24805
+---
+ CMakeLists.txt | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 17c82b0d..45ab9f62 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,18 +17,6 @@ set (KF5_MIN_VERSION "5.6.0")
+ # Release script will create bugzilla versions
+ project(konsole VERSION ${RELEASE_SERVICE_VERSION})
+ 
+-find_program(CCACHE_FOUND "ccache")
+-set(CCACHE_SUPPORT ON CACHE BOOL "Enable ccache support")
+-if (CCACHE_FOUND AND CCACHE_SUPPORT)
+-  if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" # GNU is GNU GCC
+-      OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+-    # without this compiler messages in `make` backend would be uncolored
+-    set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fdiagnostics-color=auto")
+-  endif()
+-  set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache")
+-  set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "ccache")
+-endif()
+-
+ find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+ 
+-- 
+2.25.1
+

diff --git a/kde-apps/konsole/konsole-19.12.3.ebuild b/kde-apps/konsole/konsole-19.12.3.ebuild
index 5b2e6ae45ff..a0cd125f570 100644
--- a/kde-apps/konsole/konsole-19.12.3.ebuild
+++ b/kde-apps/konsole/konsole-19.12.3.ebuild
@@ -53,7 +53,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}/${PN}-19.12.2-darkbackground-detect.patch" )
+PATCHES=(
+	"${FILESDIR}/${PN}-19.12.2-darkbackground-detect.patch"
+	"${FILESDIR}/${P}-no-ccache.patch"
+)
 
 src_configure() {
 	local mycmakeargs=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2020-05-28 20:20 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2020-05-28 20:20 UTC (permalink / raw
  To: gentoo-commits

commit:     ce8934eff28bbe9ccbfd987735944c8f18f893ce
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu May 28 20:19:01 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu May 28 20:20:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce8934ef

kde-apps/konsole: Fix crash on 'Set Encoding' context menu w/ Qt 5.15

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=419526
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...e-20.04.1-qt-5.15-set-text-encoding-crash.patch | 109 +++++++++++++++++++++
 kde-apps/konsole/konsole-20.04.1-r1.ebuild         |   5 +-
 2 files changed, 113 insertions(+), 1 deletion(-)

diff --git a/kde-apps/konsole/files/konsole-20.04.1-qt-5.15-set-text-encoding-crash.patch b/kde-apps/konsole/files/konsole-20.04.1-qt-5.15-set-text-encoding-crash.patch
new file mode 100644
index 00000000000..78e5559d047
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-20.04.1-qt-5.15-set-text-encoding-crash.patch
@@ -0,0 +1,109 @@
+From 72e76de072aa4c7960396856e72681a00c4f67d9 Mon Sep 17 00:00:00 2001
+From: Ahmad Samir <a.samirh78@gmail.com>
+Date: Thu, 28 May 2020 21:40:29 +0200
+Subject: [PATCH] [SessionController] Fix crash caused by text encoding menu
+
+QMenu since 5.15 is hidden when an action is triggered, this caused a
+crash in Konsole when trying to access the text encoding menu.
+
+Now Session emits a signal when the text encoding is changed, the
+SessionController can connect to that singal to set the current codec in
+the KCodecAction object.
+
+Also fix the EditProfileDialog so that when the KCodecAction menu is
+shown the currently set codec is selected.
+
+BUG: 419526
+
+FIXED-IN: 20.08
+---
+ src/EditProfileDialog.cpp | 1 +
+ src/Session.cpp           | 2 ++
+ src/Session.h             | 5 +++++
+ src/SessionController.cpp | 7 ++++---
+ src/SessionController.h   | 2 +-
+ 5 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp
+index a64136934..f93e9e166 100644
+--- a/src/EditProfileDialog.cpp
++++ b/src/EditProfileDialog.cpp
+@@ -1725,6 +1725,7 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr &profile)
+ 
+     // encoding options
+     auto codecAction = new KCodecAction(this);
++    codecAction->setCurrentCodec(profile->defaultEncoding());
+     _advancedUi->selectEncodingButton->setMenu(codecAction->menu());
+     connect(codecAction,
+             QOverload<QTextCodec *>::of(&KCodecAction::triggered), this,
+diff --git a/src/Session.cpp b/src/Session.cpp
+index 1103f6e1b..483d8fd6a 100644
+--- a/src/Session.cpp
++++ b/src/Session.cpp
+@@ -252,6 +252,8 @@ void Session::setCodec(QTextCodec* codec)
+     }
+ 
+     emulation()->setCodec(codec);
++
++    emit sessionCodecChanged(codec);
+ }
+ 
+ bool Session::setCodec(const QByteArray& name)
+diff --git a/src/Session.h b/src/Session.h
+index 1b7da1b3b..c1af3c05d 100644
+--- a/src/Session.h
++++ b/src/Session.h
+@@ -661,6 +661,11 @@ Q_SIGNALS:
+      */
+     void currentDirectoryChanged(const QString &dir);
+ 
++    /**
++     * Emitted when the session text encoding changes.
++     */
++    void sessionCodecChanged(QTextCodec *codec);
++
+     /** Emitted when a bell event occurs in the session. */
+     void bellRequest(const QString &message);
+ 
+diff --git a/src/SessionController.cpp b/src/SessionController.cpp
+index e72f342c4..f74969f85 100644
+--- a/src/SessionController.cpp
++++ b/src/SessionController.cpp
+@@ -691,7 +691,8 @@ void SessionController::setupCommonActions()
+     _codecAction = new KCodecAction(i18n("Set &Encoding"), this);
+     _codecAction->setIcon(QIcon::fromTheme(QStringLiteral("character-set")));
+     collection->addAction(QStringLiteral("set-encoding"), _codecAction);
+-    connect(_codecAction->menu(), &QMenu::aboutToShow, this, &Konsole::SessionController::updateCodecAction);
++    _codecAction->setCurrentCodec(QString::fromUtf8(_session->codec()));
++    connect(_session.data(), &Konsole::Session::sessionCodecChanged, this, &Konsole::SessionController::updateCodecAction);
+     connect(_codecAction,
+             QOverload<QTextCodec*>::of(&KCodecAction::triggered), this,
+             &Konsole::SessionController::changeCodec);
+@@ -846,9 +847,9 @@ void SessionController::prepareSwitchProfileMenu()
+     _switchProfileMenu->menu()->clear();
+     _switchProfileMenu->menu()->addActions(_profileList->actions());
+ }
+-void SessionController::updateCodecAction()
++void SessionController::updateCodecAction(QTextCodec *codec)
+ {
+-    _codecAction->setCurrentCodec(QString::fromUtf8(_session->codec()));
++    _codecAction->setCurrentCodec(codec);
+ }
+ 
+ void SessionController::changeCodec(QTextCodec* codec)
+diff --git a/src/SessionController.h b/src/SessionController.h
+index 057a31446..5062833b7 100644
+--- a/src/SessionController.h
++++ b/src/SessionController.h
+@@ -260,7 +260,7 @@ private Q_SLOTS:
+     // other
+     void setupSearchBar();
+     void prepareSwitchProfileMenu();
+-    void updateCodecAction();
++    void updateCodecAction(QTextCodec *codec);
+     void showDisplayContextMenu(const QPoint &position);
+     void movementKeyFromSearchBarReceived(QKeyEvent *event);
+     void sessionNotificationsChanged(Session::Notification notification, bool enabled);
+-- 
+2.26.2
+

diff --git a/kde-apps/konsole/konsole-20.04.1-r1.ebuild b/kde-apps/konsole/konsole-20.04.1-r1.ebuild
index f6870330550..a60f18304f2 100644
--- a/kde-apps/konsole/konsole-20.04.1-r1.ebuild
+++ b/kde-apps/konsole/konsole-20.04.1-r1.ebuild
@@ -53,7 +53,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}/${P}-crash-on-close.patch" ) # bug 723214
+PATCHES=(
+	"${FILESDIR}/${P}-crash-on-close.patch" # bug 723214, in 20.04.2
+	"${FILESDIR}/${P}-qt-5.15-set-text-encoding-crash.patch" # KDE-Bug 419526; pending
+)
 
 src_configure() {
 	local mycmakeargs=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2021-05-01 21:24 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2021-05-01 21:24 UTC (permalink / raw
  To: gentoo-commits

commit:     2fdb5052e0cf4726eb141fd92a0ca83c2785ca35
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May  1 18:39:38 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May  1 21:21:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fdb5052

kde-apps/konsole: Fix build with GCC-11

Closes: https://bugs.gentoo.org/787179
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/konsole/files/konsole-21.04.0-gcc11.patch | 25 ++++++++++++++++++++++
 kde-apps/konsole/konsole-21.04.0.ebuild            |  2 ++
 2 files changed, 27 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-21.04.0-gcc11.patch b/kde-apps/konsole/files/konsole-21.04.0-gcc11.patch
new file mode 100644
index 00000000000..0a9e2a4cbc2
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-21.04.0-gcc11.patch
@@ -0,0 +1,25 @@
+From 242213afd9eb9886e04eb9e6e69a4caa9c606363 Mon Sep 17 00:00:00 2001
+From: Kurt Hindenburg <kurt.hindenburg@gmail.com>
+Date: Fri, 30 Apr 2021 17:07:13 -0400
+Subject: [PATCH] Add missing include to fix build on gcc-11
+
+---
+ src/terminalDisplay/TerminalPainter.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/terminalDisplay/TerminalPainter.cpp b/src/terminalDisplay/TerminalPainter.cpp
+index fce10d09..7623602e 100644
+--- a/src/terminalDisplay/TerminalPainter.cpp
++++ b/src/terminalDisplay/TerminalPainter.cpp
+@@ -30,6 +30,8 @@
+ #include <QDebug>
+ #include <QtMath>
+ 
++#include <optional>
++
+ // we use this to force QPainter to display text in LTR mode
+ // more information can be found in: https://unicode.org/reports/tr9/
+ const QChar LTR_OVERRIDE_CHAR(0x202D);
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-21.04.0.ebuild b/kde-apps/konsole/konsole-21.04.0.ebuild
index 701329615e7..387e191ea7f 100644
--- a/kde-apps/konsole/konsole-21.04.0.ebuild
+++ b/kde-apps/konsole/konsole-21.04.0.ebuild
@@ -51,6 +51,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}"/${P}-gcc11.patch ) # bug 787179
+
 src_prepare() {
 	ecm_src_prepare
 	ecm_punt_bogus_dep KF5 Completion


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2021-08-13 20:14 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2021-08-13 20:14 UTC (permalink / raw
  To: gentoo-commits

commit:     c0e6cbb16cc7682173870439709ba880e1460b46
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 13 20:06:18 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Aug 13 20:13:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0e6cbb1

kde-apps/konsole: Prevent window "flashing" when closing last session

Upstream commit 302c16791935cc3cf262aee355afce13d694b00f

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=432077
Bug: https://bugs.gentoo.org/807933
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...konsole-21.04.3-no-flash-on-session-close.patch | 81 ++++++++++++++++++++++
 kde-apps/konsole/konsole-21.04.3-r1.ebuild         | 76 ++++++++++++++++++++
 kde-apps/konsole/konsole-21.08.0-r1.ebuild         | 72 +++++++++++++++++++
 3 files changed, 229 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-21.04.3-no-flash-on-session-close.patch b/kde-apps/konsole/files/konsole-21.04.3-no-flash-on-session-close.patch
new file mode 100644
index 00000000000..d8b14f2f166
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-21.04.3-no-flash-on-session-close.patch
@@ -0,0 +1,81 @@
+From 302c16791935cc3cf262aee355afce13d694b00f Mon Sep 17 00:00:00 2001
+From: Ahmad Samir <a.samirh78@gmail.com>
+Date: Thu, 12 Aug 2021 13:58:20 +0200
+Subject: [PATCH] Prevent window "flashing" when closing the last session
+
+There are two scenarios when closing a window:
+A) clicking the close button on the title bar (or Ctrl+Shift+Q):
+~MainWindow()
+~ViewManager()
+~TabbedViewContainer()
+~TerminalDisplay()
+~Session()
+
+B) closing the last session/tab in a window:
+SessionController::sessionFinished()
+~Session()
+~TerminalDisplay()
+~TabbedViewContainer()
+~MainWindow()
+~ViewManager()
+
+the issue with the second case is that the TerminalDisplay is torn down
+first, which exposes the TabbedViewContainer widget, the latter has the same
+Qt::Window colour as the system colour scheme window background colour, if
+you're using a dark terminal colour scheme and a light-coloured system colour
+scheme, you could see some "flashing" when you close the last session with
+e.g. Ctrl+D.
+
+To fix this, in sessionFinished() check if TabbedViewContainer::count() is
+1 (i.e. closing last tab/session), and emit the empty() signal in that case,
+which is connected to MainwWindow::close(), then the order of tear down
+becomes:
+SessionController::sessionFinished()
+~Session()
+~MainWindow()
+~ViewManager()
+~TabbedViewContainer()
+~TerminalDisplay()
+
+BUG: 432077
+FIXED-IN: 21.12
+(cherry picked from commit bbec72250d080ce286a6762fb9beee4b6e7981c9)
+---
+ src/MainWindow.cpp  | 2 +-
+ src/ViewManager.cpp | 7 +++++++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
+index cc38b3990..0fae334de 100644
+--- a/src/MainWindow.cpp
++++ b/src/MainWindow.cpp
+@@ -102,7 +102,7 @@ MainWindow::MainWindow() :
+ 
+     // create view manager
+     _viewManager = new ViewManager(this, actionCollection());
+-    connect(_viewManager, &Konsole::ViewManager::empty, this, &Konsole::MainWindow::close);
++    connect(_viewManager, &Konsole::ViewManager::empty, this, &QWidget::close);
+     connect(_viewManager, &Konsole::ViewManager::activeViewChanged, this,
+             &Konsole::MainWindow::activeViewChanged);
+     connect(_viewManager, &Konsole::ViewManager::unplugController, this,
+diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
+index 751684dc8..4d33a4cf8 100644
+--- a/src/ViewManager.cpp
++++ b/src/ViewManager.cpp
+@@ -461,6 +461,13 @@ void ViewManager::sessionFinished()
+         return;
+     }
+ 
++    // The last session/tab? emit empty() so that close() is called in
++    // MainWindow, fixes #432077
++    if (_viewContainer->count() == 1) {
++        Q_EMIT empty();
++        return;
++    }
++
+     auto *session = qobject_cast<Session *>(sender());
+     Q_ASSERT(session);
+ 
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-21.04.3-r1.ebuild b/kde-apps/konsole/konsole-21.04.3-r1.ebuild
new file mode 100644
index 00000000000..eb5601c28fc
--- /dev/null
+++ b/kde-apps/konsole/konsole-21.04.3-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+KFMIN=5.80.0
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="KDE's terminal emulator"
+HOMEPAGE="https://apps.kde.org/konsole/ https://konsole.kde.org"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="X"
+
+DEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtnetwork-${QTMIN}:5
+	>=dev-qt/qtprintsupport-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtxml-${QTMIN}:5
+	>=kde-frameworks/kbookmarks-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kcrash-${KFMIN}:5
+	>=kde-frameworks/kdbusaddons-${KFMIN}:5
+	>=kde-frameworks/kguiaddons-${KFMIN}:5
+	>=kde-frameworks/kjobwidgets-${KFMIN}:5
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kinit-${KFMIN}:5
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kio-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/knotifyconfig-${KFMIN}:5
+	>=kde-frameworks/kparts-${KFMIN}:5
+	>=kde-frameworks/kpty-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-no-flash-on-session-close.patch" ) # bug 807933
+
+src_prepare() {
+	ecm_src_prepare
+	ecm_punt_bogus_dep KF5 Completion
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package X X11)
+	)
+
+	ecm_src_configure
+}
+
+src_test() {
+	# drkonqi process interferes. bug 702690
+	local myctestargs=(
+		-E "(DBusTest)"
+	)
+
+	ecm_src_test
+}

diff --git a/kde-apps/konsole/konsole-21.08.0-r1.ebuild b/kde-apps/konsole/konsole-21.08.0-r1.ebuild
new file mode 100644
index 00000000000..a9745100e0f
--- /dev/null
+++ b/kde-apps/konsole/konsole-21.08.0-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+KFMIN=5.84.0
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="KDE's terminal emulator"
+HOMEPAGE="https://apps.kde.org/konsole/ https://konsole.kde.org"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="X"
+
+DEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtnetwork-${QTMIN}:5
+	>=dev-qt/qtprintsupport-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtxml-${QTMIN}:5
+	>=kde-frameworks/kbookmarks-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kcrash-${KFMIN}:5
+	>=kde-frameworks/kdbusaddons-${KFMIN}:5
+	>=kde-frameworks/kguiaddons-${KFMIN}:5
+	>=kde-frameworks/kjobwidgets-${KFMIN}:5
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kio-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/knotifyconfig-${KFMIN}:5
+	>=kde-frameworks/kparts-${KFMIN}:5
+	>=kde-frameworks/kpty-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-21.04.3-no-flash-on-session-close.patch" # bug 807933
+)
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package X X11)
+	)
+
+	ecm_src_configure
+}
+
+src_test() {
+	# drkonqi process interferes. bug 702690
+	local myctestargs=(
+		-E "(DBusTest)"
+	)
+
+	ecm_src_test
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2021-08-15 19:11 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2021-08-15 19:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a69ea70b1f7c6b56cde64cc2dc2604ecc19c4355
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 15 19:10:27 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 15 19:11:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a69ea70b

kde-apps/konsole: Fix KXmlGUI toolbars and MainWindow size

Upstream commit fb7f838fd3138a39aea3bcb2e91f923741587137

See also:
https://invent.kde.org/utilities/konsole/-/merge_requests/457

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=430036
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=436471
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=439339
Reported-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Tested-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-fix-KXmlGUI-toolbars-and-MainWindow-size.patch | 73 ++++++++++++++++++++++
 ...21.08.0-r1.ebuild => konsole-21.08.0-r2.ebuild} |  2 +
 2 files changed, 75 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-21.08.0-fix-KXmlGUI-toolbars-and-MainWindow-size.patch b/kde-apps/konsole/files/konsole-21.08.0-fix-KXmlGUI-toolbars-and-MainWindow-size.patch
new file mode 100644
index 00000000000..fc62466ea62
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-21.08.0-fix-KXmlGUI-toolbars-and-MainWindow-size.patch
@@ -0,0 +1,73 @@
+From fb7f838fd3138a39aea3bcb2e91f923741587137 Mon Sep 17 00:00:00 2001
+From: Ahmad Samir <a.samirh78@gmail.com>
+Date: Thu, 29 Jul 2021 18:44:07 +0200
+Subject: [PATCH] Fix KXmlGUI toolbars; and Konsole MainWindow size
+
+Call setupGUI(), which will call createGUI (since we set the
+KXmlGuiWindow::Create flag), omit the StatusBar flag since we don't have a
+statusbar and don't want the "Show StatusBar" menu action.
+
+TabbedViewContainer::sizeHint() calculates an optimum size for itself,
+including the sizes of its child widgets; added in efb621d091c05f11 by
+Mariusz Glebocki; following the code:
+MainWindow creates a ViewManager
+ViewManager creates a TabbedViewContainer and then a TerminalDisplay
+
+which means that the first time TabbedViewContainer::sizeHint() is called
+the TerminalDisplay widget size is 0, then TabbedViewContainer::sizeHint()
+would return 0.
+
+Which is why calling resize() in MainWindow was delayed to the showEvent(),
+(and even delayed more by a QTimer::singleShot() call in Application),
+at which point all the child widgets have been created and
+MainWindow::sizeHint() (which logically takes into account the sizeHint()
+of its child widgets) would return a sensible size.
+
+CCBUG: 430036
+CCBUG: 439339
+BUG: 436471
+
+
+(cherry picked from commit 090356661c92bfedeeeaf6f4f77d294facb3d8c6)
+---
+ src/MainWindow.cpp | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
+index c67acf8b9..a4b36b61d 100644
+--- a/src/MainWindow.cpp
++++ b/src/MainWindow.cpp
+@@ -131,8 +131,10 @@ MainWindow::MainWindow() :
+     // in terminal applications
+     KAcceleratorManager::setNoAccel(menuBar());
+ 
+-    // create menus
+-    createGUI();
++    constexpr KXmlGuiWindow::StandardWindowOptions guiOpts = ToolBar | Keys | Save | Create;
++    const QString xmlFile = componentName() + QLatin1String("ui.rc"); // Typically "konsoleui.rc"
++    // The "Create" flag will make it call createGUI()
++    setupGUI(guiOpts, xmlFile);
+ 
+     // remember the original menu accelerators for later use
+     rememberMenuAccelerators();
+@@ -945,9 +947,14 @@ void MainWindow::showEvent(QShowEvent *event)
+         menuBar()->setVisible(_menuBarInitialVisibility);
+         _toggleMenuBarAction->setChecked(_menuBarInitialVisibility);
+         _menuBarInitialVisibilityApplied = true;
+-        if (!KonsoleSettings::saveGeometryOnExit()) {
+-            resize(sizeHint());
+-        }
++    }
++
++    if (!KonsoleSettings::saveGeometryOnExit()) {
++        // Delay resizing to here, so that the other parts of the UI
++        // (ViewManager, TabbedViewContainer, TerminalDisplay ... etc)
++        // have been created and TabbedViewContainer::sizeHint() returns
++        // a usuable size.
++        resize(sizeHint());
+     }
+ 
+     // Call parent method
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-21.08.0-r1.ebuild b/kde-apps/konsole/konsole-21.08.0-r2.ebuild
similarity index 93%
rename from kde-apps/konsole/konsole-21.08.0-r1.ebuild
rename to kde-apps/konsole/konsole-21.08.0-r2.ebuild
index 4095d9ac5f9..00032973af8 100644
--- a/kde-apps/konsole/konsole-21.08.0-r1.ebuild
+++ b/kde-apps/konsole/konsole-21.08.0-r2.ebuild
@@ -53,6 +53,8 @@ RDEPEND="${DEPEND}"
 PATCHES=(
 	"${FILESDIR}/${PN}-21.04.3-no-flash-on-session-close.patch" # bug 807933
 	"${FILESDIR}/${P}-fix-crash-w-blur.patch" # bug 807905, fixed in 21.08.1
+	# KDE-bugs 430036, 439339; backport pending for 21.08 branch
+	"${FILESDIR}/${P}-fix-KXmlGUI-toolbars-and-MainWindow-size.patch"
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2021-08-24 13:39 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2021-08-24 13:39 UTC (permalink / raw
  To: gentoo-commits

commit:     6e8bd8fe46daf2e09b95c3abdeab0e2ad4ce6845
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 24 12:20:34 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Aug 24 13:37:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e8bd8fe

kde-apps/konsole: Don't close the whole window if there are splits

Closes: https://bugs.gentoo.org/808510
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...ole-21.04.3-dont-close-window-while-split.patch | 76 ++++++++++++++++++++++
 ...21.04.3-r1.ebuild => konsole-21.04.3-r2.ebuild} |  5 +-
 ...21.08.0-r3.ebuild => konsole-21.08.0-r4.ebuild} |  1 +
 3 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch b/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch
new file mode 100644
index 00000000000..20762b10957
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch
@@ -0,0 +1,76 @@
+From 2591a9489a4d3a43c7a7f00764e9f84822d4946c Mon Sep 17 00:00:00 2001
+From: Ahmad Samir <a.samirh78@gmail.com>
+Date: Sun, 15 Aug 2021 15:51:33 +0200
+Subject: [PATCH] When closing a session, don't close the whole window if there
+ are splits
+
+When closing a session, we check if that is the last tab, and make the code
+close the whole window, but we also need to make sure it's the last view,
+i.e. no split views.
+
+CCBUG: 440976
+FIXED-IN: 21.08.1
+(cherry picked from commit 4a3cab03f5d853f4dd48531979fc3fb57dde5e2e)
+---
+ src/ViewManager.cpp           | 6 +++---
+ src/widgets/ViewContainer.cpp | 9 +++++++++
+ src/widgets/ViewContainer.h   | 6 ++++++
+ 3 files changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
+index 9c006e2bd..426040b78 100644
+--- a/src/ViewManager.cpp
++++ b/src/ViewManager.cpp
+@@ -494,9 +494,9 @@ void ViewManager::sessionFinished()
+         return;
+     }
+ 
+-    // The last session/tab? emit empty() so that close() is called in
+-    // MainWindow, fixes #432077
+-    if (_viewContainer->count() == 1) {
++    // The last session/tab, and only one view (no splits), emit empty()
++    // so that close() is called in MainWindow, fixes #432077
++    if (_viewContainer->count() == 1 && _viewContainer->currentTabViewCount() == 1) {
+         Q_EMIT empty();
+         return;
+     }
+diff --git a/src/widgets/ViewContainer.cpp b/src/widgets/ViewContainer.cpp
+index 2d7bfd13b..b25c00cdd 100644
+--- a/src/widgets/ViewContainer.cpp
++++ b/src/widgets/ViewContainer.cpp
+@@ -145,6 +145,15 @@ ViewSplitter *TabbedViewContainer::viewSplitterAt(int index)
+     return qobject_cast<ViewSplitter*>(widget(index));
+ }
+ 
++int TabbedViewContainer::currentTabViewCount()
++{
++    if (auto *splitter = activeViewSplitter()) {
++        return splitter->findChildren<TerminalDisplay*>().count();
++    }
++
++    return 1;
++}
++
+ void TabbedViewContainer::moveTabToWindow(int index, QWidget *window)
+ {
+     auto splitter = viewSplitterAt(index);
+diff --git a/src/widgets/ViewContainer.h b/src/widgets/ViewContainer.h
+index 3cbacf2cf..8e0a0986a 100644
+--- a/src/widgets/ViewContainer.h
++++ b/src/widgets/ViewContainer.h
+@@ -135,6 +135,12 @@ public:
+      */
+     ViewSplitter *viewSplitterAt(int index);
+ 
++    /**
++     * Returns the number of split views (i.e. TerminalDisplay widgets)
++     * in this tab; if there are no split views, 1 is returned.
++     */
++    int currentTabViewCount();
++
+     void connectTerminalDisplay(TerminalDisplay *display);
+     void disconnectTerminalDisplay(TerminalDisplay *display);
+     void moveTabLeft();
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-21.04.3-r1.ebuild b/kde-apps/konsole/konsole-21.04.3-r2.ebuild
similarity index 92%
rename from kde-apps/konsole/konsole-21.04.3-r1.ebuild
rename to kde-apps/konsole/konsole-21.04.3-r2.ebuild
index 42e9362243d..c95192f968c 100644
--- a/kde-apps/konsole/konsole-21.04.3-r1.ebuild
+++ b/kde-apps/konsole/konsole-21.04.3-r2.ebuild
@@ -51,7 +51,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
-PATCHES=( "${FILESDIR}/${P}-no-flash-on-session-close.patch" ) # bug 807933
+PATCHES=(
+	"${FILESDIR}/${P}-no-flash-on-session-close.patch" # bug 807933
+	"${FILESDIR}/${P}-dont-close-window-while-split.patch" # bug 808510
+)
 
 src_prepare() {
 	ecm_src_prepare

diff --git a/kde-apps/konsole/konsole-21.08.0-r3.ebuild b/kde-apps/konsole/konsole-21.08.0-r4.ebuild
similarity index 96%
rename from kde-apps/konsole/konsole-21.08.0-r3.ebuild
rename to kde-apps/konsole/konsole-21.08.0-r4.ebuild
index fe8cab4b97f..d4600f096a8 100644
--- a/kde-apps/konsole/konsole-21.08.0-r3.ebuild
+++ b/kde-apps/konsole/konsole-21.08.0-r4.ebuild
@@ -52,6 +52,7 @@ RDEPEND="${DEPEND}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-21.04.3-no-flash-on-session-close.patch" # bug 807933
+	"${FILESDIR}/${PN}-21.04.3-dont-close-window-while-split.patch" # bug 808510
 	"${FILESDIR}/${P}-fix-crash-w-blur.patch" # bug 807905, fixed in 21.08.1
 	"${FILESDIR}/${P}-fix-KXmlGUI-toolbars-and-MainWindow-size.patch" # KDE-bugs 430036, 439339
 	"${FILESDIR}/${P}-fix-MainWindow-size-w-o-saved-size.patch" # KDE-bug 437791


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2021-09-22 21:59 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2021-09-22 21:59 UTC (permalink / raw
  To: gentoo-commits

commit:     7efccec23f297902e698925af2503519d58ddf45
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 22 21:28:56 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Sep 22 21:59:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7efccec2

kde-apps/konsole: (Final) fix(?) for window flashing on session close

Upstream commit e693f2d7f1977ca227589154a5cd8c18d8ce44b7

Tested-by: David Flogeras <dflogeras2 <AT> gmail.com>
Bug: https://bugs.gentoo.org/807933
Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ....3-default-navigation-be-TabbedNavigation.patch | 32 ++++++++++++++++++++++
 ...le-21.08.1.ebuild => konsole-21.04.3-r4.ebuild} | 19 +++++++++++--
 ...le-21.08.1.ebuild => konsole-21.08.1-r1.ebuild} |  4 +++
 3 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/kde-apps/konsole/files/konsole-21.04.3-default-navigation-be-TabbedNavigation.patch b/kde-apps/konsole/files/konsole-21.04.3-default-navigation-be-TabbedNavigation.patch
new file mode 100644
index 00000000000..0eeaef37899
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-21.04.3-default-navigation-be-TabbedNavigation.patch
@@ -0,0 +1,32 @@
+From e693f2d7f1977ca227589154a5cd8c18d8ce44b7 Mon Sep 17 00:00:00 2001
+From: Ahmad Samir <a.samirh78@gmail.com>
+Date: Wed, 1 Sep 2021 11:38:29 +0200
+Subject: [PATCH] The default navigation method should be TabbedNavigation
+
+TabbedNavigation is when we have a MainWindow, i.e. the typical use case;
+whereas NoNavigation is when using Konsole Part. The code in Part calls
+setNavigationMethod(NoNavigation), so things should work as before.
+
+I made a wrong assumption that TabbedNavigation was already the default.
+
+CCBUG: 432077
+---
+ src/ViewManager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
+index 2ba77e9f0..3ffbe6ba0 100644
+--- a/src/ViewManager.cpp
++++ b/src/ViewManager.cpp
+@@ -52,7 +52,7 @@ ViewManager::ViewManager(QObject *parent, KActionCollection *collection) :
+     _pluggedController(nullptr),
+     _sessionMap(QHash<TerminalDisplay *, Session *>()),
+     _actionCollection(collection),
+-    _navigationMethod(NoNavigation),
++    _navigationMethod(TabbedNavigation),
+     _navigationVisibility(NavigationNotSet),
+     _managerId(0),
+     _terminalDisplayHistoryIndex(-1)
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-21.08.1.ebuild b/kde-apps/konsole/konsole-21.04.3-r4.ebuild
similarity index 77%
copy from kde-apps/konsole/konsole-21.08.1.ebuild
copy to kde-apps/konsole/konsole-21.04.3-r4.ebuild
index 85e60971ebf..c44e2eb15d3 100644
--- a/kde-apps/konsole/konsole-21.08.1.ebuild
+++ b/kde-apps/konsole/konsole-21.04.3-r4.ebuild
@@ -1,11 +1,11 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=8
+EAPI=7
 
 ECM_HANDBOOK="optional"
 ECM_TEST="true"
-KFMIN=5.84.0
+KFMIN=5.80.0
 QTMIN=5.15.2
 VIRTUALX_REQUIRED="test"
 inherit ecm kde.org
@@ -15,7 +15,7 @@ HOMEPAGE="https://apps.kde.org/konsole/ https://konsole.kde.org"
 
 LICENSE="GPL-2" # TODO: CHECK
 SLOT="5"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
 IUSE="X"
 
 DEPEND="
@@ -34,6 +34,7 @@ DEPEND="
 	>=kde-frameworks/kguiaddons-${KFMIN}:5
 	>=kde-frameworks/kjobwidgets-${KFMIN}:5
 	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kinit-${KFMIN}:5
 	>=kde-frameworks/kiconthemes-${KFMIN}:5
 	>=kde-frameworks/kio-${KFMIN}:5
 	>=kde-frameworks/knewstuff-${KFMIN}:5
@@ -50,6 +51,18 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/${P}-no-flash-on-session-close.patch" # bug 807933
+	"${FILESDIR}/${P}-dont-close-window-while-split.patch" # bug 808510
+	"${FILESDIR}/${P}-emit-empty-in-SessionFinished-only-in-TabbedNavigation-mode.patch" # bug 810598
+	"${FILESDIR}/${P}-default-navigation-be-TabbedNavigation.patch" # bug 807933
+)
+
+src_prepare() {
+	ecm_src_prepare
+	ecm_punt_bogus_dep KF5 Completion
+}
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake_use_find_package X X11)

diff --git a/kde-apps/konsole/konsole-21.08.1.ebuild b/kde-apps/konsole/konsole-21.08.1-r1.ebuild
similarity index 94%
rename from kde-apps/konsole/konsole-21.08.1.ebuild
rename to kde-apps/konsole/konsole-21.08.1-r1.ebuild
index 85e60971ebf..57a1100aff1 100644
--- a/kde-apps/konsole/konsole-21.08.1.ebuild
+++ b/kde-apps/konsole/konsole-21.08.1-r1.ebuild
@@ -50,6 +50,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-21.04.3-default-navigation-be-TabbedNavigation.patch" # bug 807933
+)
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake_use_find_package X X11)


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
@ 2022-06-26 20:18 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2022-06-26 20:18 UTC (permalink / raw
  To: gentoo-commits

commit:     4497060a03e90facbcf724ed7fb36db040ca1f39
Author:     Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Sun Jun 26 19:42:45 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 26 20:17:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4497060a

kde-apps/konsole: fix build for musl

This patch fixes building Konsole with musl. Konsole uses the GNU
extension malloc_trim and this patch makes Konsole use it conditionally
depending on if it's present on the target system.

This is upstreamed for release 22.04.3 (mid July).

See-also: https://invent.kde.org/utilities/konsole/-/merge_requests/621
Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Closes: https://github.com/gentoo/gentoo/pull/26084
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/konsole-22.04.2-musl_malloc_trim.patch   | 92 ++++++++++++++++++++++
 kde-apps/konsole/konsole-22.04.2.ebuild            |  2 +
 2 files changed, 94 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-22.04.2-musl_malloc_trim.patch b/kde-apps/konsole/files/konsole-22.04.2-musl_malloc_trim.patch
new file mode 100644
index 000000000000..455dbc55821f
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-22.04.2-musl_malloc_trim.patch
@@ -0,0 +1,92 @@
+https://invent.kde.org/utilities/konsole/-/merge_requests/621
+https://invent.kde.org/utilities/konsole/-/commit/b8c90a830ceaf293e61f6cd5217bb3e584f997b8 (backport)
+
+
+From b8c90a830ceaf293e61f6cd5217bb3e584f997b8 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heiko.becker@kde.org>
+Date: Tue, 22 Mar 2022 22:08:10 +0100
+Subject: [PATCH] Detect the presence of malloc_trim to fix the build with musl
+
+malloc_trim is indeed a GNU extension, but an extension of glibc.
+Relying on __GNUC__ unfortunately doesn't help with that. Check for
+the actual presence of malloc_trim with cmake's check_function_exists
+instead.
+This fixes the build with musl libc, which doesn't come with
+malloc_trim.
+
+Co-authored-by: Ahmad Samir <a.samirh78@gmail.com>
+(cherry picked from commit f6310c2b791275f3727f2240ca7fab9f58db943d)
+---
+ CMakeLists.txt             |  2 +-
+ src/Screen.cpp             | 17 +++++++----------
+ src/config-konsole.h.cmake |  4 ++--
+ 3 files changed, 10 insertions(+), 13 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f2c9d43ac..b306597ba 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -94,7 +94,7 @@ set(HAVE_X11 ${X11_FOUND})
+ # Check for function GETPWUID
+ check_symbol_exists(getpwuid "pwd.h" HAVE_GETPWUID)
+ 
+-check_include_files(malloc.h      HAVE_MALLOC_H)
++check_function_exists(malloc_trim HAVE_MALLOC_TRIM)
+ 
+ # See above includes for defaults
+ add_definitions(
+diff --git a/src/Screen.cpp b/src/Screen.cpp
+index e57314cd5..dff9b54a4 100644
+--- a/src/Screen.cpp
++++ b/src/Screen.cpp
+@@ -28,13 +28,11 @@
+ #include "history/HistoryType.h"
+ #include "profile/Profile.h"
+ 
+-#ifdef HAVE_MALLOC_H
+-    // For malloc_trim, which is a GNU extension
+-    #ifdef __GNUC__
+-    extern "C" {
+-            #include <malloc.h>
+-    }
+-    #endif
++#ifdef HAVE_MALLOC_TRIM
++// For malloc_trim, which is a GNU extension
++extern "C" {
++#include <malloc.h>
++}
+ #endif
+ 
+ using namespace Konsole;
+@@ -1799,14 +1797,13 @@ void Screen::setScroll(const HistoryType &t, bool copyPreviousScroll)
+         t.scroll(_history);
+     }
+ 
+-#ifdef HAVE_MALLOC_H
++#ifdef HAVE_MALLOC_TRIM
++
+ #ifdef Q_OS_LINUX
+-#ifdef __GNUC__
+     // We might have been using gigabytes of memory, so make sure it is actually released
+     malloc_trim(0);
+ #endif
+ #endif
+-#endif
+ }
+ 
+ bool Screen::hasScroll() const
+diff --git a/src/config-konsole.h.cmake b/src/config-konsole.h.cmake
+index b74992b0a..4b1d9b515 100644
+--- a/src/config-konsole.h.cmake
++++ b/src/config-konsole.h.cmake
+@@ -15,5 +15,5 @@
+ 
+ #cmakedefine HAVE_GETPWUID ${HAVE_GETPWUID}
+ 
+-/* Define to 1 if you have the <malloc.h> header file. */
+-#cmakedefine HAVE_MALLOC_H 1
++/* Defined if system has the malloc_trim function, which is a GNU extension */
++#cmakedefine HAVE_MALLOC_TRIM
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-22.04.2.ebuild b/kde-apps/konsole/konsole-22.04.2.ebuild
index cd237a5abc51..76ba1af7bc7f 100644
--- a/kde-apps/konsole/konsole-22.04.2.ebuild
+++ b/kde-apps/konsole/konsole-22.04.2.ebuild
@@ -18,6 +18,8 @@ SLOT="5"
 KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
 IUSE="X"
 
+PATCHES=( "${FILESDIR}"/${PN}-22.04.2-musl_malloc_trim.patch )
+
 DEPEND="
 	>=dev-qt/qtdbus-${QTMIN}:5
 	>=dev-qt/qtgui-${QTMIN}:5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-26 20:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-23  1:25 [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-06-26 20:18 Sam James
2021-09-22 21:59 Andreas Sturmlechner
2021-08-24 13:39 Andreas Sturmlechner
2021-08-15 19:11 Andreas Sturmlechner
2021-08-13 20:14 Andreas Sturmlechner
2021-05-01 21:24 Andreas Sturmlechner
2020-05-28 20:20 Andreas Sturmlechner
2020-03-23 23:57 Andreas Sturmlechner
2018-02-08  0:10 Andreas Sturmlechner
2017-04-25 12:47 Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox