@@ -1209,6 +1209,7 @@ dist_patch_DATA = \
%D%/packages/patches/gemmi-fix-sajson-types.patch \
%D%/packages/patches/genimage-mke2fs-test.patch \
%D%/packages/patches/geoclue-config.patch \
+ %D%/packages/patches/gfeeds-python-39-compat.patch \
%D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \
%D%/packages/patches/ghc-9.2-glibc-2.33-link-order.patch \
%D%/packages/patches/ghc-testsuite-dlopen-pie.patch \
new file mode 100644
@@ -0,0 +1,82 @@
+Index: gfeeds-2.2.0/gfeeds/conf_mapper.py
+===================================================================
+--- gfeeds-2.2.0.orig/gfeeds/conf_mapper.py
++++ gfeeds-2.2.0/gfeeds/conf_mapper.py
+@@ -1,4 +1,4 @@
+-from typing import Dict, List, Literal, cast
++from typing import Dict, List, Literal, Union, cast
+ from gfeeds.gsettings_wrapper import GSETTINGS_TYPES, GsettingsWrapper
+
+
+@@ -9,7 +9,8 @@ class ConfMapper:
+ @property
+ def feeds(self) -> Dict[
+ str,
+- Dict[Literal['tags', 'last-modified'], List[str] | str]
++ Dict[Literal['tags', 'last-modified'],
++ Union[List[str], str]]
+ ]:
+ return cast(dict, self.gsw.get('feeds'))
+
+Index: gfeeds-2.2.0/gfeeds/gsettings_wrapper.py
+===================================================================
+--- gfeeds-2.2.0.orig/gfeeds/gsettings_wrapper.py
++++ gfeeds-2.2.0/gfeeds/gsettings_wrapper.py
+@@ -80,19 +80,18 @@ class GsettingsWrapper:
+
+ def set(self, key: str, value: GSETTINGS_TYPES):
+ key = self.convert_and_check_key(key)
+- match value:
+- case str(value):
+- self.gs.set_string(key, value)
+- case dict(value) | list(value):
+- self.set(key, json.dumps(value, cls=CustomJSONEncoder))
+- case bool(value):
+- self.gs.set_boolean(key, value)
+- case int(value):
+- self.gs.set_int(key, value)
+- case float(value):
+- self.gs.set_double(key, value)
+- case _:
+- return self.__type_err()
++ if isinstance(value, str):
++ self.gs.set_string(key, value)
++ elif isinstance(value, dict) or isinstance(value, list):
++ self.set(key, json.dumps(value, cls=CustomJSONEncoder))
++ elif isinstance(value, bool):
++ self.gs.set_boolean(key, value)
++ elif isinstance(value, int):
++ self.gs.set_int(key, value)
++ elif isinstance(value, float):
++ self.gs.set_double(key, value)
++ else:
++ return self.__type_err()
+
+ def __type_err(self):
+ raise TypeError(
+Index: gfeeds-2.2.0/gfeeds/signal_helper.py
+===================================================================
+--- gfeeds-2.2.0.orig/gfeeds/signal_helper.py
++++ gfeeds-2.2.0/gfeeds/signal_helper.py
+@@ -1,7 +1,7 @@
+-from typing import Literal, Tuple, Type
++from typing import Literal, Tuple, Union, Type
+ from gi.repository import GObject
+
+-SignalReturnType = (
++SignalReturnType = Union[
+ Literal[
+ GObject.TYPE_INT,
+ GObject.TYPE_BOOLEAN,
+@@ -11,9 +11,8 @@ SignalReturnType = (
+ GObject.TYPE_STRING,
+ GObject.TYPE_NONE,
+ GObject.TYPE_PYOBJECT,
+- ]
+- | None
+-)
++ ], None
++]
+
+
+ def signal_tuple(
@@ -536,7 +536,7 @@ (define-public syndication-domination
(define-public gfeeds
(package
(name "gfeeds")
- (version "1.0.3")
+ (version "2.2.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -545,7 +545,8 @@ (define-public gfeeds
(file-name (git-file-name name version))
(sha256
(base32
- "1lkvhff7pl1y4brqsix6sar5yl8flyhfp3w96fx0klhk3586bvhg"))))
+ "0p2hyjif9yhpc6r3ig7fdxpb2q8s9g42mz38svsc38gq7hb13b2w"))
+ (patches (search-patches "gfeeds-python-39-compat.patch"))))
(build-system meson-build-system)
(arguments
(list
@@ -556,9 +557,10 @@ (define-public gfeeds
(substitute* "gfeeds/confManager.py"
(("mpv") (search-input-file inputs "/bin/mpv")))))
(add-after 'unpack 'skip-icon-cache
- (lambda _
- (substitute* "meson_post_install.py"
- (("gtk-update-icon-cache") "true"))))
+ (lambda _
+ (substitute* "meson.build"
+ (("gtk_update_icon_cache: true")
+ "gtk_update_icon_cache: false"))))
(add-after 'install 'wrap-gfeeds
(lambda* (#:key outputs #:allow-other-keys)
(wrap-program (string-append