linkchecker-9999.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. PYTHON_REQ_USE="sqlite?"
  6. inherit bash-completion-r1 distutils-r1 eutils git-r3 multilib
  7. MY_P="${P/linkchecker/LinkChecker}"
  8. DESCRIPTION="Check websites for broken links"
  9. HOMEPAGE="https://wummel.github.com/linkchecker/ https://pypi.python.org/pypi/linkchecker/"
  10. SRC_URI=""
  11. EGIT_REPO_URI="https://github.com/wummel/linkchecker.git"
  12. LICENSE="GPL-2"
  13. SLOT="0"
  14. KEYWORDS=""
  15. IUSE="gnome sqlite X"
  16. RDEPEND="
  17. virtual/python-dnspython[${PYTHON_USEDEP}]
  18. gnome? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )
  19. X? (
  20. dev-python/PyQt4[X,help,${PYTHON_USEDEP}]
  21. dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
  22. )"
  23. DEPEND="
  24. X? (
  25. dev-qt/qthelp:4
  26. dev-python/markdown2[${PYTHON_USEDEP}]
  27. )"
  28. RESTRICT="test"
  29. python_prepare_all() {
  30. local PATCHES=(
  31. "${FILESDIR}"/${PN}-9.2-unbundle.patch
  32. "${FILESDIR}"/${PN}-9.3-bash-completion.patch
  33. "${FILESDIR}"/${PN}-9.3-desktop.patch
  34. )
  35. emake -C doc/html
  36. distutils-r1_python_prepare_all
  37. }
  38. python_install_all() {
  39. DOCS=(
  40. doc/upgrading.txt
  41. doc/python3.txt
  42. doc/changelog.txt
  43. doc/development.txt
  44. )
  45. distutils-r1_python_install_all
  46. if ! use X; then
  47. delete_gui() {
  48. rm -rf \
  49. "${ED}"/usr/bin/linkchecker-gui* \
  50. "${ED}"/$(python_get_sitedir)/linkcheck/gui* || die
  51. }
  52. python_foreach_impl delete_gui
  53. rm -f "${ED}"/usr/share/applications/linkchecker*.desktop || die
  54. fi
  55. rm -f "${ED}"/usr/share/applications/linkchecker.desktop || die
  56. newicon doc/html/logo64x64.png ${PN}.png
  57. docinto html
  58. dodoc doc/html/*
  59. newbashcomp config/linkchecker-completion ${PN}
  60. optfeature "bash-completion support" dev-python/argcomplete[${PYTHON_USEDEP}]
  61. optfeature "Virus scanning" app-antivirus/clamav
  62. optfeature "Geo IP support" dev-python/geoip-python[${PYTHON_USEDEP}]
  63. }