gitstats-0_pre20201124-r1.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_COMPAT=( python3_{9..13} )
  5. inherit python-r1
  6. DESCRIPTION="Statistics generator for git [temporary ebuild, until an official update"
  7. HOMEPAGE="http://gitstats.sourceforge.net/"
  8. SRC_URI="https://github.com/gktrk/gitstats/archive/${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="|| ( GPL-2 GPL-3 ) MIT"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  13. RDEPEND="
  14. ${PYTHON_DEPS}
  15. sci-visualization/gnuplot[gd]
  16. dev-vcs/git"
  17. DEPEND="
  18. ${PYTHON_DEPS}
  19. "
  20. BDEPEND="
  21. dev-lang/perl:*
  22. "
  23. DOCS=( doc/{AUTHOR,README,TODO.txt} )
  24. src_prepare() {
  25. eapply "${FILESDIR}"/${P}.patch
  26. sed \
  27. -e "s:basedirs = \[binarypath, secondarypath, '/usr/share/gitstats'\]:basedirs = \['${EPREFIX}/usr/share/gitstats'\]:g" \
  28. -i gitstats || die "failed to fix static files path"
  29. default
  30. }
  31. src_compile() {
  32. emake VERSION="${PV}" man
  33. }
  34. src_install() {
  35. emake PREFIX="${ED}"/usr VERSION="${PV}" install
  36. doman doc/${PN}.1
  37. einstalldocs
  38. python_replicate_script "${ED}"/usr/bin/${PN}
  39. }