1 |
commit: 938211c709de4f86cc45dd6995945ce2cb0a8d59 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 1 09:26:33 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 1 10:03:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=938211c7 |
7 |
|
8 |
dev-util/dbus-test-runner: EAPI-8, python3.10, fix warnings |
9 |
|
10 |
Drop obsolete --disable-static, hard-disable bustle previously automagic. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/845927 |
13 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
.../dbus-test-runner-19.04.0-r2.ebuild | 61 ++++++++++++++++++++++ |
17 |
...t-runner-19.04.0-fix-deprecation-warnings.patch | 30 +++++++++++ |
18 |
2 files changed, 91 insertions(+) |
19 |
|
20 |
diff --git a/dev-util/dbus-test-runner/dbus-test-runner-19.04.0-r2.ebuild b/dev-util/dbus-test-runner/dbus-test-runner-19.04.0-r2.ebuild |
21 |
new file mode 100644 |
22 |
index 000000000000..5fdbf2ae6c64 |
23 |
--- /dev/null |
24 |
+++ b/dev-util/dbus-test-runner/dbus-test-runner-19.04.0-r2.ebuild |
25 |
@@ -0,0 +1,61 @@ |
26 |
+# Copyright 1999-2022 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=8 |
30 |
+ |
31 |
+PYTHON_COMPAT=( python3_{8..10} ) |
32 |
+inherit flag-o-matic python-single-r1 |
33 |
+ |
34 |
+DESCRIPTION="Run executables under a new DBus session for testing" |
35 |
+HOMEPAGE="https://launchpad.net/dbus-test-runner" |
36 |
+SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-3" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
41 |
+IUSE="test" |
42 |
+ |
43 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
44 |
+RESTRICT="!test? ( test )" |
45 |
+ |
46 |
+COMMON_DEPEND="${PYTHON_DEPS} |
47 |
+ dev-libs/dbus-glib |
48 |
+ dev-libs/glib:2 |
49 |
+" |
50 |
+DEPEND="${COMMON_DEPEND} |
51 |
+ test? ( |
52 |
+ $(python_gen_cond_dep ' |
53 |
+ dev-python/python-dbusmock[${PYTHON_USEDEP}] |
54 |
+ ') |
55 |
+ ) |
56 |
+" |
57 |
+RDEPEND="${COMMON_DEPEND} |
58 |
+ $(python_gen_cond_dep ' |
59 |
+ dev-python/python-dbusmock[${PYTHON_USEDEP}] |
60 |
+ ') |
61 |
+" |
62 |
+# hard-disabled: |
63 |
+# test? ( dev-util/bustle ) |
64 |
+BDEPEND=" |
65 |
+ dev-util/gdbus-codegen |
66 |
+ dev-util/intltool |
67 |
+" |
68 |
+ |
69 |
+PATCHES=( "${FILESDIR}"/${P}-fix-deprecation-warnings.patch ) # Debian patch |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ default |
73 |
+ |
74 |
+ # bind to specific Python version (with python-dbusmock installed) |
75 |
+ sed -i -e "s:python3:${EPYTHON}:" \ |
76 |
+ libdbustest/dbus-mock.c tests/test-libdbustest-mock.c || die |
77 |
+} |
78 |
+ |
79 |
+src_configure() { |
80 |
+ econf ac_cv_prog_have_bustle=no |
81 |
+} |
82 |
+ |
83 |
+src_install() { |
84 |
+ default |
85 |
+ find "${D}" -name '*.la' -type f -delete || die |
86 |
+} |
87 |
|
88 |
diff --git a/dev-util/dbus-test-runner/files/dbus-test-runner-19.04.0-fix-deprecation-warnings.patch b/dev-util/dbus-test-runner/files/dbus-test-runner-19.04.0-fix-deprecation-warnings.patch |
89 |
new file mode 100644 |
90 |
index 000000000000..62b731f33469 |
91 |
--- /dev/null |
92 |
+++ b/dev-util/dbus-test-runner/files/dbus-test-runner-19.04.0-fix-deprecation-warnings.patch |
93 |
@@ -0,0 +1,30 @@ |
94 |
+Description: tests: Replace deprecated g_main_{pending,iteration} with current g_main_context_{pending,iteration} |
95 |
+Author: Iain Lane <laney@××××××.org> |
96 |
+Origin: https://bazaar.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk.16.10/revision/109 |
97 |
+ |
98 |
+Index: dbus-test-runner/tests/test-libdbustest-mock.c |
99 |
+=================================================================== |
100 |
+--- dbus-test-runner.orig/tests/test-libdbustest-mock.c |
101 |
++++ dbus-test-runner/tests/test-libdbustest-mock.c |
102 |
+@@ -389,8 +389,8 @@ test_signals (void) |
103 |
+ g_assert(dbus_test_dbus_mock_object_emit_signal(mock, obj, "testsig", NULL, NULL, NULL)); |
104 |
+ |
105 |
+ g_usleep(100000); |
106 |
+- while (g_main_pending()) |
107 |
+- g_main_iteration(TRUE); |
108 |
++ while (g_main_context_pending(NULL)) |
109 |
++ g_main_context_iteration(NULL, TRUE); |
110 |
+ |
111 |
+ g_assert(signal_count == 1); |
112 |
+ |
113 |
+@@ -410,8 +410,8 @@ test_signals (void) |
114 |
+ g_assert(dbus_test_dbus_mock_object_emit_signal(mock, obj, "testsig_abc", G_VARIANT_TYPE("(sss)"), g_variant_new_parsed("('a', 'b', 'c')"), NULL)); |
115 |
+ |
116 |
+ g_usleep(100000); |
117 |
+- while (g_main_pending()) |
118 |
+- g_main_iteration(TRUE); |
119 |
++ while (g_main_context_pending(NULL)) |
120 |
++ g_main_context_iteration(NULL, TRUE); |
121 |
+ |
122 |
+ g_assert(signal_abc_count == 1); |
123 |
+ |