mirror of
https://notabug.org/Sages-of-Gensokyo/gensokyo_kappa-overlay
synced 2024-10-21 04:01:13 +02:00
58 lines
1.2 KiB
Bash
58 lines
1.2 KiB
Bash
# Copyright 1999-2019 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=6
|
|
|
|
PYTHON_COMPAT=( python3_{4,5,6,7} )
|
|
|
|
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
|
|
}
|