1 |
commit: b0ed85eec3c8e5eb14e86fbe037d914896679a4a |
2 |
Author: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 3 16:17:37 2019 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 3 16:18:00 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0ed85ee |
7 |
|
8 |
net-misc/connman-notify: add patch for python3 compat, update deps |
9 |
|
10 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
11 |
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> |
12 |
|
13 |
.../connman-notify-0_pre20140623-r1.ebuild | 38 ++++++++++++++++++++++ |
14 |
.../files/connman-notify-py3-support.patch | 38 ++++++++++++++++++++++ |
15 |
2 files changed, 76 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/connman-notify/connman-notify-0_pre20140623-r1.ebuild b/net-misc/connman-notify/connman-notify-0_pre20140623-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..f3fa6cd20fe |
20 |
--- /dev/null |
21 |
+++ b/net-misc/connman-notify/connman-notify-0_pre20140623-r1.ebuild |
22 |
@@ -0,0 +1,38 @@ |
23 |
+# Copyright 1999-2019 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=6 |
27 |
+ |
28 |
+PYTHON_COMPAT=( python2_7 python3_{6,7} ) |
29 |
+ |
30 |
+inherit desktop python-single-r1 vcs-snapshot |
31 |
+ |
32 |
+MY_COMMIT="0ed9b5e4a0e1f03c83c4589cabf410cac66cd11d" |
33 |
+ |
34 |
+DESCRIPTION="Desktop notification integration for connman" |
35 |
+HOMEPAGE="https://gitlab.com/wavexx/connman-notify/" |
36 |
+SRC_URI="https://gitlab.com/wavexx/connman-notify/repository/${MY_COMMIT}/archive.tar.bz2 -> ${P}.tar.bz2" |
37 |
+ |
38 |
+EGIT_REPO_URI="https://gitlab.com/wavexx/connman-notify.git" |
39 |
+ |
40 |
+LICENSE="GPL-2" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~x86" |
43 |
+IUSE="" |
44 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
45 |
+ |
46 |
+RDEPEND="${PYTHON_DEPS} |
47 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
48 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
49 |
+ net-misc/connman |
50 |
+ virtual/notification-daemon" |
51 |
+ |
52 |
+PATCHES=( "${FILESDIR}"/connman-notify-py3-support.patch ) |
53 |
+ |
54 |
+src_install() { |
55 |
+ python_fix_shebang ${PN} |
56 |
+ dobin ${PN} |
57 |
+ dodoc README.rst |
58 |
+ |
59 |
+ make_desktop_entry ${PN} ${PN} ${PN} Network |
60 |
+} |
61 |
|
62 |
diff --git a/net-misc/connman-notify/files/connman-notify-py3-support.patch b/net-misc/connman-notify/files/connman-notify-py3-support.patch |
63 |
new file mode 100644 |
64 |
index 00000000000..59c88849556 |
65 |
--- /dev/null |
66 |
+++ b/net-misc/connman-notify/files/connman-notify-py3-support.patch |
67 |
@@ -0,0 +1,38 @@ |
68 |
+--- a/connman-notify |
69 |
++++ b/connman-notify |
70 |
+@@ -7,8 +7,8 @@ |
71 |
+ import argparse |
72 |
+ import dbus |
73 |
+ import dbus.mainloop.glib |
74 |
+-import glib |
75 |
+-import pynotify |
76 |
++from gi.repository import GLib |
77 |
++from gi.repository import Notify |
78 |
+ |
79 |
+ APP_NAME = 'connman' |
80 |
+ SHORT_DEV = True |
81 |
+@@ -22,7 +22,7 @@ |
82 |
+ |
83 |
+ |
84 |
+ def notify(subject, body): |
85 |
+- ntf = pynotify.Notification(subject, body) |
86 |
++ ntf = Notify.Notification.new(subject, body) |
87 |
+ ntf.show() |
88 |
+ |
89 |
+ |
90 |
+@@ -79,7 +79,7 @@ |
91 |
+ if args.hide_addr: SHOW_ADDR = False |
92 |
+ |
93 |
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) |
94 |
+- pynotify.init(APP_NAME) |
95 |
++ Notify.init(APP_NAME) |
96 |
+ bus = dbus.SystemBus() |
97 |
+ manager = dbus.Interface(bus.get_object("net.connman", "/"), "net.connman.Manager") |
98 |
+ |
99 |
+@@ -88,5 +88,5 @@ |
100 |
+ signal_name="PropertyChanged", |
101 |
+ path_keyword="path") |
102 |
+ |
103 |
+- mainloop = glib.MainLoop() |
104 |
++ mainloop = GLib.MainLoop() |
105 |
+ mainloop.run() |