summaryrefslogtreecommitdiff
blob: 6856c69337a40bedf63ef7c03e0136c9a148a9b7 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools

DESCRIPTION="The Yate AV Suite"
HOMEPAGE="http://yate.null.ro/"

if [[ ${PV} == 9999 ]] ; then
	ESVN_REPO_URI="http://voip.null.ro/svn/yate/trunk"
	inherit subversion
else
	SRC_URI="http://voip.null.ro/tarballs/${PN}6/${P}-1.tar.gz"
	KEYWORDS="~amd64 ~arm ~x86"
	S="${WORKDIR}/${PN}"
fi

LICENSE="GPL-2"
SLOT="0/${PV}"
IUSE="doc cpu_flags_x86_sse2 sctp zaptel wpcard tdmcard wanpipe +ilbc +ilbc-webrtc +isac-float isac-fixed postgres mysql +gsm +speex spandsp +ssl +zlib amrnb"

RDEPEND="
	postgres? ( dev-db/postgresql:* )
	mysql? ( dev-db/mysql-connector-c:= )
	gsm? ( media-sound/gsm )
	speex? ( media-libs/speex )
	ssl? ( dev-libs/openssl:0= )
	zlib? ( sys-libs/zlib )
	ilbc? ( media-libs/libilbc:= )
	spandsp? ( >=media-libs/spandsp-0.0.3 )
"
DEPEND="${RDEPEND}"
BDEPEND="
	virtual/pkgconfig
	doc? ( app-doc/doxygen )
"

PATCHES=(
	"${FILESDIR}/${PN}-6.0.0-dont-mess-with-cflags.patch"
	"${FILESDIR}/${PN}-6.2.0-my_bool.patch"
)

src_prepare() {
	default_src_prepare
	eautoreconf
	./yate-config.sh || die
}

#fdsize, inline, rtti: keep default values
#internalregex: use system
#coredumper: not in the tree, bug 118716
#wanpipe, wphwec: not in the tree, bug 188939
#amrnb: not in tree!
#zaptel: ??
src_configure() {
	econf \
		--with-archlib=$(get_libdir) \
		--without-libqt4 \
		$(use_enable cpu_flags_x86_sse2 sse2) \
		$(use_enable sctp) \
		--disable-dahdi \
		$(use_enable zaptel) \
		$(use_enable wpcard) \
		$(use_enable tdmcard) \
		$(use_enable wanpipe) \
		$(use_enable ilbc) \
		$(use_enable ilbc-webrtc) \
		$(use_enable isac-float) \
		$(use_enable isac-fixed) \
		$(use_with postgres libpq) \
		$(use_with mysql) \
		$(use_with gsm libgsm) \
		$(use_with speex libspeex) \
		$(use_with amrnb) \
		$(use_with spandsp) \
		$(use_with ssl openssl)
}

src_compile() {
	emake -j1
}

src_install() {
	if use doc; then
		emake DESTDIR="${ED}" install
	else
		emake DESTDIR="${ED}" install-noapi
	fi
	newinitd "${FILESDIR}"/yate.initd yate
	newconfd "${FILESDIR}"/yate.confd yate
}