Diff playerctl-2.4.1 with a playerctl-2.4.1-r1

/usr/portage/media-sound/playerctl/playerctl-2.4.1-r1.ebuild 2023-10-09 14:52:31.796368408 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit bash-completion-r1 meson xdg
6
PYTHON_COMPAT=( python3_{10..11} )
7
inherit bash-completion-r1 meson python-any-r1 virtualx xdg-utils
7 8

  
8 9
DESCRIPTION="A CLI utility to control media players over MPRIS"
9 10
HOMEPAGE="https://github.com/acrisci/playerctl"
......
11 12

  
12 13
LICENSE="LGPL-3+"
13 14
SLOT="0"
14
KEYWORDS="~amd64 ~arm64 ~x86"
15
IUSE="doc introspection"
16
RESTRICT="test" # Seems to want a system bus, rather than a session one?
15
KEYWORDS="amd64 ~x86"
16
IUSE="doc introspection test"
17
RESTRICT="!test? ( test )"
17 18

  
18 19
RDEPEND="
19 20
	>=dev-libs/glib-2.38:2
......
25 26
	dev-util/glib-utils
26 27
	virtual/pkgconfig
27 28
	doc? ( dev-util/gtk-doc )
29
	introspection? ( dev-libs/gobject-introspection )
30
	test? (
31
		${PYTHON_DEPS}
32
		sys-apps/dbus
33
		$(python_gen_any_dep '
34
			dev-python/dbus-next[${PYTHON_USEDEP}]
35
			dev-python/pytest[${PYTHON_USEDEP}]
36
			dev-python/pytest-asyncio[${PYTHON_USEDEP}]
37
			dev-python/pytest-timeout[${PYTHON_USEDEP}]
38
		')
39
	)
28 40
"
29 41

  
42
EPYTEST_DESELECT=(
43
	# Requires a lenient dbus config systemwide
44
	# See test/data/dbus-system.conf and how its used in Dockerfile
45
	"test/test_basics.py::test_system_list_players"
46
	# Daemon tests are inconsistent, occasional failure occurs in upstream CI as well.
47
	"test/test_daemon.py"
48
)
49

  
50
python_check_deps() {
51
	python_has_version \
52
		"dev-python/dbus-next[${PYTHON_USEDEP}]" \
53
		"dev-python/pytest[${PYTHON_USEDEP}]" \
54
		"dev-python/pytest-asyncio[${PYTHON_USEDEP}]" \
55
		"dev-python/pytest-timeout[${PYTHON_USEDEP}]"
56
}
57

  
58
pkg_setup() {
59
	use test && python-any-r1_pkg_setup
60
}
61

  
30 62
src_configure() {
31 63
	local emesonargs=(
32 64
		-Ddatadir=share
......
41 73
	meson_src_configure
42 74
}
43 75

  
76
src_test() {
77
	local dbus_params=(
78
		$(dbus-daemon --session --print-address --fork --print-pid)
79
	)
80
	local -x DBUS_SESSION_BUS_ADDRESS=${dbus_params[0]}
81

  
82
	export PATH="${BUILD_DIR}/playerctl/:${PATH}"
83

  
84
	virtx epytest --asyncio-mode=auto
85

  
86
	kill "${dbus_params[1]}" || die
87
}
88

  
44 89
src_install() {
45 90
	meson_src_install
46 91

  
Thank you!