aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknuxify <knuxify@gmail.com>2021-09-25 23:54:16 +0200
committerLeo <thinkabit.ukim@gmail.com>2021-09-26 16:51:09 +0000
commit5f5e28b9b82eeb42a863cf5b5c63e3475fe4c305 (patch)
tree7d6954fe6c1a91b15655f006ce1d6613de22f387
parent52af170e7462e21e00fa4e6e82a3a5364e75ab24 (diff)
downloadaports-5f5e28b9b82eeb42a863cf5b5c63e3475fe4c305.tar.gz
aports-5f5e28b9b82eeb42a863cf5b5c63e3475fe4c305.tar.bz2
aports-5f5e28b9b82eeb42a863cf5b5c63e3475fe4c305.tar.xz
testing/mugshot: new aport
https://github.com/bluesabre/mugshot Lightweight user configuration utility
-rw-r--r--testing/mugshot/0001-use-gettext-instead-of-locale-gettext.patch80
-rw-r--r--testing/mugshot/APKBUILD28
2 files changed, 108 insertions, 0 deletions
diff --git a/testing/mugshot/0001-use-gettext-instead-of-locale-gettext.patch b/testing/mugshot/0001-use-gettext-instead-of-locale-gettext.patch
new file mode 100644
index 0000000000..08df32f844
--- /dev/null
+++ b/testing/mugshot/0001-use-gettext-instead-of-locale-gettext.patch
@@ -0,0 +1,80 @@
+use gettext instead of locale
+
+---
+ bin/mugshot | 4 ++--
+ mugshot/CameraMugshotDialog.py | 2 +-
+ mugshot/MugshotWindow.py | 2 +-
+ mugshot/__init__.py | 2 +-
+ mugshot_lib/SudoDialog.py | 2 +-
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/bin/mugshot b/bin/mugshot
+index a7d674f..ec8ebeb 100755
+--- a/bin/mugshot
++++ b/bin/mugshot
+@@ -16,8 +16,8 @@
+ # You should have received a copy of the GNU General Public License along
+ # with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-import locale
+-locale.textdomain('mugshot')
++import gettext
++gettext.textdomain('mugshot')
+
+ import sys
+ import os
+diff --git a/mugshot/CameraMugshotDialog.py b/mugshot/CameraMugshotDialog.py
+index 5c86db2..534bb0f 100644
+--- a/mugshot/CameraMugshotDialog.py
++++ b/mugshot/CameraMugshotDialog.py
+@@ -22,7 +22,7 @@
+ import os
+ import logging
+
+-from locale import gettext as _
++from gettext import gettext as _
+
+ import gi
+ gi.require_version('Gst', '1.0')
+diff --git a/mugshot/MugshotWindow.py b/mugshot/MugshotWindow.py
+index 7e4bd61..98b52fa 100644
+--- a/mugshot/MugshotWindow.py
++++ b/mugshot/MugshotWindow.py
+@@ -16,7 +16,7 @@
+ # You should have received a copy of the GNU General Public License along
+ # with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-from locale import gettext as _
++from gettext import gettext as _
+
+ import logging
+ import os
+diff --git a/mugshot/__init__.py b/mugshot/__init__.py
+index d2060fb..96942c1 100644
+--- a/mugshot/__init__.py
++++ b/mugshot/__init__.py
+@@ -19,7 +19,7 @@
+ import argparse
+ import signal
+
+-from locale import gettext as _
++from gettext import gettext as _
+
+ from gi.repository import Gtk # pylint: disable=E0611
+
+diff --git a/mugshot_lib/SudoDialog.py b/mugshot_lib/SudoDialog.py
+index d5656ab..7ab39fd 100644
+--- a/mugshot_lib/SudoDialog.py
++++ b/mugshot_lib/SudoDialog.py
+@@ -17,7 +17,7 @@
+ # with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ import os
+-from locale import gettext as _
++from gettext import gettext as _
+
+ from gi.repository import Gtk, GdkPixbuf
+
+--
+2.33.0
+
diff --git a/testing/mugshot/APKBUILD b/testing/mugshot/APKBUILD
new file mode 100644
index 0000000000..f85f274df9
--- /dev/null
+++ b/testing/mugshot/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: knuxify <knuxify@gmail.com>
+# Maintainer: knuxify <knuxify@gmail.com>
+pkgname=mugshot
+pkgver=0.4.3
+pkgrel=0
+pkgdesc="Lightweight user configuration utility"
+url="https://github.com/bluesabre/mugshot"
+arch="all"
+license="GPL-3.0-or-later"
+depends="python3 shadow py3-cairo py3-gobject3 py3-pexpect"
+makedepends="gobject-introspection intltool py3-setuptools py3-distutils-extra"
+subpackages="$pkgname-doc $pkgname-lang"
+source="https://github.com/bluesabre/mugshot/releases/download/mugshot-$pkgver/mugshot-$pkgver.tar.gz
+ 0001-use-gettext-instead-of-locale-gettext.patch"
+options="!check" # no test suite
+
+build() {
+ python3 setup.py build
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="
+248d9f0438030bc25904e105f0ef62c5253fda5b0bf0b4b7fd0d82cb95e26bf6acc4394c241201cf916ae5b65115fad3e9e87e6b21a877f1448503ac495ca17c mugshot-0.4.3.tar.gz
+4be1da2731de009c21a05bd904cc11929ffa9dca451779bb23dd79e997fcace80405aab54aa5814ee65b8fab233a1112e0557aa7b050d07cbf052a7b92851a5d 0001-use-gettext-instead-of-locale-gettext.patch
+"