From ee864286ad5fc84d01a83a30869c4dfa328c1eb0 Mon Sep 17 00:00:00 2001 From: KF-Art Date: Tue, 21 Nov 2023 16:09:06 -0500 Subject: [PATCH] Update dockbarx from 1.0.beta2 to 1.0.beta3 --- .../patches/fix_python3.12_compatibilty.patch | 47 +++++++++++++++++++ srcpkgs/dockbarx/template | 11 ++--- 2 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/dockbarx/patches/fix_python3.12_compatibilty.patch diff --git a/srcpkgs/dockbarx/patches/fix_python3.12_compatibilty.patch b/srcpkgs/dockbarx/patches/fix_python3.12_compatibilty.patch new file mode 100644 index 0000000..ecd5630 --- /dev/null +++ b/srcpkgs/dockbarx/patches/fix_python3.12_compatibilty.patch @@ -0,0 +1,47 @@ +From ecfe511bfa74cc3f5d92448106805dbe8c90efea Mon Sep 17 00:00:00 2001 +From: Xu Zhen +Date: Tue, 21 Nov 2023 20:34:18 +0800 +Subject: [PATCH] Fix compatibility with python 3.12 + +--- + README.md | 2 +- + dockbarx/applets.py | 6 ++++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/README.md b/README.md +index ab910d4..e9ae2d2 100644 +--- a/README.md ++++ b/README.md +@@ -45,7 +45,7 @@ https://aur.archlinux.org/packages/xfce4-dockbarx-plugin/ + ## Manual Installation + + 1. Following dependencies needs to be installed (many of them might be installed already on your system): +- - gir1.2-gtk-3.0 (>= 3.22), gir1.2-glib-2.0 (>= 1.40), gir1.2-keybinder-3.0, gir1.2-pango-1.0, gir1.2-wnck-3.0, python3-cairo (>= 1.11.0), python3-dbus, python3-distutils, python3-gi, python3-gi-cairo, python3-pil, python3-polib, python3-xdg and python3-xlib. ++ - gir1.2-gtk-3.0 (>= 3.22), gir1.2-glib-2.0 (>= 1.40), gir1.2-keybinder-3.0, gir1.2-pango-1.0, gir1.2-wnck-3.0, python3 (>= 3.4), python3-cairo (>= 1.11.0), python3-dbus, python3-distutils, python3-gi, python3-gi-cairo, python3-pil, python3-polib, python3-xdg and python3-xlib. + - (Optional) gir1.2-zeitgeist-2.0 and zeitgeist, to access latest and most used documents. + - (Optional) indicator-application or ayatana-indicator-application, to use the appindicator applet with DockX + - (Optional) python3-pyudev (>= 0.15), to use the battery status applet with DockX +diff --git a/dockbarx/applets.py b/dockbarx/applets.py +index 881a35a..9fba5e2 100644 +--- a/dockbarx/applets.py ++++ b/dockbarx/applets.py +@@ -22,7 +22,7 @@ + from gi.repository import Gtk + from gi.repository import Gdk + import os +-import imp ++import importlib.util + import dbus + import weakref + from gi.repository import GObject +@@ -213,7 +213,9 @@ def get(self, name): + iname, ext = os.path.splitext(os.path.split(e)[-1]) + path = os.path.join(self.applets[name]["dir"], e) + try: +- applet = imp.load_source(iname, path) ++ spec = importlib.util.spec_from_file_location(iname, path) ++ applet = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(applet) + except: + message = "Error: Could not load applet from %s. " % path + message += "Could not import the script." diff --git a/srcpkgs/dockbarx/template b/srcpkgs/dockbarx/template index 304dc41..9b30f38 100644 --- a/srcpkgs/dockbarx/template +++ b/srcpkgs/dockbarx/template @@ -1,20 +1,19 @@ # Template file for 'dockbarx' pkgname=dockbarx -version=1.0.beta2 +version=1.0.beta3 _pkgrel=${version//.b/-b} revision=1 repository="cereus-extra" build_style=python3-module -hostmakedepends="python3-polib" -makedepends="awk" -depends="libkeybinder3 python3-cairo python3-dbus python3-gobject python3-Pillow +hostmakedepends="python3-polib python3-setuptools python3-distutils-extra" +depends="libkeybinder3 python3-cairo python3-dbus python3-gobject python3-Pillow python3-distutils-extra python3-xlib python3-xdg" short_desc="TaskBar with groupping and group manipulation" -maintainer="Kevin F. " +maintainer="Kevin Figueroa " license="GPL-3.0-or-later" homepage="https://github.com/xuzhen/dockbarx" distfiles="${homepage}/archive/refs/tags/${_pkgrel}.tar.gz" -checksum=418101acb09a4fd4fd94280fa5a313a4fab103fd105ca267ea72fc609f5bb865 +checksum=61be03c1e73bd435d7330917d1a014082a90b3f07bbb6bc4b9d6e3b52a859138 post_install() { vinstall icons/hicolor/128x128/apps/dockbarx.png 644 usr/share/pixmaps/dockbarx.png