You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit autotools
  5. DESCRIPTION="A curses-based tool for viewing and analyzing log files"
  6. HOMEPAGE="https://lnav.org"
  7. SRC_URI="https://github.com/tstack/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="BSD-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="unicode test"
  12. RESTRICT="!test? ( test )"
  13. RDEPEND="
  14. app-arch/bzip2:0=
  15. app-arch/libarchive:=
  16. test? ( dev-cpp/doctest )
  17. >=dev-db/sqlite-3.9.0
  18. dev-libs/libpcre[cxx]
  19. >=net-misc/curl-7.23.0
  20. sys-libs/ncurses:=[unicode(+)?]
  21. sys-libs/readline:0=
  22. sys-libs/zlib:0="
  23. DEPEND="${RDEPEND}"
  24. DOCS=( AUTHORS NEWS README )
  25. PATCHES=(
  26. "${FILESDIR}"/${PN}-0.10.0-disable-tests.patch
  27. "${FILESDIR}"/${PN}-0.10.0-disable-remote-tests.patch
  28. # This allows us to use the --with-system-doctest configure flag, and should not be needed in
  29. # the next release of lnav. See https://github.com/tstack/lnav/pull/915
  30. # This patch isn't completely identical to the one in PR #915 because that patch was too large
  31. # for repoman's tastes. See the comment in src_prepare() for how I applied the rest of this
  32. # patch with rm and a heredoc.
  33. # https://bugs.gentoo.org/812353
  34. "${FILESDIR}"/${PN}-0.10.0-use-system-doctest.patch
  35. )
  36. src_prepare() {
  37. # repoman didn't like having a ~500 kiB patch file, so I'm just manually removing the doctest we
  38. # don't want (the bundled one) and putting the one we do want here.
  39. # We won't need this once we get rid of lnav-0.10.0-use-system-doctest.patch
  40. cat <<EOF > src/doctest.hh
  41. #include "config.h"
  42. #include DOCTEST_HEADER
  43. EOF
  44. # We won't need this once we get rid of lnav-0.10.0-use-system-doctest.patch
  45. touch src/doctest_vendored.hh
  46. default
  47. eautoreconf
  48. }
  49. src_configure() {
  50. econf \
  51. --disable-static \
  52. $(use_with test system-doctest) \
  53. $(use_with unicode ncursesw)
  54. }