aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2022-11-19 02:36:07 +0000
committerJan Beich <jbeich@FreeBSD.org>2023-08-19 00:51:37 +0000
commit40fe2d53bacf88e2c48282e62445f15e4a3d16b7 (patch)
treebca060ccd251302974e50e1995ced9136f866751
parentf2c2b0330877137b5bbc23a0d42e802f6f4acf8f (diff)
downloadports-40fe2d53bacf88e2c48282e62445f15e4a3d16b7.tar.gz
ports-40fe2d53bacf88e2c48282e62445f15e4a3d16b7.zip
x11/plasma5-plasma-workspace: Fix XDG_CONFIG_DIRS for Wayland
Since Plasma 5.22, setupPlasmaEnvironment adds to XDG_CONFIG_DIRS, with a fallback for the XDG-mandated /etc/xdg default. When using X11, this is ok, as runStartupConfig gets called before setupPlasmaEnvironment, and so the latter uses our modified value. However, when using Wayland, they are called in the opposite order, and so runStartupConfig sees the variable is already set and doesn't inject our modified default. Fix this by changing setupPlasmaEnvironment's default value instead so it's only set in one place. This approach also matches how other ports get patched for our non-conforming environment. Without this, the splash screen shows but plasmashell is never started (nor any other autostart programs), eventually timing out and fading to a black screen. PR: 265505 Obtained from: CheriBSD Approved by: maintainer timeout (3 months) (cherry picked from commit f06a1b44e85b9788c0e1ed718eca4146f102057f)
-rw-r--r--x11/plasma5-plasma-workspace/Makefile6
-rw-r--r--x11/plasma5-plasma-workspace/files/patch-setup_xdg_environment28
2 files changed, 13 insertions, 21 deletions
diff --git a/x11/plasma5-plasma-workspace/Makefile b/x11/plasma5-plasma-workspace/Makefile
index f0d6fb6851ec..ec8d942be7a4 100644
--- a/x11/plasma5-plasma-workspace/Makefile
+++ b/x11/plasma5-plasma-workspace/Makefile
@@ -1,6 +1,6 @@
PORTNAME= plasma-workspace
DISTVERSION= ${KDE_PLASMA_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde kde-plasma
MAINTAINER= kde@FreeBSD.org
@@ -60,6 +60,10 @@ CMAKE_OFF= BUILD_TESTING
# In 5.15 a file was moved from x11/plasma5-plasma-desktop to x11/plasma5-plasma-workspace:
CONFLICTS_INSTALL= plasma5-plasma-desktop-5.14.*
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${PATCH_WRKSRC}/startkde/startplasma.cpp
+
post-stage:
${INSTALL_SCRIPT} ${FILESDIR}/startplasma-wayland.sh ${STAGEDIR}/${LOCALBASE}/bin/
diff --git a/x11/plasma5-plasma-workspace/files/patch-setup_xdg_environment b/x11/plasma5-plasma-workspace/files/patch-setup_xdg_environment
index 29f094a1ef93..9b580910b77a 100644
--- a/x11/plasma5-plasma-workspace/files/patch-setup_xdg_environment
+++ b/x11/plasma5-plasma-workspace/files/patch-setup_xdg_environment
@@ -1,23 +1,11 @@
--- startkde/startplasma.cpp.orig 2019-10-19 18:43:24.172713000 +0200
+++ startkde/startplasma.cpp 2019-10-19 18:45:50.953945000 +0200
-@@ -192,6 +192,10 @@
- if (!qEnvironmentVariableIsSet("XDG_DATA_DIRS")) {
- qputenv("XDG_DATA_DIRS", KDE_INSTALL_FULL_DATAROOTDIR ":/usr/share:/usr/local/share");
+@@ -362,6 +362,6 @@
+ // Add kdedefaults dir to allow config defaults overriding from a writable location
+ QByteArray currentConfigDirs = qgetenv("XDG_CONFIG_DIRS");
+ if (currentConfigDirs.isEmpty()) {
+- currentConfigDirs = "/etc/xdg";
++ currentConfigDirs = "%%LOCALBASE%%/etc/xdg:/etc/xdg";
}
-+ // Additionally also set default value for XDG_CONFIG_DIRS which is not set by default on FreeBSD.
-+ if (!qEnvironmentVariableIsSet("XDG_CONFIG_DIRS")) {
-+ qputenv("XDG_CONFIG_DIRS", KDE_INSTALL_FULL_CONFDIR ":/etc/xdg:/usr/local/etc/xdg");
-+ }
- }
-
-
---- startkde/config-startplasma.h.cmake.orig 2019-10-19 18:56:51.844465000 +0200
-+++ startkde/config-startplasma.h.cmake 2019-10-19 18:57:22.843807000 +0200
-@@ -3,6 +3,7 @@
-
- #define CMAKE_INSTALL_FULL_BINDIR "@CMAKE_INSTALL_FULL_BINDIR@"
- #define KDE_INSTALL_FULL_DATAROOTDIR "@KDE_INSTALL_FULL_DATAROOTDIR@"
-+#define KDE_INSTALL_FULL_CONFDIR "@KDE_INSTALL_FULL_CONFDIR@"
- #define CMAKE_INSTALL_FULL_LIBEXECDIR "@CMAKE_INSTALL_FULL_LIBEXECDIR@"
- #define CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "@CMAKE_INSTALL_FULL_LIBEXECDIR_KF5@"
- #define KWIN_WAYLAND_BIN_PATH "@KWIN_WAYLAND_BIN_PATH@"
+ const auto extraConfigDir = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation).toUtf8() + "/kdedefaults";
+ QDir().mkpath(QString::fromUtf8(extraConfigDir));