Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/dogtail/, dev-util/dogtail/files/
Date: Fri, 11 Aug 2017 23:22:17
Message-Id: 1502493715.cf02cf1c8b38c473be016ac8ea4ed17d902c3d1d.eva@gentoo
1 commit: cf02cf1c8b38c473be016ac8ea4ed17d902c3d1d
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 11 23:03:51 2017 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 11 23:21:55 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf02cf1c
7
8 dev-util/dogtail: version bump 0.9.9 → 0.9.10
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 dev-util/dogtail/Manifest | 1 +
13 dev-util/dogtail/dogtail-0.9.10.ebuild | 61 ++++++++++++++++++++
14 .../files/dogtail-0.9.10-gentoo-paths.patch | 67 ++++++++++++++++++++++
15 3 files changed, 129 insertions(+)
16
17 diff --git a/dev-util/dogtail/Manifest b/dev-util/dogtail/Manifest
18 index 199f3a6c5bd..2a2c776316b 100644
19 --- a/dev-util/dogtail/Manifest
20 +++ b/dev-util/dogtail/Manifest
21 @@ -1,2 +1,3 @@
22 DIST dogtail-0.9.0.tar.gz 119882 SHA256 564dae5fba4fa3a7f6d53503e0877dad56ae8bce10e181d3d2c0bdbf063f4e36 SHA512 cf2956fad923f0f325f5dc3cd8f5a575491f6c455e2fa597b034b09e1579054b84b6ae80b67cbbe161c012c0de48457f872cfe27a5e0274447d32e21e4a8360d WHIRLPOOL 771606a4bc3d59bd75df85ab9ef3dd8bd4e28161e13fc792bb4108f7b058db18f42c1174499b90d3c307c3302e254278aecf94e03ff894222bc7f12021611c1f
23 +DIST dogtail-0.9.10.tar.gz 125995 SHA256 ab84f9e691fea621a178d89e8cbd00830dd2bcbd945f48b91b122a445b645e93 SHA512 08ce4ad6e5e492ab04be9964cc6583d96d2d8a707a49721c1bca9248e5c56702fe5d0d84dd992023f731fe87016c88e21929319baff561aa113c6e101343fc3e WHIRLPOOL a3f973ad621ce79d57e460bc00591414ce804a0c61295982ab882ebf4f29f57cbe10d39b819b2c7cc4ddb2455109dfd1ee4ca5fed5c1c30222294f04e9345fa9
24 DIST dogtail-0.9.9.tar.gz 123884 SHA256 5d94620bac19b23606d3ecb28e85628c5ceb505beb530af7023ce5bfb576bc5c SHA512 5283dea40b8193e7380aeebab6c7ad149c232ac3d7360df477bed0e623bacc79fc895694d2aff788dd5f986591c1460c447428d8c2acf25ba240946323eabef8 WHIRLPOOL 4d855893e9da54bca09260729f3dc551e973a47a0ef9db31507c071e0014bb70d809aebb50bb47355c9b536f499f912e6b75846a2fe98f3ed8a2a8df20f43a5f
25
26 diff --git a/dev-util/dogtail/dogtail-0.9.10.ebuild b/dev-util/dogtail/dogtail-0.9.10.ebuild
27 new file mode 100644
28 index 00000000000..a02cbee7daa
29 --- /dev/null
30 +++ b/dev-util/dogtail/dogtail-0.9.10.ebuild
31 @@ -0,0 +1,61 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
38 +
39 +inherit distutils-r1 gnome2-utils xdg
40 +
41 +DESCRIPTION="GUI test tool and automation framework using accessibility framework"
42 +HOMEPAGE="https://gitlab.com/dogtail/dogtail/commits/master"
43 +SRC_URI="https://gitlab.com/${PN}/${PN}/raw/released/${P}.tar.gz"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE=""
49 +
50 +RDEPEND="
51 + dev-libs/gobject-introspection
52 + dev-python/pyatspi[${PYTHON_USEDEP}]
53 + dev-python/pycairo[${PYTHON_USEDEP}]
54 + dev-python/pygobject:3[${PYTHON_USEDEP}]
55 + dev-python/pillow[${PYTHON_USEDEP}]
56 + x11-libs/gdk-pixbuf:2[introspection]
57 + x11-libs/gtk+:3[introspection]
58 + x11-libs/libwnck:3[introspection]
59 + x11-base/xorg-server[xvfb]
60 + x11-apps/xinit
61 +"
62 +DEPEND="${DEPEND}
63 + dev-python/setuptools[${PYTHON_USEDEP}]
64 +"
65 +
66 +src_prepare() {
67 + # Install docs in one place
68 + sed "s:doc/${PN}:doc/${PF}:" -i setup.py || die
69 +
70 + # Upstream loads resources relative to __file__, which doesn't work with
71 + # gentoo's dev-lang/python-exec. So we need to add hard-coded paths.
72 + eapply "${FILESDIR}"/${PN}-0.9.10-gentoo-paths.patch
73 + sed -e "s:@EPREFIX_USR@:'${EPREFIX}/usr':" -i sniff/sniff || die "sed failed"
74 +
75 + xdg_src_prepare
76 + distutils-r1_src_prepare
77 +}
78 +
79 +pkg_preinst() {
80 + xdg_pkg_preinst
81 + gnome2_icon_savelist
82 +}
83 +
84 +pkg_postinst() {
85 + xdg_pkg_postinst
86 + gnome2_icon_cache_update
87 +}
88 +
89 +pkg_postrm() {
90 + xdg_pkg_postrm
91 + gnome2_icon_cache_update
92 +}
93
94 diff --git a/dev-util/dogtail/files/dogtail-0.9.10-gentoo-paths.patch b/dev-util/dogtail/files/dogtail-0.9.10-gentoo-paths.patch
95 new file mode 100644
96 index 00000000000..89d2be2c725
97 --- /dev/null
98 +++ b/dev-util/dogtail/files/dogtail-0.9.10-gentoo-paths.patch
99 @@ -0,0 +1,67 @@
100 +From d0dd6c6adb4edcd5147c42af14cd1016a67e84bd Mon Sep 17 00:00:00 2001
101 +From: Gilles Dartiguelongue <eva@g.o>
102 +Date: Sat, 12 Aug 2017 00:59:44 +0200
103 +Subject: [PATCH] Load resources from well-known location
104 +
105 +Using __file__ does not work with Gentoo's dev-python/python-exec
106 +wrapping. Better use hard-coded paths.
107 +
108 +Also adds support for prefix.
109 +---
110 + sniff/sniff | 29 +++++++++--------------------
111 + 1 file changed, 9 insertions(+), 20 deletions(-)
112 +
113 +diff --git a/sniff/sniff b/sniff/sniff
114 +index 7ce67c7..84f7022 100755
115 +--- a/sniff/sniff
116 ++++ b/sniff/sniff
117 +@@ -47,25 +47,18 @@ class SniffApp(object):
118 + if os.path.exists('sniff.ui'):
119 + self.builder.add_from_file('sniff.ui')
120 + else:
121 +- import os
122 +- path = os.path.abspath(
123 +- os.path.join(__file__, os.path.pardir, os.path.pardir))
124 +- if path == '/': # in case the path is /bin/sniff
125 +- path = '/usr'
126 +- self.builder.add_from_file(path + '/share/dogtail/glade/sniff.ui')
127 ++ self.builder.add_from_file(os.path.join(
128 ++ @EPREFIX_USR@,
129 ++ 'share/dogtail/glade/sniff.ui')
130 ++ )
131 + self.app = self.builder.get_object(self.appName)
132 + try:
133 + self.app.set_icon_from_file('../icons/dogtail-head.svg')
134 + except Exception:
135 +- import os
136 +- path = os.path.abspath(
137 +- os.path.join(__file__, os.path.pardir, os.path.pardir))
138 +- if path is '/':
139 +- path = '/usr'
140 +- try:
141 +- self.app.set_icon_from_file(os.path.join(path, 'share/icons/hicolor/scalable/apps/dogtail-head.svg'))
142 +- except Exception: # fallback for wierd installations, when sniff is neither in /bin or /usr/bin
143 +- self.app.set_icon_from_file('/usr/share/icons/hicolor/scalable/apps/dogtail-head.svg')
144 ++ self.app.set_icon_from_file(os.path.join(
145 ++ @EPREFIX_USR@,
146 ++ 'share/icons/hicolor/scalable/apps/dogtail-head.svg')
147 ++ )
148 + self.setUpWidgets()
149 + self.connectSignals()
150 + self.app.show_all()
151 +@@ -656,11 +649,7 @@ def loadIcon(iconName):
152 + pixbuf = GdkPixbuf.Pixbuf.new_from_file('icons/' + iconName)
153 + except GObject.GError:
154 + import os
155 +- path = os.path.abspath(
156 +- os.path.join(__file__, os.path.pardir, os.path.pardir))
157 +- if path == '/':
158 +- path = '/usr'
159 +- iconName = os.path.join(path, 'share/dogtail/icons/', iconName)
160 ++ iconName = os.path.join(@EPREFIX_USR@, 'share/dogtail/icons/', iconName)
161 + pixbuf = GdkPixbuf.Pixbuf.new_from_file(iconName)
162 + return pixbuf
163 +
164 +--
165 +2.14.0
166 +