12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- # Copyright 1999-2019 Gentoo Authors
- # Distributed under the terms of the GNU General Public License v2
- EAPI=7
- PYTHON_COMPAT=( python3_{4,5,6,7,8,9} )
- inherit meson udev python-any-r1
- DESCRIPTION="Library to configure gaming mice"
- HOMEPAGE="https://github.com/libratbag/libratbag"
- SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- LICENSE="MIT"
- SLOT="0"
- KEYWORDS="~amd64 ~x86"
- IUSE="+systemd elogind doc test"
- RESTRICT="!test? ( test )"
- #REQUIRED_USE="${PYTHON_REQUIRED_USE}"
- DEPEND="${PYTHON_DEPS}
- virtual/pkgconfig
- doc? ( app-doc/doxygen )
- systemd? ( sys-apps/systemd )
- elogind? ( sys-auth/elogind )
- "
- RDEPEND="
- dev-libs/libevdev
- virtual/libudev
- "
- src_prepare() {
- default
- if use systemd && use elogind; then
- eerror "You can not have both systemd and elogind support, they are mutually exclusive !"
- die "Please unset one of them."
- fi
- sed '/default:/d' -i meson_options.txt || die
- }
- pkg_setup() {
- python-any-r1_pkg_setup
- }
- src_configure() {
- #python_setup 'python3'
- local emesonargs=(
- -Ddocumentation=$(usex doc true false)
- -Dtests=$(usex test true false)
- -Dudev-dir=$(get_udevdir)
- -Dsystemd=$(usex systemd true false)
- -Dlogind-provider=$(usex systemd systemd elogind)
- )
- meson_src_configure
- }
|