From d4e07e00754483d2bd2af83f57e51478d907bc29 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 3 Mar 2024 20:29:50 +1000 Subject: [PATCH] dolphin: bump version --- ...-22.04.0.recipe => dolphin-23.08.5.recipe} | 8 +- .../dolphin/patches/dolphin-22.04.0.patchset | 166 ------------------ .../dolphin/patches/dolphin-23.08.5.patchset | 161 +++++++++++++++++ 3 files changed, 165 insertions(+), 170 deletions(-) rename kde-apps/dolphin/{dolphin-22.04.0.recipe => dolphin-23.08.5.recipe} (97%) delete mode 100644 kde-apps/dolphin/patches/dolphin-22.04.0.patchset create mode 100644 kde-apps/dolphin/patches/dolphin-23.08.5.patchset diff --git a/kde-apps/dolphin/dolphin-22.04.0.recipe b/kde-apps/dolphin/dolphin-23.08.5.recipe similarity index 97% rename from kde-apps/dolphin/dolphin-22.04.0.recipe rename to kde-apps/dolphin/dolphin-23.08.5.recipe index 90c569f99..50e314a63 100644 --- a/kde-apps/dolphin/dolphin-22.04.0.recipe +++ b/kde-apps/dolphin/dolphin-23.08.5.recipe @@ -23,11 +23,11 @@ At first look, this is a simple file manager, but it has many talents. Some feat * Add a terminal in the directory you are currently browsing * Many functions controlled by keyboard shortcuts" HOMEPAGE="https://userbase.kde.org/Dolphin" -COPYRIGHT="2000-2022 KDE" +COPYRIGHT="2000-2023 KDE" LICENSE="GNU GPL v2" -REVISION="3" +REVISION="1" SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/dolphin-$portVersion.tar.xz" -CHECKSUM_SHA256="58c6cdd0d3b8ac41880e5ea2322cad92380c8c45336150c3c39f9357dfa4f100" +CHECKSUM_SHA256="6309abda566dfe890f6a3790f101198ed0f274728896054f21e24bdfc3e1f1f3" PATCHES="dolphin-$portVersion.patchset" ADDITIONAL_FILES="dolphin.rdef.in" @@ -98,7 +98,7 @@ REQUIRES=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel - extra_cmake_modules$secondaryArchSuffix >= 5.93 + extra_cmake_modules$secondaryArchSuffix >= 5.115 devel:libkdeinit5_klauncher$secondaryArchSuffix devel:libKF5Activities$secondaryArchSuffix devel:libKF5Archive$secondaryArchSuffix diff --git a/kde-apps/dolphin/patches/dolphin-22.04.0.patchset b/kde-apps/dolphin/patches/dolphin-22.04.0.patchset deleted file mode 100644 index c5f311bc1..000000000 --- a/kde-apps/dolphin/patches/dolphin-22.04.0.patchset +++ /dev/null @@ -1,166 +0,0 @@ -From 80ab55d9679d928d997aa6680437b893efc6fc9c Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Tue, 2 Nov 2021 19:42:47 +1000 -Subject: Fix for Haiku - - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 0c1bcb2..2821df2 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -422,7 +422,7 @@ endif() - - if(NOT WIN32) - add_subdirectory(settings/contextmenu/servicemenuinstaller) -- install( FILES settings/contextmenu/servicemenu.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} ) -+ install( FILES settings/contextmenu/servicemenu.knsrc DESTINATION ${KDE_INSTALL_DATADIR}/knsrcfiles ) - endif() - - ########### install files ############### -diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp -index eec2d4c..f069efe 100644 ---- a/src/dolphinviewcontainer.cpp -+++ b/src/dolphinviewcontainer.cpp -@@ -87,7 +87,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) : - m_messageWidget->setCloseButtonVisible(true); - m_messageWidget->hide(); - --#ifndef Q_OS_WIN -+#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU) - if (getuid() == 0) { - - // We must be logged in as the root user; show a big scary warning -diff --git a/src/kitemviews/private/kdirectorycontentscounterworker.cpp b/src/kitemviews/private/kdirectorycontentscounterworker.cpp -index 73799e7..c63db41 100644 ---- a/src/kitemviews/private/kdirectorycontentscounterworker.cpp -+++ b/src/kitemviews/private/kdirectorycontentscounterworker.cpp -@@ -39,6 +39,10 @@ KDirectoryContentsCounterWorker::CountResult walkDir(const QString &dirPath, - QT_STATBUF buf; - - while ((dirEntry = QT_READDIR(dir))) { -+#ifdef Q_OS_HAIKU -+ struct stat sp; -+ stat(dirEntry->d_name, &sp); -+#endif - if (dirEntry->d_name[0] == '.') { - if (dirEntry->d_name[1] == '\0' || !countHiddenFiles) { - // Skip "." or hidden files -@@ -53,10 +57,16 @@ KDirectoryContentsCounterWorker::CountResult walkDir(const QString &dirPath, - // If only directories are counted, consider an unknown file type and links also - // as directory instead of trying to do an expensive stat() - // (see bugs 292642 and 299997). -+#ifdef Q_OS_HAIKU -+ const bool countEntry = !countDirectoriesOnly || -+ S_ISDIR(sp.st_mode) || -+ S_ISLNK(sp.st_mode); -+#else - const bool countEntry = !countDirectoriesOnly || - dirEntry->d_type == DT_DIR || - dirEntry->d_type == DT_LNK || - dirEntry->d_type == DT_UNKNOWN; -+#endif - if (countEntry) { - ++count; - } -@@ -65,8 +75,11 @@ KDirectoryContentsCounterWorker::CountResult walkDir(const QString &dirPath, - - bool linkFound = false; - QString nameBuf = QStringLiteral("%1/%2").arg(dirPath, dirEntry->d_name); -- -+#ifdef Q_OS_HAIKU -+ if (S_ISDIR(sp.st_mode) || S_ISLNK(sp.st_mode)) { -+#else - if (dirEntry->d_type == DT_REG || dirEntry->d_type == DT_LNK) { -+#endif - if (QT_STAT(nameBuf.toLocal8Bit(), &buf) == 0) { - if (S_ISDIR(buf.st_mode)) { - // was a dir link, recurse -@@ -75,7 +88,11 @@ KDirectoryContentsCounterWorker::CountResult walkDir(const QString &dirPath, - size += buf.st_size; - } - } -+#ifdef Q_OS_HAIKU -+ if (S_ISDIR(sp.st_mode) || linkFound) { -+#else - if (dirEntry->d_type == DT_DIR || linkFound) { -+#endif - // recursion for dirs and dir links - size += walkDir(nameBuf, countHiddenFiles, countDirectoriesOnly, dirEntry, allowedRecursiveLevel - 1).size; - } --- -2.30.2 - - -From ebbb23ee8605a5c8460245de0e61f39ce2d6ced7 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 18 May 2022 22:33:30 +1000 -Subject: Autostart for dbus and kwallet - - -diff --git a/src/main.cpp b/src/main.cpp -index 7a2d42e..273441b 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -36,6 +36,11 @@ - #ifndef Q_OS_WIN - #include - #endif -+#ifdef Q_OS_HAIKU -+#include -+#include -+#include -+#endif - #include - - int main(int argc, char **argv) -@@ -191,6 +196,21 @@ int main(int argc, char **argv) - - mainWindow->show(); - -+#ifdef Q_OS_HAIKU -+ if (getenv("DBUS_SESSION_BUS_PID") == NULL) { -+ QProcess dbusProcess; -+ QString exec = "/bin/dbus-launch"; -+ QStringList params; -+ dbusProcess.start(exec, params); -+ dbusProcess.waitForFinished(); -+ QString output(dbusProcess.readAllStandardOutput()); -+ -+ QStringList list = output.split("\n", Qt::SkipEmptyParts); -+ for (int i = 0; i < list.count(); i++) -+ putenv(list.at(i).toLatin1().data()); -+ } -+#endif -+ - // Allow starting Dolphin on a system that is not running DBus: - KDBusService::StartupOptions serviceOptions = KDBusService::Multiple; - if (!QDBusConnection::sessionBus().isConnected()) { -@@ -199,6 +219,11 @@ int main(int argc, char **argv) - KDBusService dolphinDBusService(serviceOptions); - DBusInterface interface; - -+#ifdef Q_OS_HAIKU -+ QProcess kwalletProcess; -+ kwalletProcess.start("/bin/kwalletd5", QStringList()); -+#endif -+ - if (!app.isSessionRestored()) { - KConfigGui::setSessionConfig(QStringLiteral("dolphin"), QStringLiteral("dolphin")); - } -@@ -236,6 +261,12 @@ int main(int argc, char **argv) - auto feedbackProvider = DolphinFeedbackProvider::instance(); - Q_UNUSED(feedbackProvider) - #endif -- -+#ifdef Q_OS_HAIKU -+ int status=app.exec(); -+ kwalletProcess.kill(); -+ system("kill -3 $DBUS_SESSION_BUS_PID"); -+ return status; -+#else - return app.exec(); // krazy:exclude=crash; -+#endif - } --- -2.30.2 - diff --git a/kde-apps/dolphin/patches/dolphin-23.08.5.patchset b/kde-apps/dolphin/patches/dolphin-23.08.5.patchset new file mode 100644 index 000000000..87cf6a71a --- /dev/null +++ b/kde-apps/dolphin/patches/dolphin-23.08.5.patchset @@ -0,0 +1,161 @@ +From d90387e29f1030e40cc18143bc5cda3c49b438eb Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 3 Mar 2024 20:23:08 +1000 +Subject: dolphin: Fix for Haiku + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7c51f0b..7fa1fcb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,7 +50,7 @@ find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + DBus + ) + +-if (UNIX AND NOT APPLE) ++if (UNIX AND NOT APPLE AND NOT HAIKU) + set(HAVE_X11 TRUE) + + if (QT_MAJOR_VERSION STREQUAL "5") +@@ -156,7 +156,7 @@ ecm_set_disabled_deprecation_versions( + ) + + add_subdirectory(src) +-add_subdirectory(doc) ++#add_subdirectory(doc) + + # CMake files + set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/DolphinVcs") +@@ -212,7 +212,7 @@ ecm_qt_install_logging_categories( + + ki18n_install(po) + if(KF5DocTools_FOUND) +- kdoctools_install(po) ++# kdoctools_install(po) + endif() + + install(FILES completions/dolphin.zsh RENAME _dolphin DESTINATION ${KDE_INSTALL_ZSHAUTOCOMPLETEDIR}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 62c70ba..f064752 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -572,7 +572,7 @@ endif() + + if(NOT WIN32) + add_subdirectory(settings/contextmenu/servicemenuinstaller) +- install( FILES settings/contextmenu/servicemenu.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} ) ++ install( FILES settings/contextmenu/servicemenu.knsrc DESTINATION ${KDE_INSTALL_DATADIR}/knsrcfiles ) + endif() + + ########### install files ############### +diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp +index 03e4998..e93338f 100644 +--- a/src/dolphinviewcontainer.cpp ++++ b/src/dolphinviewcontainer.cpp +@@ -107,7 +107,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl &url, QWidget *parent) + m_messageWidget->setCloseButtonVisible(true); + m_messageWidget->hide(); + +-#ifndef Q_OS_WIN ++#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU) + if (getuid() == 0) { + // We must be logged in as the root user; show a big scary warning + showMessage(i18n("Running Dolphin as root can be dangerous. Please be careful."), Warning); +diff --git a/src/kitemviews/private/kdirectorycontentscounterworker.cpp b/src/kitemviews/private/kdirectorycontentscounterworker.cpp +index 2d60091..57cf7b1 100644 +--- a/src/kitemviews/private/kdirectorycontentscounterworker.cpp ++++ b/src/kitemviews/private/kdirectorycontentscounterworker.cpp +@@ -8,7 +8,7 @@ + #include "kdirectorycontentscounterworker.h" + + // Required includes for countDirectoryContents(): +-#ifdef Q_OS_WIN ++#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU) + #include + #else + #include +@@ -23,7 +23,7 @@ KDirectoryContentsCounterWorker::KDirectoryContentsCounterWorker(QObject *parent + qRegisterMetaType(); + } + +-#ifndef Q_OS_WIN ++#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU) + void KDirectoryContentsCounterWorker::walkDir(const QString &dirPath, bool countHiddenFiles, uint allowedRecursiveLevel) + { + QByteArray text = dirPath.toLocal8Bit(); +@@ -138,7 +138,7 @@ void KDirectoryContentsCounterWorker::countDirectoryContents(const QString &path + { + const bool countHiddenFiles = options & CountHiddenFiles; + +-#ifdef Q_OS_WIN ++#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU) + QDir dir(path); + QDir::Filters filters = QDir::NoDotAndDotDot | QDir::System | QDir::AllEntries; + if (countHiddenFiles) { +diff --git a/src/main.cpp b/src/main.cpp +index 2d1ccd0..cd97cb1 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -46,6 +46,11 @@ + #ifndef Q_OS_WIN + #include + #endif ++#ifdef Q_OS_HAIKU ++#include ++#include ++#include ++#endif + #include + + int main(int argc, char **argv) +@@ -208,6 +213,21 @@ int main(int argc, char **argv) + + mainWindow->show(); + ++#ifdef Q_OS_HAIKU ++ if (getenv("DBUS_SESSION_BUS_PID") == NULL) { ++ QProcess dbusProcess; ++ QString exec = "/bin/dbus-launch"; ++ QStringList params; ++ dbusProcess.start(exec, params); ++ dbusProcess.waitForFinished(); ++ QString output(dbusProcess.readAllStandardOutput()); ++ ++ QStringList list = output.split("\n", Qt::SkipEmptyParts); ++ for (int i = 0; i < list.count(); i++) ++ putenv(list.at(i).toLatin1().data()); ++ } ++#endif ++ + // Allow starting Dolphin on a system that is not running DBus: + KDBusService::StartupOptions serviceOptions = KDBusService::Multiple; + if (!QDBusConnection::sessionBus().isConnected()) { +@@ -216,6 +236,11 @@ int main(int argc, char **argv) + KDBusService dolphinDBusService(serviceOptions); + DBusInterface interface; + ++#ifdef Q_OS_HAIKU ++ QProcess kwalletProcess; ++ kwalletProcess.start("/bin/kwalletd5", QStringList()); ++#endif ++ + if (!app.isSessionRestored()) { + KConfigGui::setSessionConfig(QStringLiteral("dolphin"), QStringLiteral("dolphin")); + } +@@ -251,6 +276,12 @@ int main(int argc, char **argv) + auto feedbackProvider = DolphinFeedbackProvider::instance(); + Q_UNUSED(feedbackProvider) + #endif +- ++#ifdef Q_OS_HAIKU ++ int status=app.exec(); ++ kwalletProcess.kill(); ++ system("kill -3 $DBUS_SESSION_BUS_PID"); ++ return status; ++#else + return app.exec(); // krazy:exclude=crash; ++#endif + } +-- +2.43.2 +