diff --git a/x11/konsole/Makefile b/x11/konsole/Makefile index 5c4bc371e777..ade7a068cd68 100644 --- a/x11/konsole/Makefile +++ b/x11/konsole/Makefile @@ -1,29 +1,30 @@ PORTNAME= konsole DISTVERSION= ${KDE_APPLICATIONS_VERSION} +PORTREVISION= 1 CATEGORIES= x11 kde kde-applications # kde kde-applications-applications MAINTAINER= kde@FreeBSD.org COMMENT= KDE terminal emulator BUILD_DEPENDS= ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \ docbook-xml>0:textproc/docbook-xml RUN_DEPENDS= keditbookmarks:deskutils/keditbookmarks LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USES= cmake compiler:c++11-lang gettext pkgconfig kde:5 \ qt:5 tar:xz USE_KDE= auth attica bookmarks codecs completion config configwidgets \ coreaddons crash dbusaddons emoticons globalaccel guiaddons i18n \ iconthemes init itemmodels jobwidgets kio \ newstuff notifications notifyconfig parts pty service solid sonnet \ textwidgets widgetsaddons windowsystem xmlgui \ ecm_build USE_QT= concurrent core dbus gui network printsupport script scripttools sql \ widgets xml \ buildtools_build qmake_build OPTIONS_DEFINE= DOCS .include diff --git a/x11/konsole/files/patch-src_MainWindow.cpp b/x11/konsole/files/patch-src_MainWindow.cpp new file mode 100644 index 000000000000..57f3f4d6d33a --- /dev/null +++ b/x11/konsole/files/patch-src_MainWindow.cpp @@ -0,0 +1,25 @@ +From 00d565eedea5be0b5c9ad66b29bdf14c63a5e035 Mon Sep 17 00:00:00 2001 +From: Adriaan de Groot +Date: Mon, 18 Oct 2021 11:07:30 +0200 +Subject: [PATCH 2/2] Special-case PID 0 on FreeBSD + +PID 0 is the kernel; when the shell exits, the process ID for +the session becomes 0. Downstream bug report + https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258996 +--- src/MainWindow.cpp.orig 2021-10-04 22:10:38 UTC ++++ src/MainWindow.cpp +@@ -609,6 +609,14 @@ bool MainWindow::queryClose() + continue; + } + ++ // On FreeBSD, after exiting the shell, the foreground GID is ++ // an invalid value, and the shell PID is 0. Those are not equal, ++ // so isForegroundProcessActive() returns true -- leading to a ++ // complaint about "kernel" here. Special-case PID 0 to avoid that. ++ if (session->processId() == 0) { ++ continue; ++ } ++ + const QString defaultProc = session->program().split(QLatin1Char('/')).last(); + const QString currentProc = session->foregroundProcessName().split(QLatin1Char('/')).last(); +