summaryrefslogtreecommitdiff
blob: 8330ca2effc7bf95129348bfe700e79b4010dced (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit autotools git-r3

DESCRIPTION="Linux Call Router"
HOMEPAGE="http://isdn.eversberg.eu/"
EGIT_REPO_URI="git://git.misdn.eu/lcr.git"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="asterisk +ssl +gsm-bs +gsm-ms ss5 +sip gsmhr misdn"

DEPEND="
	media-libs/opencore-amr
	asterisk? ( net-misc/asterisk )
	ssl? ( dev-libs/openssl )
	gsm-bs? ( net-wireless/openbsc )
	sip? ( net-libs/sofia-sip )
	gsm-ms? ( net-wireless/osmocom-bb )
"
	#mdisn? ( net-misc/misdn )
RDEPEND="${DEPEND}"

src_prepare() {
	sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:' "${S}"/libgsmhr/fetch_sources.py
	eautoreconf
}

src_configure() {
	CXXFLAGS="$CXXFLAGS -I./include" CFLAGS="$CFLAGS -I./include" econf \
		$(use_with asterisk) \
		$(use_with ssl) \
		$(use_with gsm-bs) \
		$(use_with gsm-ms) \
		$(use_with ss5) \
		$(use_with sip) \
		$(use_with misdn) \
		$(use_enable gsmhr)
}

src_compile() {
	emake -j1
}

pkg_postinst() {
	use gsmhr || return
	ewarn "You have enabled the gsmhr use flag, for the GSM half-rate"
	ewarn "codec. This is strongly discouraged, except for testing,"
	ewarn "because of extremely high CPU usage."
}