Backbone's Portage overlay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.6 KiB

  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_COMPAT=( python3_{6,7,8} )
  5. DISTUTILS_USE_SETUPTOOLS=no
  6. inherit desktop distutils-r1 xdg-utils
  7. if [[ ${PV} != *9999* ]]; then
  8. KEYWORDS="~amd64 ~arm64 ~x86"
  9. SRC_URI="https://www.mercurial-scm.org/release/tortoisehg/targz/${P}.tar.gz"
  10. HG_DEPEND=">=dev-vcs/mercurial-5.4
  11. <dev-vcs/mercurial-5.7"
  12. else
  13. inherit mercurial
  14. EHG_REPO_URI="https://foss.heptapod.net/mercurial/tortoisehg/thg"
  15. EHG_REVISION="stable"
  16. HG_DEPEND=">=dev-vcs/mercurial-5.4"
  17. fi
  18. DESCRIPTION="Set of graphical tools for Mercurial"
  19. HOMEPAGE="https://tortoisehg.bitbucket.io/"
  20. LICENSE="GPL-2"
  21. SLOT="0"
  22. RDEPEND="
  23. ${HG_DEPEND}
  24. dev-python/iniparse[${PYTHON_USEDEP}]
  25. dev-python/pygments[${PYTHON_USEDEP}]
  26. dev-python/PyQt5[network,svg,${PYTHON_USEDEP}]
  27. >=dev-python/qscintilla-python-2.9.4[qt5(+),${PYTHON_USEDEP}]
  28. "
  29. DEPEND="${RDEPEND}"
  30. distutils_enable_sphinx doc/source
  31. python_prepare_all() {
  32. # Remove file that collides with >=mercurial-4.0 (bug #599266).
  33. rm "${S}"/hgext3rd/__init__.py || die "can't remove /hgext3rd/__init__.py"
  34. distutils-r1_python_prepare_all
  35. }
  36. python_install_all() {
  37. distutils-r1_python_install_all
  38. dodoc doc/ReadMe*.txt doc/TODO contrib/mergetools.rc
  39. newicon -s scalable icons/scalable/apps/thg.svg thg_logo.svg
  40. domenu contrib/thg.desktop
  41. }
  42. pkg_postinst() {
  43. xdg_icon_cache_update
  44. elog "When startup of ${PN} fails with an API version mismatch error"
  45. elog "between dev-python/sip and dev-python/PyQt5 please rebuild"
  46. elog "dev-python/qscintilla-python."
  47. }
  48. pkg_postrm() {
  49. xdg_icon_cache_update
  50. }