summaryrefslogtreecommitdiff
path: root/net-im/utox/utox-9999.ebuild
blob: 77c583a8df10dcd79bdf3fc600ed8aff2e2d7c54 (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
60
61
62
63
64
65
66
67
68
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit eutils fdo-mime git-2 gnome2-utils toolchain-funcs

DESCRIPTION="Lightweight Tox client"
HOMEPAGE="https://github.com/notsecure/uTox"
EGIT_REPO_URI="git://github.com/notsecure/uTox.git
	https://github.com/notsecure/uTox.git"

LICENSE="GPL-3"
SLOT="0"
IUSE="+dbus +filter_audio"

RDEPEND="net-libs/tox[av]
	media-libs/freetype
	filter_audio? ( media-libs/libfilteraudio )
	media-libs/libv4l
	media-libs/libvpx
	media-libs/openal
	x11-libs/libX11
	x11-libs/libXext
	dbus? ( sys-apps/dbus )"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

src_prepare() {
	epatch_user
}

src_configure() {
	if use filter_audio && [ "${PROFILE_IS_HARDENED}" = 1 ]; then
		ewarn "Building µTox with support for filter_audio using hardened profile results in"
		ewarn "crash upon start. For details, see https://github.com/notsecure/uTox/issues/844"
	fi
	# respect CFLAGS
	sed -i \
		-e '/CFLAGS/s# -g ##' \
		Makefile || die
}

src_compile() {
	emake \
		CC="$(tc-getCC)" \
		DBUS=$(usex dbus "1" "0") \
		FILTER_AUDIO=$(usex filter_audio "1" "0")
}

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

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	fdo-mime_desktop_database_update
	gnome2_icon_cache_update
}

pkg_postrm() {
	fdo-mime_desktop_database_update
	gnome2_icon_cache_update
}