x11-misc/mugshot: version bump to 0.4.1.
authorConrad Kostecki <conrad@kostecki.com>
Wed, 15 Aug 2018 21:22:02 +0000 (23:22 +0200)
committerPatrice Clement <monsieurp@gentoo.org>
Sun, 19 Aug 2018 22:50:42 +0000 (00:50 +0200)
Closes: https://bugs.gentoo.org/663740
Package-Manager: Portage-2.3.45, Repoman-2.3.10
Closes: https://github.com/gentoo/gentoo/pull/9586

x11-misc/mugshot/Manifest
x11-misc/mugshot/files/mugshot-0.4.1-missing_default_face.patch [new file with mode: 0644]
x11-misc/mugshot/files/mugshot-0.4.1-use_office_phone.patch [new file with mode: 0644]
x11-misc/mugshot/mugshot-0.4.1.ebuild [new file with mode: 0644]

index 6328edd164febd81d103640f01519e6b2069e70d..8d4365f855cb910f5fb289e99df500a4ee1229ef 100644 (file)
@@ -1 +1,2 @@
 DIST mugshot-0.4.0.tar.gz 126101 BLAKE2B be0d84fd09a1ff6477d32a77d979b1606597b2ca38524b9cc65c254dd9d5d43697123b10d2b836c1193a9ba0f3dadebb15d1fe89ab7fb1743cc7b4d177ace65d SHA512 5936ec3def5a70db21f9bcc7fce873ce374f8df0795fb944593f398704dcba8c81be30393603e1753e176da87f4a6fd8a3218de2aeb7f33ea6018735ce1b2c09
+DIST mugshot-0.4.1.tar.gz 121660 BLAKE2B ce0c0d4b76184f35e4ba5204b984393412924c0288b09fe51ec0e6635b1556e24ed98ce4a893ae57f25810bb39ce035fb40b6990e1b6516406cb0f670acdbac0 SHA512 f7790b3f80fc98d9b19e9b9dd74eafc41ae7598e38f70e148502056b4bd375922271cc72cf4664280f1449b2f5e1d89052ecc5d37c6dc453041e5312f736bbbe
diff --git a/x11-misc/mugshot/files/mugshot-0.4.1-missing_default_face.patch b/x11-misc/mugshot/files/mugshot-0.4.1-missing_default_face.patch
new file mode 100644 (file)
index 0000000..cc504d6
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/mugshot/MugshotWindow.py 2018-08-08 11:22:42.000000000 +0200
++++ b/mugshot/MugshotWindow.py 2018-08-15 22:48:39.998699923 +0200
+@@ -256,10 +256,11 @@
+             if os.path.isfile(face):
+                 try:
+-                    if os.path.samefile(image, face):
+-                        self.updated_image = face
+-                    else:
+-                        self.updated_image = None
++                    if os.path.exists(image):
++                        if os.path.samefile(image, face):
++                            self.updated_image = face
++                        else:
++                            self.updated_image = None
+                 except FileNotFoundError:
+                     self.updated_image = None
+                 self.set_user_image(face)
diff --git a/x11-misc/mugshot/files/mugshot-0.4.1-use_office_phone.patch b/x11-misc/mugshot/files/mugshot-0.4.1-use_office_phone.patch
new file mode 100644 (file)
index 0000000..07c2003
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/mugshot/MugshotWindow.py 2018-08-08 11:22:42.000000000 +0200
++++ b/mugshot/MugshotWindow.py 2018-08-15 22:47:02.108700297 +0200
+@@ -617,14 +617,18 @@
+         # chfn 2.29 uses "-p" as parameter for changing the office-phone (LP: #1699285)
+         p_command = "%s -p \"%s\" %s" % (chfn, office_phone, username)
+-        # other (newer, older?) use "-w"
++        # other (newer, older?) use "-o" or "-w"
++        o_command = "%s -o \"%s\" %s" % (chfn, office_phone, username)
+         w_command = "%s -w \"%s\" %s" % (chfn, office_phone, username)
+         if self.process_terminal_password(p_command, password) or \
+                 self.process_terminal_password(w_command, password):
+             self.office_phone = office_phone
+         else:
+-            success = False
++            if self.process_terminal_password(command2, password):
++                self.office_phone = office_phone
++            else:
++                success = False
+         return (success, response)
diff --git a/x11-misc/mugshot/mugshot-0.4.1.ebuild b/x11-misc/mugshot/mugshot-0.4.1.ebuild
new file mode 100644 (file)
index 0000000..d8635da
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1 eapi7-ver gnome2-utils
+
+DESCRIPTION="A lightweight user-configuration application"
+HOMEPAGE="https://launchpad.net/mugshot"
+SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnome libreoffice webcam"
+
+RDEPEND="dev-libs/gobject-introspection
+       dev-python/dbus-python[${PYTHON_USEDEP}]
+       dev-python/pexpect[${PYTHON_USEDEP}]
+       dev-python/pycairo[${PYTHON_USEDEP}]
+       dev-python/pygobject:3[${PYTHON_USEDEP}]
+       sys-apps/accountsservice
+       x11-libs/gtk+:3
+       gnome? ( gnome-base/gnome-control-center )
+       libreoffice? ( || ( app-office/libreoffice-bin app-office/libreoffice ) )
+       webcam? ( media-libs/gstreamer:1.0
+               media-libs/gst-plugins-good:1.0
+               gnome? ( media-libs/clutter-gtk[introspection]
+                       media-video/cheese[introspection] ) )"
+
+DEPEND="dev-python/python-distutils-extra[${PYTHON_USEDEP}]
+       dev-util/intltool
+       ${RDEPEND}"
+
+PATCHES=(
+       # Both patches are taken from Arch Linux
+       # and adapted to newest version
+       "${FILESDIR}"/${P}-missing_default_face.patch
+       "${FILESDIR}"/${P}-use_office_phone.patch
+)
+
+pkg_postinst() {
+       gnome2_schemas_update
+       gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+       gnome2_schemas_update
+       gnome2_icon_cache_update
+}