summaryrefslogtreecommitdiff
path: root/net-libs/ptlib/ptlib-9999.ebuild
blob: aa08f93362597feaed22ea646e9e1083db517c9e (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="1"

inherit eutils subversion autotools

DESCRIPTION="Network focused portable C++ class library providing high level functions"
HOMEPAGE="http://www.opalvoip.org/"
SRC_URI=""

ESVN_REPO_URI="https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/trunk"
ESVN_STORE_DIR="${DISTDIR}/svn-src"
ESVN_PROJECT="${PN/-svn}"
#ESVN_BOOTSTRAP="./autogen.sh"

S="${WORKDIR}/${P/_/}"

LICENSE="MPL-1.0"
SLOT=""
KEYWORDS=""
IUSE="alsa bsdvideo debug doc esd ieee1394 ipv6 ldap minimal noaudio novideo oss
sasl sdl ssl sunaudio v4l v4l2 xml +exceptions +plugins opal"

RDEPEND="alsa? ( media-libs/alsa-lib )
	esd? ( media-sound/esound )
	ieee1394? ( media-libs/libdv
		sys-libs/libavc1394
		media-libs/libdc1394:1 )
	ldap? ( net-nds/openldap )
	sasl? ( dev-libs/cyrus-sasl:2 )
	sdl? ( media-libs/libsdl )
	ssl? ( dev-libs/openssl )
	xml? ( dev-libs/expat )"
DEPEND="${RDEPEND}
	sys-devel/bison
	sys-devel/flex
	v4l? ( sys-kernel/linux-headers )
	v4l2? ( sys-kernel/linux-headers )
	!dev-libs/pwlib"

src_unpack() {
	subversion_src_unpack
	cd "${S}"
#	eautoreconf

	# this patch fixes bugs: #145424 and #140358
#	epatch "${FILESDIR}"/${PN}-asm.patch
}

src_compile() {
	local myconf=""
	local makeopts=""

	use noaudio && myconf="${myconf} --disable-audio"
	use novideo && myconf="${myconf} --disable-video"

	econf \
		${myconf} \
		$(use_enable alsa) \
		$(use_enable bsdvideo) \
		$(use_enable debug exceptions) \
		$(use_enable debug memcheck) \
		$(use_enable esd) \
		$(use_enable ieee1394 avc) \
		$(use_enable ieee1394 dc) \
		$(use_enable ipv6) \
		$(use_enable ldap openldap) \
		$(use_enable minimal minsize) \
		$(use_enable oss) \
		$(use_enable sasl) \
		$(use_enable sdl) \
		$(use_enable ssl openssl) \
		$(use_enable sunaudio) \
		$(use_enable v4l) \
		$(use_enable v4l2) \
		$(use_enable xml expat) \
		$(use_enable exceptions) \
		$(use_enable plugins) \
		$(use_enable opal) \
		|| die "econf failed"

	if use debug; then
		makeopts="${makeopts} DEBUG=1 debug"
	fi

	emake ${makeopts} || die "emake failed"
}

src_install() {
	local makeopts

	makeopts="PREFIX=/usr DESTDIR=\"${D}\""

	if use debug; then
		makeopts="${makeopts} DEBUG=1"
	fi

	emake ${makeopts} install || die "emake install failed"

#	if use doc; then
#		dohtml -r html/* || die "documentation installation failed"
#	fi

#	dodoc ReadMe.txt ReadMe_QOS.txt History.txt || die "documentation
# installation failed"
}