summaryrefslogtreecommitdiff
blob: 76bac758253aa7b757932a7252829916940ac99c (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-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils flag-o-matic multilib toolchain-funcs

MY_P="${PN}-v${PV//./_}"

DESCRIPTION="Open Source implementation of the ITU H.323 teleconferencing protocol, successor to OpenH323"
HOMEPAGE="http://www.h323plus.org/"
SRC_URI="mirror://sourceforge/${PN}/${PN}-v${PV//./_}.tar.gz"

IUSE="aec debug +sound +video"
SLOT="0/${PV}"
LICENSE="MPL-1.1"
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~sparc ~x86"

DEPEND=">=net-libs/ptlib-2.6.4:=[wav]
	aec? ( >=media-libs/speex-1.2_rc1 )
	sound? (
		media-sound/gsm
		dev-libs/ilbc-rfc3951
	)
	video? (
		media-libs/libtheora
		virtual/ffmpeg
	)"
RDEPEND="${DEPEND}
	!net-libs/openh323"

S="${WORKDIR}/${PN}"

src_prepare() {
	epatch "${FILESDIR}"/${PN}-1.25.0-ptrace-param.patch
	epatch "${FILESDIR}"/${PN}-1.25.0-ptrace-debugoptionlist.patch
	epatch "${FILESDIR}"/${PN}-1.25.0-ptlib-2.10.10.patch
}

src_configure() {
	# TODO: support for h.263/h.264/sbc(bluetooth)/celt/spandsp
	#export OPENH323DIR=${S}
	econf \
		PTLIB_CONFIG="${EPREFIX}/usr/bin/ptlib-config" \
		$(use_enable video) \
		$(use_enable sound audio) \
		$(use_enable aec) \
		$(use_enable debug asntracing)
	# revision.h does not exist in ptlib(?)
	sed -i "/revision.h/d" include/openh323buildopts.h || die
}

src_compile() {
	emake \
		CC="$(tc-getCC)" \
		CXX="$(tc-getCXX)" \
		AR="$(tc-getAR)"
	# these should point to the right directories,
	# openh323.org apps and others need this
	sed -i -e "s:^OH323_LIBDIR = \$(OPENH323DIR).*:OH323_LIBDIR = /usr/$(get_libdir):" \
		openh323u.mak || die
	sed -i -e "s:^OH323_INCDIR = \$(OPENH323DIR).*:OH323_INCDIR = /usr/include/openh323:" \
		openh323u.mak || die
	# this is hardcoded now?
	sed -i -e "s:^\(OPENH323DIR[ \t]\+=\) "${S}":\1 /usr/share/openh323:" \
		openh323u.mak || die
}