newsbeuter-2.9-r2.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. PATCHES=(
  38. "${FILESDIR}"/${PN}-2.9-ncurses6.patch
  39. "${FILESDIR}"/${PN}-2.9-fix-mem-leak.patch
  40. "${FILESDIR}"/${PN}-2.9-fix-segfault.patch
  41. )
  42. src_prepare() {
  43. default
  44. sed -i 's:-ggdb::' Makefile || die
  45. }
  46. src_configure() {
  47. ./config.sh || die
  48. }
  49. src_compile() {
  50. emake prefix="/usr" CXX="$(tc-getCXX)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
  51. [[ ${PV} == 9999 ]] && emake doc
  52. }
  53. src_test() {
  54. emake test
  55. # Tests fail if in ${S} rather than in ${S}/test
  56. cd "${S}"/test || die
  57. ./test || die
  58. }
  59. src_install() {
  60. emake DESTDIR="${D}" prefix="/usr" docdir="/usr/share/doc/${PF}" install
  61. dodoc AUTHORS README CHANGES
  62. }