From 13461412dda69986cbe42feeadb06ff6cacb9f84 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Fri, 13 Sep 2024 12:36:49 +0200 Subject: [PATCH] konsole24, add KF6 version (#11119) --- kde-apps/konsole/konsole24-24.08.0.recipe | 174 ++++++++++++++++++ .../konsole/patches/konsole-24.08.0.patchset | 126 +++++++++++++ 2 files changed, 300 insertions(+) create mode 100644 kde-apps/konsole/konsole24-24.08.0.recipe create mode 100644 kde-apps/konsole/patches/konsole-24.08.0.patchset diff --git a/kde-apps/konsole/konsole24-24.08.0.recipe b/kde-apps/konsole/konsole24-24.08.0.recipe new file mode 100644 index 000000000..cc53f2fcf --- /dev/null +++ b/kde-apps/konsole/konsole24-24.08.0.recipe @@ -0,0 +1,174 @@ +SUMMARY="KDE's Terminal Emulator" +DESCRIPTION="Konsole is a terminal to run a command shell. It provides a command \ +line interface for directly controlling your computer." +HOMEPAGE="https://apps.kde.org/konsole" +COPYRIGHT="2010-2024 KDE Organisation" +LICENSE="GNU LGPL v2" +REVISION="1" +SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/konsole-$portVersion.tar.xz" +CHECKSUM_SHA256="0095f1afc4e4a4cd36a12a2927e090e62fb0d016d38914bc858af568b7416101" +SOURCE_DIR="konsole-$portVersion" +PATCHES="konsole-$portVersion.patchset" +ADDITIONAL_FILES="konsole.rdef.in" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + konsole24$secondaryArchSuffix = $portVersion + cmd:konsole$secondaryArchSuffix = $portVersion + cmd:konsoleprofile$secondaryArchSuffix = $portVersion + lib:libkdeinit5_konsole$secondaryArchSuffix = $portVersion + lib:libkonsoleapp$secondaryArchSuffix = $portVersion + lib:libkonsoleprivate$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libicuuc$secondaryArchSuffix >= 74 + lib:libopenal$secondaryArchSuffix + lib:libKF6Archive$secondaryArchSuffix + lib:libKF6Attica$secondaryArchSuffix + lib:libKF6AuthCore$secondaryArchSuffix + lib:libKF6Bookmarks$secondaryArchSuffix + lib:libKF6Codecs$secondaryArchSuffix + lib:libKF6ColorScheme$secondaryArchSuffix + lib:libKF6Completion$secondaryArchSuffix + lib:libKF6ConfigCore$secondaryArchSuffix + lib:libKF6ConfigGui$secondaryArchSuffix + lib:libKF6ConfigWidgets$secondaryArchSuffix + lib:libKF6CoreAddons$secondaryArchSuffix + lib:libKF6Crash$secondaryArchSuffix + lib:libKF6DBusAddons$secondaryArchSuffix + lib:libKF6GlobalAccel$secondaryArchSuffix + lib:libKF6GuiAddons$secondaryArchSuffix + lib:libKF6I18n$secondaryArchSuffix + lib:libKF6IconThemes$secondaryArchSuffix + lib:libKF6ItemModels$secondaryArchSuffix + lib:libKF6ItemViews$secondaryArchSuffix + lib:libKF6JobWidgets$secondaryArchSuffix + lib:libKF6KIOCore$secondaryArchSuffix + lib:libKF6NewStuffCore$secondaryArchSuffix + lib:libKF6Notifications$secondaryArchSuffix + lib:libKF6NotifyConfig$secondaryArchSuffix + lib:libKF6Parts$secondaryArchSuffix + lib:libKF6Pty$secondaryArchSuffix + lib:libKF6Service$secondaryArchSuffix + lib:libKF6Solid$secondaryArchSuffix + lib:libKF6SonnetUi$secondaryArchSuffix + lib:libKF6TextEditor$secondaryArchSuffix + lib:libKF6TextWidgets$secondaryArchSuffix + lib:libKF6WidgetsAddons$secondaryArchSuffix + lib:libKF6WindowSystem$secondaryArchSuffix + lib:libKF6XmlGui$secondaryArchSuffix + lib:libPlasmaActivities$secondaryArchSuffix + lib:libQt6Core$secondaryArchSuffix + lib:libQt6Core5Compat$secondaryArchSuffix + lib:libQt6DBus$secondaryArchSuffix + lib:libQt6Gui$secondaryArchSuffix + lib:libQt6Multimedia$secondaryArchSuffix + lib:libQt6Network$secondaryArchSuffix + lib:libQt6Widgets$secondaryArchSuffix + lib:libQt6Xml$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +CONFLICTS=" + konsole$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + extra_cmake_modules$secondaryArchSuffix + devel:libicuuc$secondaryArchSuffix >= 74 + devel:libKF6Archive$secondaryArchSuffix + devel:libKF6Attica$secondaryArchSuffix + devel:libKF6AuthCore$secondaryArchSuffix + devel:libKF6Bookmarks$secondaryArchSuffix + devel:libKF6Codecs$secondaryArchSuffix + devel:libKF6ColorScheme$secondaryArchSuffix + devel:libKF6Completion$secondaryArchSuffix + devel:libKF6ConfigCore$secondaryArchSuffix + devel:libKF6ConfigGui$secondaryArchSuffix + devel:libKF6ConfigWidgets$secondaryArchSuffix + devel:libKF6CoreAddons$secondaryArchSuffix + devel:libKF6Crash$secondaryArchSuffix + devel:libKF6DBusAddons$secondaryArchSuffix +# devel:libKF6DocTools$secondaryArchSuffix + devel:libKF6GlobalAccel$secondaryArchSuffix + devel:libKF6GuiAddons$secondaryArchSuffix + devel:libKF6I18n$secondaryArchSuffix + devel:libKF6IconThemes$secondaryArchSuffix + devel:libKF6ItemModels$secondaryArchSuffix + devel:libKF6ItemViews$secondaryArchSuffix + devel:libKF6JobWidgets$secondaryArchSuffix + devel:libKF6KIOCore$secondaryArchSuffix + devel:libKF6NewStuffCore$secondaryArchSuffix + devel:libKF6Notifications$secondaryArchSuffix + devel:libKF6NotifyConfig$secondaryArchSuffix + devel:libKF6Parts$secondaryArchSuffix + devel:libKF6Pty$secondaryArchSuffix + devel:libKF6Service$secondaryArchSuffix + devel:libKF6Solid$secondaryArchSuffix + devel:libKF6SonnetUi$secondaryArchSuffix + devel:libKF6TextEditor$secondaryArchSuffix + devel:libKF6TextWidgets$secondaryArchSuffix + devel:libKF6WidgetsAddons$secondaryArchSuffix + devel:libKF6WindowSystem$secondaryArchSuffix + devel:libKF6XmlGui$secondaryArchSuffix + devel:libPlasmaActivities$secondaryArchSuffix + devel:libQt6Core$secondaryArchSuffix + devel:libQt6Core5Compat$secondaryArchSuffix + devel:libQt6Multimedia$secondaryArchSuffix + devel:libQt6Qml$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + cmd:cmake + cmd:g++$secondaryArchSuffix + cmd:make + cmd:msgfmt + cmd:msgmerge + cmd:pkg_config$secondaryArchSuffix + cmd:python3 + " + +PATCH() +{ + # disable docs generation + sed -e '/kdoctools_install(po)/ s/^#*/#/' -i CMakeLists.txt +} + +BUILD() +{ + export LDFLAGS="-lnetwork" + cmake -Bbuild -S. $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=Release \ + -DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt6 \ + -DECM_DIR=/system/data/cmake/Modules/ECM/cmake + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + # cleanup + rm -rf $dataDir/{applications,metainfo} + + local APP_SIGNATURE="application/x-vnd.kde-konsole" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/konsole.rdef.in > konsole.rdef + + addResourcesToBinaries konsole.rdef $binDir/konsole + addAppDeskbarSymlink $binDir/konsole Konsole +} diff --git a/kde-apps/konsole/patches/konsole-24.08.0.patchset b/kde-apps/konsole/patches/konsole-24.08.0.patchset new file mode 100644 index 000000000..6faad457f --- /dev/null +++ b/kde-apps/konsole/patches/konsole-24.08.0.patchset @@ -0,0 +1,126 @@ +From af1b56d8e8e1295f31e318bf2990766615bfb271 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 3 Mar 2024 22:00:00 +1000 +Subject: Fix for Haiku + + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4474ceb..9e0f769 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -91,6 +91,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + list(APPEND konsole_LIBS util) + endif() + ++if(HAIKU) ++ list(APPEND konsole_LIBS network) ++endif() ++ + # TODO: Move this to an internal folder if it grows too much. + # This konsoleprivate_core is the "core" library that depends in nothing from konsole itself + # so we can start to detangle the codebase. +diff --git a/src/Pty.cpp b/src/Pty.cpp +index b22d435..b87a360 100644 +--- a/src/Pty.cpp ++++ b/src/Pty.cpp +@@ -243,7 +243,7 @@ void Pty::addEnvironmentVariables(const QStringList &environmentVariables) + + // extra safeguard to make sure $TERM is always set + if (!isTermEnvAdded) { +- setEnv(QStringLiteral("TERM"), QStringLiteral("xterm-256color")); ++ setEnv(QStringLiteral("TERM"), QStringLiteral("xterm-color")); + } + } + +diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp +index 981ac80..0eba2fa 100644 +--- a/src/Vt102Emulation.cpp ++++ b/src/Vt102Emulation.cpp +@@ -2417,11 +2417,19 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent *event) + // Alt+[Character] results in Esc+[Character] being sent + // (unless there is an entry defined for this particular combination + // in the keyboard modifier) ++#ifdef Q_OS_HAIKU ++ const bool wantsControlModifier = ((entry.modifiers() & entry.modifierMask() & Qt::ControlModifier) != 0U); ++#else + const bool wantsAltModifier = ((entry.modifiers() & entry.modifierMask() & Qt::AltModifier) != 0U); ++#endif + const bool wantsMetaModifier = ((entry.modifiers() & entry.modifierMask() & Qt::MetaModifier) != 0U); + const bool wantsAnyModifier = ((entry.state() & entry.stateMask() & KeyboardTranslator::AnyModifierState) != 0); + ++#ifdef Q_OS_HAIKU ++ if (((modifiers & Qt::ControlModifier) != 0U) && !(wantsControlModifier || wantsAnyModifier) && !event->text().isEmpty()) { ++#else + if (((modifiers & Qt::AltModifier) != 0U) && !(wantsAltModifier || wantsAnyModifier) && !event->text().isEmpty()) { ++#endif + textToSend.prepend("\033"); + } + if (((modifiers & Qt::MetaModifier) != 0U) && !(wantsMetaModifier || wantsAnyModifier) && !event->text().isEmpty()) { +diff --git a/src/profile/Profile.cpp b/src/profile/Profile.cpp +index dd86ff5..1419c13 100644 +--- a/src/profile/Profile.cpp ++++ b/src/profile/Profile.cpp +@@ -68,7 +68,7 @@ const std::vector Profile::DefaultProperties = { + {Command, "Command", nullptr, QString()}, + {Arguments, "Arguments", nullptr, QStringList()}, + {MenuIndex, "MenuIndex", nullptr, QLatin1String("0")}, +- {Environment, "Environment", GENERAL_GROUP, QStringList{QLatin1String("TERM=xterm-256color"), QLatin1String("COLORTERM=truecolor")}}, ++ {Environment, "Environment", GENERAL_GROUP, QStringList{QLatin1String("TERM=xterm-color"), QLatin1String("COLORTERM=truecolor")}}, + {Directory, "Directory", GENERAL_GROUP, QString()}, + {LocalTabTitleFormat, "LocalTabTitleFormat", GENERAL_GROUP, QLatin1String("%d : %n")}, + {LocalTabTitleFormat, "tabtitle", nullptr, QLatin1String("%d : %n")}, +diff --git a/src/session/Session.cpp b/src/session/Session.cpp +index 93d8835..17f22fa 100644 +--- a/src/session/Session.cpp ++++ b/src/session/Session.cpp +@@ -516,14 +516,16 @@ void Session::run() + } + + // if a program was specified via setProgram(), but it couldn't be found (but a fallback was), print a warning ++#ifndef Q_OS_HAIKU + if (exec != checkProgram(_program)) { + terminalWarning(i18n("Could not find '%1', starting '%2' instead. Please check your profile settings.", _program, exec)); + } else if (exec != checkProgram(exec)) { + terminalWarning(i18n("Could not find '%1', starting '%2' instead. Please check your profile settings.", exec, checkProgram(exec))); + } ++#endif + + // if no arguments are specified, fall back to program name +- QStringList arguments = _arguments.join(QLatin1Char(' ')).isEmpty() ? QStringList() << exec : _arguments; ++ QStringList arguments = _arguments.join(QLatin1Char(' ')).isEmpty() ? QStringList() << exec << QStringLiteral("-login") : _arguments; + + // For historical reasons, the first argument in _arguments is the + // name of the program to execute, remove it in favor of the actual program name +-- +2.45.1 + + +From b5a9939f0e4323015fb9034354b6f48a790353d5 Mon Sep 17 00:00:00 2001 +From: Schrijvers Luc +Date: Thu, 28 Mar 2024 12:35:30 +0100 +Subject: Use system themes + + +diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp +index c8a2369..6c3b88a 100644 +--- a/src/MainWindow.cpp ++++ b/src/MainWindow.cpp +@@ -367,6 +367,7 @@ void MainWindow::setupActions() + }); + + // Set up themes ++#ifndef Q_OS_HAIKU + auto *manager = new KColorSchemeManager(actionCollection()); + manager->setAutosaveChanges(true); + KActionMenu *selectionMenu = KColorSchemeMenu::createMenu(manager, this); +@@ -375,6 +376,7 @@ void MainWindow::setupActions() + winColorSchemeMenu->menu()->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-color"))); + winColorSchemeMenu->menu()->setTitle(i18n("&Window Color Scheme")); + actionCollection()->addAction(QStringLiteral("window-colorscheme-menu"), winColorSchemeMenu); ++#endif + + // Full Screen + menuAction = KStandardAction::fullScreen(this, &MainWindow::viewFullScreen, this, collection); +-- +2.43.2 +