screenkey-1.5_p20230109.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. DISTUTILS_USE_PEP517=setuptools
  5. PYTHON_COMPAT=(python3_{10..12})
  6. inherit distutils-r1 xdg
  7. DESCRIPTION="A screencast tool to display your keys inspired by Screenflick"
  8. HOMEPAGE="https://www.thregr.org/~wavexx/software/screenkey"
  9. if [[ ${PV} == *_p20230109 ]] ; then
  10. COMMIT=7bdba66574244061c6e1934c4f204d02d570f182
  11. SRC_URI="https://gitlab.com/${PN}/${PN}/-/archive/${COMMIT}/${PN}-${COMMIT}.tar.bz2
  12. -> ${P}.tar.bz2"
  13. S="${WORKDIR}"/${PN}-${COMMIT}
  14. else
  15. SRC_URI="https://gitlab.com/${PN}/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2
  16. -> ${P}.tar.bz2"
  17. S="${WORKDIR}"/${PN}-v${PV}
  18. fi
  19. KEYWORDS="amd64 ~x86"
  20. RESTRICT="test"
  21. LICENSE="GPL-3"
  22. SLOT="0"
  23. IUSE="appindicator dbus"
  24. BDEPEND="
  25. dev-python/Babel[${PYTHON_USEDEP}]
  26. dev-python/wheel[${PYTHON_USEDEP}]
  27. "
  28. RDEPEND="
  29. dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
  30. appindicator? ( dev-libs/libappindicator:3[introspection] )
  31. dev-python/pycairo[${PYTHON_USEDEP}]
  32. dev-python/pygobject[cairo,${PYTHON_USEDEP}]
  33. x11-libs/gtk+:3[X,introspection]
  34. x11-misc/slop
  35. "
  36. src_prepare() {
  37. xdg_environment_reset
  38. sed -e "/share\/doc/s/${PN}/${P}/" -i setup.py \
  39. || die 'sed failed'
  40. use dbus || eapply "${FILESDIR}/no-dbus-${PV}.patch"
  41. default
  42. }