commit:     938211c709de4f86cc45dd6995945ce2cb0a8d59
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 09:26:33 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 10:03:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=938211c7

dev-util/dbus-test-runner: EAPI-8, python3.10, fix warnings

Drop obsolete --disable-static, hard-disable bustle previously automagic.

Closes: https://bugs.gentoo.org/845927
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../dbus-test-runner-19.04.0-r2.ebuild             | 61 ++++++++++++++++++++++
 ...t-runner-19.04.0-fix-deprecation-warnings.patch | 30 +++++++++++
 2 files changed, 91 insertions(+)

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
new file mode 100644
index 000000000000..5fdbf2ae6c64
--- /dev/null
+++ b/dev-util/dbus-test-runner/dbus-test-runner-19.04.0-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit flag-o-matic python-single-r1
+
+DESCRIPTION="Run executables under a new DBus session for testing"
+HOMEPAGE="https://launchpad.net/dbus-test-runner";
+SRC_URI="https://launchpad.net/${PN}/$(ver_cut 
1-2)/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+       dev-libs/dbus-glib
+       dev-libs/glib:2
+"
+DEPEND="${COMMON_DEPEND}
+       test? (
+               $(python_gen_cond_dep '
+                       dev-python/python-dbusmock[${PYTHON_USEDEP}]
+               ')
+       )
+"
+RDEPEND="${COMMON_DEPEND}
+       $(python_gen_cond_dep '
+               dev-python/python-dbusmock[${PYTHON_USEDEP}]
+       ')
+"
+# hard-disabled:
+#      test? ( dev-util/bustle )
+BDEPEND="
+       dev-util/gdbus-codegen
+       dev-util/intltool
+"
+
+PATCHES=( "${FILESDIR}"/${P}-fix-deprecation-warnings.patch ) # Debian patch
+
+src_prepare() {
+       default
+
+       # bind to specific Python version (with python-dbusmock installed)
+       sed -i -e "s:python3:${EPYTHON}:" \
+               libdbustest/dbus-mock.c tests/test-libdbustest-mock.c || die
+}
+
+src_configure() {
+       econf ac_cv_prog_have_bustle=no
+}
+
+src_install() {
+       default
+       find "${D}" -name '*.la' -type f -delete || die
+}

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
new file mode 100644
index 000000000000..62b731f33469
--- /dev/null
+++ 
b/dev-util/dbus-test-runner/files/dbus-test-runner-19.04.0-fix-deprecation-warnings.patch
@@ -0,0 +1,30 @@
+Description: tests: Replace deprecated g_main_{pending,iteration} with current 
g_main_context_{pending,iteration}
+Author: Iain Lane <la...@debian.org>
+Origin: 
https://bazaar.launchpad.net/~indicator-applet-developers/dbus-test-runner/trunk.16.10/revision/109
+
+Index: dbus-test-runner/tests/test-libdbustest-mock.c
+===================================================================
+--- dbus-test-runner.orig/tests/test-libdbustest-mock.c
++++ dbus-test-runner/tests/test-libdbustest-mock.c
+@@ -389,8 +389,8 @@ test_signals (void)
+       g_assert(dbus_test_dbus_mock_object_emit_signal(mock, obj, "testsig", 
NULL, NULL, NULL));
+ 
+       g_usleep(100000);
+-      while (g_main_pending())
+-              g_main_iteration(TRUE);
++      while (g_main_context_pending(NULL))
++              g_main_context_iteration(NULL, TRUE);
+ 
+       g_assert(signal_count == 1);
+ 
+@@ -410,8 +410,8 @@ test_signals (void)
+       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));
+ 
+       g_usleep(100000);
+-      while (g_main_pending())
+-              g_main_iteration(TRUE);
++      while (g_main_context_pending(NULL))
++              g_main_context_iteration(NULL, TRUE);
+ 
+       g_assert(signal_abc_count == 1);
+ 

Reply via email to