blob: 4c102fb93daba44764e45d1072b1212f573c78d1 (
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
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/ortp/ortp-0.15.0_p1.ebuild,v 1.3 2009/06/26 10:54:29 aballier Exp $
EAPI="2"
inherit eutils
MY_P=${P/_p1/}
DESCRIPTION="Open Real-time Transport Protocol (RTP, RFC3550) stack"
HOMEPAGE="http://www.linphone.org/index.php/eng/code_review/ortp/"
SRC_URI="http://download.savannah.nongnu.org/releases/linphone/${PN}/sources/${MY_P}.tar.gz
mirror://gentoo/${P}-linphone-3.1.0.patch.tgz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
IUSE="debug doc examples ipv6 minimal srtp ssl"
RDEPEND="srtp? ( net-libs/libsrtp )
ssl? ( dev-libs/openssl )"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )"
S=${WORKDIR}/${MY_P}
src_prepare() {
# diff patch from linphone-3.1.0 bundled ortp
epatch "${WORKDIR}"/${P}-linphone-3.1.0.patch
# to be sure doc is not builded nor installed w/ -doc and doxygen installed
if ! use doc; then
sed -i -e 's/test $DOXYGEN != //' configure \
|| die "patching configure failed"
fi
# to authorize -srtp even with libsrtp installed
if ! use srtp; then
sed -i -e 's/$have_srtp_headers$have_srtp_lib//' configure \
|| die "patching configure failed"
fi
# to authorize -ssl even with openssl installed
if ! use ssl; then
sed -i -e 's/SSL_LIBS=".*"/SSL_LIBS=""/' \
-e 's/openssl\/.*.h/poll.h/' configure \
|| die "patching configure failed"
fi
# do not build examples programs, see bug 226247
sed -i -e 's/SUBDIRS = . tests/SUBDIRS = ./' src/Makefile.in \
|| die "patching src/Makefile.in failed"
# ${P} is added after ${docdir}
if use doc; then
sed -i -e 's/$(docdir)\/$(PACKAGE)-$(VERSION)/$(docdir)/' Makefile.in \
|| die "patching Makefile.in failed"
fi
}
src_configure() {
# force docdir to standard Gentoo doc directory
# memcheck is for HP-UX only
# mode64bit adds +DA2.0W +DS2.0 CFLAGS wich are needed for HP-UX
# strict adds -Werror, don't want it
econf \
--docdir=/usr/share/doc/${PF} \
--disable-memcheck \
--disable-mode64bit \
--disable-strict \
--disable-dependency-tracking \
--enable-fast-install \
--enable-libtool-lock \
$(use_enable debug) \
$(use_enable ipv6) \
$(use_enable minimal perf)
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed"
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins src/tests/*.c || die "doins failed"
fi
}
|