Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.21]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 8380A780FF6 for ; Fri, 7 Jan 2022 10:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1641552242; s=strato-dkim-0002; d=erduman.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=ZfSgRxiuZtg8uI86KfsMoBuJ0E2K9H3xdcD9dUSLDec=; b=hPPymfKsLUNlMexL/SFaLVtcUpcw4BjGTBBrJYDMIKjYvwb8IgcNu4XzFbmTJPeL47 6vE8B9baLl5e5EuAAo989dF2jiNa9OcC84a5Y6UdBNpkVnGlu7z326UPBG4vi8RQI9Jx nN/FLI5oCtyowCx/fRlzbY0E/Gb41Sbvj29RIsGQmiPB9HP3FVZ1Q+NA+uPUowk4RDp1 pT37kzY63hW6ct7o+F/El0kpSOjKf4KivgxiwvHk2e8dBd3B00EZtsxt9yLlciUIPcd+ cxTHbPLHd6A3S+CADVLAxXjrwwsTuYHbKOsZ7uyHIG9CLcpaML7fKpa9zA/LlKX731KS Y0Xw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JG0PdE6Ifu01fGcw5LkiijwwjO8uLyVE4CyKsZZvl8YCKfMJ9B+DlMUtetsSSEjmy78e" X-RZG-CLASS-ID: mo00 Received: from rocky.fritz.box by smtp.strato.de (RZmta 47.37.6 DYNA|AUTH) with ESMTPSA id L0e434y07Ai11xN (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 7 Jan 2022 11:44:01 +0100 (CET) From: Hakan Erduman To: alpine-aports@lists.alpinelinux.org Cc: Hakan Erduman Subject: [PATCH v2] testing/hamster-time-tracker: new aport Date: Fri, 7 Jan 2022 11:43:52 +0100 Message-Id: <20220107104352.23168-1-hakan@erduman.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220106174515.5988-1-hakan@erduman.de> References: <20220106174515.5988-1-hakan@erduman.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. --- This fixes the issues raised from the first patch: - tests run now in clean chroot - indentation - removed surplus 'cd to $builddir' - fixed dependencies - refactored patch to be more telling Still to do: - decide 'webbrowser' dependency --- ...eError-if-bindtextdomain-isn-t-there.patch | 35 +++++++++++ testing/hamster-time-tracker/APKBUILD | 59 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 testing/hamster-time-tracker/0001-Catch-AttributeError-if-bindtextdomain-isn-t-there.patch create mode 100644 testing/hamster-time-tracker/APKBUILD 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 +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..8a380a19d8 --- /dev/null +++ b/testing/hamster-time-tracker/APKBUILD @@ -0,0 +1,59 @@ +# Contributor: Hakan Erduman +# Maintainer: Hakan Erduman +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=" + gsettings-desktop-schemas + gtk+3.0 + py3-cairo + py3-gobject3 + py3-dbus + py3-xdg + " +conflicts="hamster-applet" +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 +" -- 2.34.1