newsbeuter-9999.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. if [[ ${PV} == 9999 ]]; then
  5. inherit git-r3
  6. EGIT_REPO_URI="https://github.com/akrennmair/newsbeuter.git"
  7. else
  8. KEYWORDS="~amd64 ~ppc ~x86"
  9. SRC_URI="http://www.newsbeuter.org/downloads/${P}.tar.gz"
  10. fi
  11. inherit toolchain-funcs
  12. DESCRIPTION="A RSS/Atom feed reader for the text console"
  13. HOMEPAGE="http://www.newsbeuter.org/index.html"
  14. LICENSE="MIT"
  15. SLOT="0"
  16. IUSE="test"
  17. RDEPEND="
  18. >=dev-db/sqlite-3.5:3
  19. >=dev-libs/stfl-0.21
  20. >=net-misc/curl-7.18.0
  21. >=dev-libs/json-c-0.11:=
  22. dev-libs/libxml2
  23. sys-libs/ncurses:0=[unicode]
  24. "
  25. DEPEND="${RDEPEND}
  26. dev-lang/perl
  27. virtual/pkgconfig
  28. sys-devel/gettext
  29. test? (
  30. dev-libs/boost
  31. sys-devel/bc
  32. )
  33. "
  34. [[ ${PV} == 9999 ]] && DEPEND+=" app-text/asciidoc"
  35. # tests require network access
  36. RESTRICT="test"
  37. src_prepare() {
  38. default
  39. sed -i 's:-ggdb::' Makefile || die
  40. }
  41. src_configure() {
  42. ./config.sh || die
  43. }
  44. src_compile() {
  45. emake prefix="/usr" CXX="$(tc-getCXX)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
  46. [[ ${PV} == 9999 ]] && emake doc
  47. }
  48. src_test() {
  49. emake test
  50. # Tests fail if in ${S} rather than in ${S}/test
  51. cd "${S}"/test || die
  52. ./test || die
  53. }
  54. src_install() {
  55. emake DESTDIR="${D}" prefix="/usr" docdir="/usr/share/doc/${PF}" install
  56. dodoc AUTHORS CHANGES README.md TODO
  57. }