summaryrefslogtreecommitdiff
path: root/net-im/toxic/toxic-9999.ebuild
blob: dbb19fd156450925a77358f13e76f8a88a356f44 (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-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit autotools git-2 toolchain-funcs

DESCRIPTION="CLI Frontend for Tox"
HOMEPAGE="http://wiki.tox.im/Toxic"
SRC_URI=""
EGIT_REPO_URI="git://github.com/Tox/toxic
	https://github.com/Tox/toxic"

LICENSE="GPL-3"
SLOT="0"
IUSE="+libnotify +sound-notify"

RDEPEND="
	dev-libs/libconfig
	net-libs/tox[av]
	media-libs/openal
	sys-libs/ncurses
	x11-libs/libX11
	libnotify? ( x11-libs/libnotify )
	sound-notify? ( media-libs/freealut )"
DEPEND="${RDEPEND}
	app-text/asciidoc
	virtual/pkgconfig"

src_prepare() {
	# verbose build
	sed -i \
		-e 's/@$(CC)/$(CC)/' \
		build/Makefile || die
	epatch_user
}

src_compile() {
	use libnotify || export NOTIFY="DISABLE_DESKTOP_NOTIFY=1"
	use sound-notify || export SOUND_NOTIFY="DISABLE_SOUND_NOTIFY=1"
	emake \
		CC="$(tc-getCC)" \
		USER_CFLAGS="${CFLAGS}" \
		USER_LDFLAGS="${LDFLAGS}" \
		PREFIX="/usr" ${NOTIFY} ${SOUND_NOTIFY} \
		-C build
}

src_install() {
	emake install PREFIX="/usr" DESTDIR="${D}" -C build
}

pkg_postinst() {
	elog "DHT node list is available in /usr/share/${PN}/DHTnodes"
}