From c228362d7e47d06fcad294b78d223c785654b542 Mon Sep 17 00:00:00 2001 From: Karel Balej Date: Mon, 29 Jan 2024 16:48:10 +0100 Subject: [PATCH] zathura: add patch to fix valid file detection Without this patch, it is not possible to use completion for zathura's `:open` command as it will only list files which zathura cannot open and exclude all other, instead of doing it the other way around. --- ...e_valid_extension-should-return-True.patch | 26 +++++++++++++++++++ srcpkgs/zathura/template | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/zathura/patches/0001-The-function-file_valid_extension-should-return-True.patch diff --git a/srcpkgs/zathura/patches/0001-The-function-file_valid_extension-should-return-True.patch b/srcpkgs/zathura/patches/0001-The-function-file_valid_extension-should-return-True.patch new file mode 100644 index 0000000000000..517c0d49cb3db --- /dev/null +++ b/srcpkgs/zathura/patches/0001-The-function-file_valid_extension-should-return-True.patch @@ -0,0 +1,26 @@ +From d74091a7452846112c0bb11e1412cd2af48ee7cd Mon Sep 17 00:00:00 2001 +From: Carlo Buccisano +Date: Tue, 12 Dec 2023 00:24:20 +0100 +Subject: [PATCH] The function file_valid_extension should return True if + plugin is different then NULL, not if it is equal. + +--- + zathura/utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zathura/utils.c b/zathura/utils.c +index 802757f..8f379be 100644 +--- a/zathura/utils.c ++++ b/zathura/utils.c +@@ -60,7 +60,7 @@ file_valid_extension(zathura_t* zathura, const char* path) + zathura_plugin_t* plugin = zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type); + g_free(content_type); + +- return plugin == NULL; ++ return plugin != NULL; + } + + static void +-- +2.43.0 + diff --git a/srcpkgs/zathura/template b/srcpkgs/zathura/template index 4ae25707e6b87..a7aafcd71f4d9 100644 --- a/srcpkgs/zathura/template +++ b/srcpkgs/zathura/template @@ -1,7 +1,7 @@ # Template file for 'zathura' pkgname=zathura version=0.5.4 -revision=1 +revision=2 build_style=meson configure_args="-Dsynctex=enabled" hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils