1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT
=( python3_
{9.
.12} )
8 inherit meson python-single-r1 systemd udev
10 DESCRIPTION
="Library to configure gaming mice"
11 HOMEPAGE
="https://github.com/libratbag/libratbag"
13 SRC_URI
="https://github.com/libratbag/libratbag/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
17 KEYWORDS
="~amd64 ~x86"
18 IUSE
="doc elogind systemd test"
20 ${PYTHON_REQUIRED_USE}
21 ^^ ( elogind systemd )
23 RESTRICT
="mirror !test? ( test )"
30 $(python_gen_cond_dep '
31 dev-python/sphinx[${PYTHON_USEDEP}]
32 dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
37 dev-libs/gobject-introspection
39 $(python_gen_cond_dep '
40 dev-python/pygobject:3[${PYTHON_USEDEP}]
41 dev-python/evdev[${PYTHON_USEDEP}]
51 dev-libs/libunistring:=
53 $(python_gen_cond_dep '
54 dev-python/pygobject:3[${PYTHON_USEDEP}]
55 dev-python/evdev[${PYTHON_USEDEP}]
57 elogind? ( sys-auth/elogind )
58 systemd? ( sys-apps/systemd )
62 dev-libs/gobject-introspection
69 # Fix systemd includes for elogind
70 sed -i -e 's@include <systemd@include <elogind@' \
71 ratbagd
/ratbag
*.c || die
79 $
(meson_use doc documentation
)
81 $
(meson_use
test tests
)
82 -Ddbus-group="plugdev"
83 -Dlogind-provider=$
(usex elogind elogind systemd
)
84 -Dsystemd-unit-dir="$(systemd_get_systemunitdir)"
85 -Dudev-dir="${EPREFIX}$(get_udevdir)"
93 python_fix_shebang
"${ED}"/usr
/bin
/
94 newinitd
"${FILESDIR}"/ratbagd.init ratbagd
98 if [[ -z "${REPLACING_VERSIONS}" ]] ; then
99 elog
'You need to be in "plugdev" group in order to access the'
100 elog
'ratbagd dbus interface'
102 elog
'You may be required to create and/or be part of the "games" group if you intend on using piper'