aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHakan Erduman <hakan@erduman.de>2022-02-22 08:17:01 +0000
committeralice <alice@ayaya.dev>2022-02-22 08:20:16 +0000
commita63bf56aa93f7454628568201726f4fd37bd06f7 (patch)
tree19b701e182ed33a61b29d83e0124ef6bfcc965c9
parenta133c1c06cc22cc770c87ce11d4c42b23c223239 (diff)
downloadaports-a63bf56aa93f7454628568201726f4fd37bd06f7.tar.gz
aports-a63bf56aa93f7454628568201726f4fd37bd06f7.tar.bz2
aports-a63bf56aa93f7454628568201726f4fd37bd06f7.tar.xz
testing/hamster-time-tracker: new aport
Hamster is time tracking for individuals. It is a python3/gtk3 rewrite of the original hamster-applet. A flatpak exists but is rather clumsy in alpine. --- I am willing to maintain this and the adjacent xfce4-hamster-plugin.
-rw-r--r--testing/hamster-time-tracker/0001-Catch-AttributeError-if-bindtextdomain-isn-t-there.patch35
-rw-r--r--testing/hamster-time-tracker/APKBUILD61
2 files changed, 96 insertions, 0 deletions
diff --git a/testing/hamster-time-tracker/0001-Catch-AttributeError-if-bindtextdomain-isn-t-there.patch b/testing/hamster-time-tracker/0001-Catch-AttributeError-if-bindtextdomain-isn-t-there.patch
new file mode 100644
index 0000000000..2bd68a770c
--- /dev/null
+++ b/testing/hamster-time-tracker/0001-Catch-AttributeError-if-bindtextdomain-isn-t-there.patch
@@ -0,0 +1,35 @@
+From 1bfb5def3babb3d4ee9b9c865e029e485b5f07ae Mon Sep 17 00:00:00 2001
+From: Hakan Erduman <hakan@erduman.de>
+Date: Fri, 7 Jan 2022 09:44:04 +0100
+Subject: [PATCH] Catch AttributeError if bindtextdomain isn't there
+
+ Affects musl based python compilations
+ and may be also useful for the *BSDs
+---
+ src/hamster/lib/i18n.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/hamster/lib/i18n.py b/src/hamster/lib/i18n.py
+index 7bb89773..58c435a4 100644
+--- a/src/hamster/lib/i18n.py
++++ b/src/hamster/lib/i18n.py
+@@ -18,10 +18,13 @@ def setup_i18n():
+ locale_dir = os.path.realpath(os.path.join(defs.DATA_DIR, "locale"))
+
+ for module in (locale,gettext):
+- module.bindtextdomain('hamster', locale_dir)
+- module.textdomain('hamster')
++ try:
++ module.bindtextdomain('hamster', locale_dir)
++ module.textdomain('hamster')
+
+- module.bind_textdomain_codeset('hamster','utf8')
++ module.bind_textdomain_codeset('hamster','utf8')
++ except:
++ continue
+
+ gettext.install("hamster", locale_dir)
+
+--
+2.34.1
+
diff --git a/testing/hamster-time-tracker/APKBUILD b/testing/hamster-time-tracker/APKBUILD
new file mode 100644
index 0000000000..b0973aecf5
--- /dev/null
+++ b/testing/hamster-time-tracker/APKBUILD
@@ -0,0 +1,61 @@
+# Contributor: Hakan Erduman <hakan@erduman.de>
+# Maintainer: Hakan Erduman <hakan@erduman.de>
+pkgname=hamster-time-tracker
+pkgver=3.0.2
+pkgrel=0
+pkgdesc="time tracking for individuals"
+url="https://github.com/projecthamster/hamster"
+arch="noarch"
+license="GPL-3.0-or-later"
+makedepends="
+ intltool
+ itstool
+ "
+checkdepends="
+ dbus-x11
+ xvfb-run
+ "
+depends_doc="
+ yelp
+ "
+depends="
+ gsettings-desktop-schemas
+ gtk+3.0
+ py3-cairo
+ py3-dbus
+ py3-gobject3
+ py3-xdg
+ python3
+ "
+source="$pkgname-$pkgver.tar.gz::https://github.com/projecthamster/hamster/archive/refs/tags/v$pkgver.tar.gz
+ 0001-Catch-AttributeError-if-bindtextdomain-isn-t-there.patch
+ "
+builddir="$srcdir/hamster-$pkgver"
+subpackages="
+ $pkgname-lang
+ $pkgname-doc
+ $pkgname-bash-completion
+ "
+
+build() {
+ python3 ./waf configure --skip-gsettings --skip-icon-cache-update
+ python3 ./waf build
+}
+
+package() {
+ python3 ./waf install --destdir="$pkgdir"
+ install -Dm644 -t "$pkgdir"/usr/share/glib-2.0/schemas ./data/org.gnome.hamster.gschema.xml
+}
+
+check() {
+ export XDG_RUNTIME_DIR="$builddir"
+ export GSETTINGS_SCHEMA_DIR="$builddir/schemas"
+ install -Dm644 -t "$builddir/schemas" ./data/org.gnome.hamster.gschema.xml
+ glib-compile-schemas "$builddir/schemas"
+ dbus-run-session xvfb-run python3 -m unittest
+}
+
+sha512sums="
+f619746e6742cf798a40fadf2b38c489a94693b6b55403839f80c3abc618b2795511242664f8a9ce2c070fd178c117462720f52ffb7c3c32aa801c63bdbaaabc hamster-time-tracker-3.0.2.tar.gz
+94fbc2179870174c4c012533de5e7268dfea8c3449a69c2a1d2978b9e217033815fa17639436d2ed25bcf6015fb5f5d935222b4aa827f4cc62f9fa2443954c3f 0001-Catch-AttributeError-if-bindtextdomain-isn-t-there.patch
+"