libratbag-0.16.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2019 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  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. virtual/libudev
  19. dev-lang/swig
  20. dev-libs/glib
  21. dev-libs/libevdev
  22. dev-python/python-evdev
  23. dev-libs/json-glib
  24. dev-libs/libunistring
  25. "
  26. RDEPEND="
  27. dev-libs/libevdev
  28. virtual/libudev
  29. "
  30. src_prepare() {
  31. default
  32. if use systemd && use elogind; then
  33. eerror "You can not have both systemd and elogind support, they are mutually exclusive !"
  34. die "Please unset one of them."
  35. fi
  36. sed '/default:/d' -i meson_options.txt || die
  37. }
  38. pkg_setup() {
  39. python-any-r1_pkg_setup
  40. }
  41. src_configure() {
  42. #python_setup 'python3'
  43. local emesonargs=(
  44. -Ddocumentation=$(usex doc true false)
  45. -Dtests=$(usex test true false)
  46. -Dudev-dir=$(get_udevdir)
  47. -Dsystemd=$(usex systemd true false)
  48. -Dlogind-provider=$(usex systemd systemd elogind)
  49. )
  50. meson_src_configure
  51. }