summaryrefslogtreecommitdiff
blob: 121b7fb6193d4c0c1dcdc960422d6901cfd8a501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="5"

inherit eutils autotools

DESCRIPTION="A real-time web log analyzer and interactive viewer that runs in a terminal"
HOMEPAGE="http://goaccess.io"
SRC_URI="http://tar.goaccess.io/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux"

IUSE="btree debug geoip getline tokyocabinet unicode"

REQUIRED_USE="btree? ( tokyocabinet )"

RDEPEND="
	sys-libs/ncurses[unicode?]
	geoip? ( dev-libs/geoip )
	!tokyocabinet? ( dev-libs/glib:2 )
	tokyocabinet? (
		dev-db/tokyocabinet
		btree? (
			app-arch/bzip2
			sys-libs/zlib
		)
	)
"
DEPEND="${RDEPEND}
	virtual/pkgconfig
"

src_prepare() {
	epatch_user
  
  epatch "${FILESDIR}/fix_libtinfo_linking.patch" # this patch is already on master branch

	# Fix path to GeoIP bases in config
	sed -e s':/usr/local:/usr:' -i config/goaccess.conf || die
}

src_configure() {
  eautoreconf -fi

	econf \
		$(use_enable debug) \
		$(use_enable geoip) \
		$(use_enable unicode utf8) \
		$(use_enable tokyocabinet tcb) \
		$(use_enable btree bzip) \
		$(use_enable btree zlib) \
    $(use_enable btree zlib) \
		$(usex tokyocabinet "--enable-tcb=$(usex btree btree memhash)" '') \
    $(use_with getline)
}