retext-4.1.3.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python3_4 )
  5. PLOCALES="ca cs cy da de es et eu fr it ja pl pt pt_BR ru sk uk zh_CN zh_TW"
  6. inherit distutils-r1 l10n
  7. MY_PN="ReText"
  8. MY_P="${MY_PN}-${PV/_/~}"
  9. if [[ ${PV} == *9999* ]] ; then
  10. inherit git-2
  11. EGIT_REPO_URI="git://git.code.sf.net/p/retext/git"
  12. KEYWORDS=""
  13. else
  14. SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
  15. KEYWORDS="amd64 x86"
  16. fi
  17. DESCRIPTION="A Qt-based text editor for Markdown and reStructuredText"
  18. HOMEPAGE="https://sourceforge.net/p/retext/home/ReText/"
  19. LICENSE="GPL-2"
  20. SLOT="0"
  21. IUSE="+spell"
  22. RDEPEND+="
  23. dev-python/docutils[${PYTHON_USEDEP}]
  24. dev-python/markdown[${PYTHON_USEDEP}]
  25. <dev-python/markups-2[${PYTHON_USEDEP}]
  26. dev-python/PyQt4[webkit,${PYTHON_USEDEP}]
  27. spell? ( dev-python/pyenchant[${PYTHON_USEDEP}] )
  28. "
  29. S="${WORKDIR}"/${MY_P}
  30. remove_locale() {
  31. find "${ED}" -name "retext_${1}.qm" -delete || die "Failed to remove locale ${1}."
  32. }
  33. python_install_all() {
  34. distutils-r1_python_install_all
  35. newicon {icons/,}${PN}.png
  36. newicon {icons/,}${PN}.svg
  37. l10n_for_each_disabled_locale_do remove_locale
  38. make_desktop_entry ${PN} "${MY_PN} Editor" ${PN} "Development;Utility;TextEditor"
  39. }