aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Raplee <kenrap@kennethraplee.com>2024-01-05 21:12:52 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2024-01-13 19:38:54 +0000
commit14b501bb5a36cf810ebac604b4ac09e454be9320 (patch)
tree269efe567f8a256e0b155c4eb489707e6081c6cc
parent8d20726a99ff2400ba2229a4deb16e1dd59c07e4 (diff)
downloadports-14b501bb5a36cf810ebac604b4ac09e454be9320.tar.gz
ports-14b501bb5a36cf810ebac604b4ac09e454be9320.zip
devel/xdg-utils: add patch to support plasma6
Referenced from upstream freedesktop.org repo MR: https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/67/diffs
-rw-r--r--devel/xdg-utils/Makefile2
-rw-r--r--devel/xdg-utils/files/patch-add-support-for-plasma6139
2 files changed, 140 insertions, 1 deletions
diff --git a/devel/xdg-utils/Makefile b/devel/xdg-utils/Makefile
index fae8e7b16dd1..7b48b7c67219 100644
--- a/devel/xdg-utils/Makefile
+++ b/devel/xdg-utils/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xdg-utils
PORTVERSION= 1.1.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= https://portland.freedesktop.org/download/
diff --git a/devel/xdg-utils/files/patch-add-support-for-plasma6 b/devel/xdg-utils/files/patch-add-support-for-plasma6
new file mode 100644
index 000000000000..764621e7290f
--- /dev/null
+++ b/devel/xdg-utils/files/patch-add-support-for-plasma6
@@ -0,0 +1,139 @@
+From 08d0894e5dc1cfb20ffd1dc2a765fd9b04138bd9 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Wed, 5 Jul 2023 09:29:52 +0200
+Subject: [PATCH 1/4] xdg-mime: Use defapp_generic on Plasma 6
+
+defapp_kde uses the no longer existing kmimetypetrader
+
+It doesn't do anything particularly special anyway so we might as well use defapp_generic
+---
+ scripts/xdg-mime.in | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git scripts/xdg-mime.in b/scripts/xdg-mime.in
+index d194b0e..19712b5 100644
+--- scripts/xdg-mime.in.orig
++++ scripts/xdg-mime.in
+@@ -610,15 +610,12 @@ fi
+ if [ "$action" = "defapp" ]; then
+ detectDE
+
+- case "$DE" in
+- kde)
++ if [ "$DE" == "kde" ] && [ "$KDE_SESSION_VERSION" -lt "6" ]; then
+ defapp_kde "$mimetype"
+- ;;
++ fi
++
++ defapp_generic "$mimetype"
+
+- *)
+- defapp_generic "$mimetype"
+- ;;
+- esac
+ exit_failure_operation_impossible "no method available for quering default application for '$mimetype'"
+ fi
+
+--
+GitLab
+
+
+From 4fd41276c9e5dae0a087ed5726f1dca263edd394 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Wed, 5 Jul 2023 09:48:17 +0200
+Subject: [PATCH 2/4] xdg-mime: Use kmimetypefinder (without suffix) on Plasma
+ 6
+
+---
+ scripts/xdg-mime.in | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git scripts/xdg-mime.in b/scripts/xdg-mime.in
+index 19712b5..f78079e 100644
+--- scripts/xdg-mime.in.orig
++++ scripts/xdg-mime.in
+@@ -60,6 +60,10 @@ info_kde()
+ DEBUG 1 "Running kmimetypefinder${KDE_SESSION_VERSION} \"$1\""
+ kmimetypefinder${KDE_SESSION_VERSION} "$1" 2>/dev/null | head -n 1
+ ;;
++ 6)
++ DEBUG 1 "Running kmimetypefinder \"$1\""
++ kmimetypefinder "$1" 2>/dev/null | head -n 1
++ ;;
+ esac
+ else
+ DEBUG 1 "Running kfile \"$1\""
+--
+GitLab
+
+
+From c10cdaf8a03997cc18e51ee6299f0dcc02c34870 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Wed, 5 Jul 2023 09:55:21 +0200
+Subject: [PATCH 3/4] xdg-open: Use correct kde-open on Plasma 6
+
+---
+ scripts/xdg-open.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git scripts/xdg-open.in b/scripts/xdg-open.in
+index 50e31e6..2456aa7 100644
+--- scripts/xdg-open.in.orig
++++ scripts/xdg-open.in
+@@ -130,6 +130,9 @@ open_kde()
+ 5)
+ kde-open${KDE_SESSION_VERSION} "$1"
+ ;;
++ 6)
++ kde-open "$1"
++ ;;
+ esac
+ else
+ kfmclient exec "$1"
+--
+GitLab
+
+
+From eb8a24bb0923bfcb74c29a3147d920ee7a5ff83d Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Wed, 5 Jul 2023 11:02:20 +0200
+Subject: [PATCH 4/4] xdg-settings: Use right config tools on Plasma 6
+
+---
+ scripts/xdg-settings.in | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git scripts/xdg-settings.in b/scripts/xdg-settings.in
+index ab18d3a..fed5932 100755
+--- scripts/xdg-settings.in.orig
++++ scripts/xdg-settings.in
+@@ -148,6 +148,8 @@ read_kde_config()
+ configkey="$3"
+ if [ x"${KDE_SESSION_VERSION}" = x"5" ]; then
+ application="`kreadconfig5 --file $configfile --group $configsection --key $configkey`"
++ elif [ x"${KDE_SESSION_VERSION}" = x"6" ]; then
++ application="`kreadconfig6 --file $configfile --group $configsection --key $configkey`"
+ else
+ application="`kreadconfig --file $configfile --group $configsection --key $configkey`"
+ fi
+@@ -267,6 +269,8 @@ set_browser_kde()
+ set_browser_mime "$1" "text/html" || return
+ if [ x"${KDE_SESSION_VERSION}" = x"5" ]; then
+ kwriteconfig5 --file kdeglobals --group General --key BrowserApplication "$1"
++ elif [ x"${KDE_SESSION_VERSION}" = x"6" ]; then
++ kwriteconfig6 --file kdeglobals --group General --key BrowserApplication "$1"
+ else
+ kwriteconfig --file kdeglobals --group General --key BrowserApplication "$1"
+ fi
+@@ -624,6 +628,8 @@ set_url_scheme_handler_kde()
+ binary="`desktop_file_to_binary "$2"`"
+ if [ x"${KDE_SESSION_VERSION}" = x"5" ]; then
+ kwriteconfig5 --file emaildefaults --group PROFILE_Default --key EmailClient "$binary"
++ elif [ x"${KDE_SESSION_VERSION}" = x"6" ]; then
++ kwriteconfig6 --file emaildefaults --group PROFILE_Default --key EmailClient "$binary"
+ else
+ kwriteconfig --file emaildefaults --group PROFILE_Default --key EmailClient "$binary"
+ fi
+--
+GitLab
+