summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarrat2023-11-09 21:36:10 +0100
committerNarrat2023-11-09 21:36:10 +0100
commitb0bafa8a6f56b6c50ce62e33567c09c5ac4bd24a (patch)
treee5d0224ef0b5465e7828cff549ce9532eee55165
parentc00c49ee5200aef7fb863eb5af0926ece52802bc (diff)
downloadaur-b0bafa8a6f56b6c50ce62e33567c09c5ac4bd24a.tar.gz
xdg-utils-mimeo: cover default-url-scheme-handler
Noticed a report regarding this missing and looking into what needs to be done it seemed fairly straighforward. Only slightly tested and it seemed to be working. We will see what the real world says about this... Funny sidenote: Last update to the patch was on the 9th nov of 2022 :D
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--mimeo-detection.patch41
3 files changed, 37 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 928fc9028c1d..7b1ca311e5d1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = xdg-utils-mimeo
pkgdesc = Command line tools that assist applications with a variety of desktop integration tasks; patched to use mimeo
pkgver = 1.1.3+45+g301a1a4
- pkgrel = 1
+ pkgrel = 2
url = https://www.freedesktop.org/wiki/Software/xdg-utils/
arch = any
license = MIT
@@ -24,7 +24,7 @@ pkgbase = xdg-utils-mimeo
conflicts = xdg-utils
source = mimeo-detection.patch
source = git+https://gitlab.freedesktop.org/xdg/xdg-utils.git#commit=301a1a4772f1f934a22e106ff032c62ef705462b
- sha256sums = 5136fb46afe96d994bd8e3183dcafbeb9bebcbedcb1ac1fe8411a76437479cb7
+ sha256sums = 3571910504a3a7a256de5df16954824fc4062697b800c85d7c3005081d601c0a
sha256sums = SKIP
pkgname = xdg-utils-mimeo
diff --git a/PKGBUILD b/PKGBUILD
index 7de7ccdac464..287268205001 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ pkgname=$_pkgname-mimeo
# https://gitlab.freedesktop.org/xdg/xdg-utils/commits/master
_commit=301a1a4772f1f934a22e106ff032c62ef705462b # master # 2023-08-14
pkgver=1.1.3+45+g301a1a4
-pkgrel=1
+pkgrel=2
pkgdesc="Command line tools that assist applications with a variety of desktop integration tasks; patched to use mimeo"
arch=('any')
url="https://www.freedesktop.org/wiki/Software/xdg-utils/"
@@ -28,7 +28,7 @@ conflicts=($_pkgname)
source=(#https://portland.freedesktop.org/download/$_pkgname-$pkgver.tar.gz #{,.asc}
mimeo-detection.patch
"git+https://gitlab.freedesktop.org/xdg/xdg-utils.git#commit=$_commit")
-sha256sums=('5136fb46afe96d994bd8e3183dcafbeb9bebcbedcb1ac1fe8411a76437479cb7'
+sha256sums=('3571910504a3a7a256de5df16954824fc4062697b800c85d7c3005081d601c0a'
'SKIP')
#validpgpkeys=('8B75CA7811367175D05F3B03C43570F80CC295E6') # "Per Olofsson <pelle@pqz.se>"
diff --git a/mimeo-detection.patch b/mimeo-detection.patch
index e5123dc74e11..4edfec58c7ce 100644
--- a/mimeo-detection.patch
+++ b/mimeo-detection.patch
@@ -1,6 +1,6 @@
-commit c2f7c0257a1fdaba9ffd117b57d71d279243f0ce
+commit 2809ff9e147a3485e835ddbdcb5fe71f5cb26e8f
Author: Narrat <autumn-wind@web.de>
-Date: Wed Nov 9 23:35:36 2022 +0100
+Date: Thu Nov 9 21:34:14 2023 +0100
Add support for mimeo
@@ -117,7 +117,7 @@ index eb1b698..1dd6f07 100644
;;
esac
diff --git a/scripts/xdg-settings.in b/scripts/xdg-settings.in
-index 40f739e..5eaca43 100755
+index 40f739e..a79afa2 100755
--- a/scripts/xdg-settings.in
+++ b/scripts/xdg-settings.in
@@ -487,6 +487,44 @@ set_browser_xfce()
@@ -165,7 +165,7 @@ index 40f739e..5eaca43 100755
# {{{ generic
get_browser_generic()
-@@ -730,6 +768,24 @@ set_url_scheme_handler_xfce()
+@@ -730,6 +768,49 @@ set_url_scheme_handler_xfce()
}
# }}} xfce
@@ -173,24 +173,49 @@ index 40f739e..5eaca43 100755
+
+get_url_scheme_handler_mimeo()
+{
-+ exit_unimplemented_default_handler "$1"
++ get_browser_mimeo
+}
+
+check_url_scheme_handler_mimeo()
+{
-+ exit_unimplemented_default_handler "$1"
++ local scheme="$1" desktop="$2"
++
++ if [ -z "$(desktop_file_to_binary "$desktop")" ]; then
++ echo no
++ exit_success
++ fi
++
++ local browser=$(get_url_scheme_handler_mimeo "$scheme")
++ if [ "$browser" != "$desktop" ]; then
++ echo no
++ exit_success
++ fi
++ echo yes
++ exit_success
+}
+
+set_url_scheme_handler_mimeo()
+{
-+ exit_unimplemented_default_handler "$1"
++ local scheme="$1" desktop="$2"
++
++ if [ -n "$BROWSER" ] && \
++ ([ "$scheme" = http ] || [ "$scheme" = https ]); then
++ exit_failure_operation_failed \
++ "\$BROWSER is set and can't be changed with xdg-settings"
++ fi
++
++ if [ -z "$(desktop_file_to_binary "$desktop")" ]; then
++ exit_failure_file_missing
++ fi
++
++ set_browser_mimeo "$desktop"
+}
+
+# }}} mimeo
# {{{ generic
get_url_scheme_handler_generic()
-@@ -884,6 +940,10 @@ case "$DE" in
+@@ -884,6 +965,10 @@ case "$DE" in
dispatch_specific xfce "$@"
;;