summaryrefslogtreecommitdiff
blob: 24e91e7af1272b4fd9495740f706311086830640 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-funcs

DESCRIPTION="ncurses directconnect client"
HOMEPAGE="https://dev.yorhel.nl/ncdc"
if [[ "${PV}" == *9999 ]] ; then
	inherit autotools git-r3
	EGIT_REPO_URI="git://g.blicky.net/ncdc.git"
else
	SRC_URI="https://dev.yorhel.nl/download/${P}.tar.gz"
	KEYWORDS="amd64 ~ppc ~sparc x86"
fi

LICENSE="MIT"
SLOT="0"
IUSE="geoip"

RDEPEND="
	app-arch/bzip2
	dev-db/sqlite:3
	dev-libs/glib:2
	net-libs/gnutls:=
	sys-libs/ncurses:0=[unicode]
	sys-libs/zlib:=
	geoip? (
		dev-libs/geoip
		dev-libs/libmaxminddb
	)"
DEPEND="${RDEPEND}"
BDEPEND="
	dev-util/makeheaders
	virtual/pkgconfig
"

src_prepare() {
	default
	[[ "${PV}" == *9999 ]] && eautoreconf
}

src_configure() {
	local myeconfargs=(
		$(use_with geoip)
	)
	if [[ "${PV}" == *9999 ]] ; then
		myeconfargs+=( --enable-git-version )
	fi
	econf "${myeconfargs[@]}"
}

src_compile() {
	emake AR="$(tc-getAR)"
}