libratbag-0.13.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2019 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_COMPAT=( python3_{4,5,6,7,8,9} )
  5. inherit meson udev python-any-r1
  6. DESCRIPTION="Library to configure gaming mice"
  7. HOMEPAGE="https://github.com/libratbag/libratbag"
  8. SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="MIT"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="+systemd elogind doc test"
  13. RESTRICT="!test? ( test )"
  14. #REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  15. DEPEND="${PYTHON_DEPS}
  16. virtual/pkgconfig
  17. doc? ( app-doc/doxygen )
  18. systemd? ( sys-apps/systemd )
  19. elogind? ( sys-auth/elogind )
  20. "
  21. RDEPEND="
  22. dev-libs/libevdev
  23. virtual/libudev
  24. "
  25. src_prepare() {
  26. default
  27. if use systemd && use elogind; then
  28. eerror "You can not have both systemd and elogind support, they are mutually exclusive !"
  29. die "Please unset one of them."
  30. fi
  31. sed '/default:/d' -i meson_options.txt || die
  32. }
  33. pkg_setup() {
  34. python-any-r1_pkg_setup
  35. }
  36. src_configure() {
  37. #python_setup 'python3'
  38. local emesonargs=(
  39. -Ddocumentation=$(usex doc true false)
  40. -Dtests=$(usex test true false)
  41. -Dudev-dir=$(get_udevdir)
  42. -Dsystemd=$(usex systemd true false)
  43. -Dlogind-provider=$(usex systemd systemd elogind)
  44. )
  45. meson_src_configure
  46. }