/[gentoo-x86]/media-libs/mediastreamer/mediastreamer-2.9.0.ebuild
Gentoo

Contents of /media-libs/mediastreamer/mediastreamer-2.9.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Fri May 1 19:25:44 2015 UTC (3 years, 5 months ago) by jer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +2 -2 lines
Stable for PPC64 (bug #510690).

(Portage version: 2.2.18/cvs/Linux x86_64, RepoMan options: --ignore-arches, signed Manifest commit with key A792A613)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/mediastreamer/mediastreamer-2.9.0.ebuild,v 1.8 2015/04/18 10:32:41 pacho Exp $
4
5 EAPI=5
6
7 inherit autotools eutils
8
9 DESCRIPTION="Mediastreaming library for telephony application"
10 HOMEPAGE="http://www.linphone.org/"
11 SRC_URI="mirror://nongnu/linphone/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0/3"
15 KEYWORDS="amd64 ppc ppc64 x86"
16 # Many cameras will not work or will crash an application if mediastreamer2 is
17 # not built with v4l2 support (taken from configure.ac)
18 # TODO: run-time test for ipv6: does it really need ortp[ipv6] ?
19 IUSE="+alsa amr bindist coreaudio debug doc examples +filters g726 g729 gsm ilbc
20 ipv6 ntp-timestamp opengl opus +ortp oss pcap portaudio pulseaudio sdl silk +speex
21 static-libs test theora upnp v4l video x264 X"
22
23 REQUIRED_USE="|| ( oss alsa portaudio coreaudio pulseaudio )
24 video? ( || ( opengl sdl X ) )
25 theora? ( video )
26 X? ( video )
27 v4l? ( video )
28 opengl? ( video )"
29
30 RDEPEND="alsa? ( media-libs/alsa-lib )
31 g726? ( >=media-libs/spandsp-0.0.6_pre1 )
32 gsm? ( media-sound/gsm )
33 opus? ( media-libs/opus )
34 ortp? ( >=net-libs/ortp-0.21.0[ipv6?] )
35 pcap? ( sys-libs/libcap )
36 portaudio? ( media-libs/portaudio )
37 pulseaudio? ( >=media-sound/pulseaudio-0.9.21 )
38 speex? ( >=media-libs/speex-1.2_beta3 )
39 upnp? ( net-libs/libupnp )
40 video? (
41 virtual/ffmpeg
42 opengl? ( media-libs/glew
43 virtual/opengl
44 x11-libs/libX11 )
45 v4l? ( media-libs/libv4l
46 sys-kernel/linux-headers )
47 theora? ( media-libs/libtheora )
48 sdl? ( media-libs/libsdl[video,X] )
49 X? ( x11-libs/libX11
50 x11-libs/libXv ) )"
51 DEPEND="${RDEPEND}
52 dev-util/intltool
53 virtual/pkgconfig
54 doc? ( app-doc/doxygen )
55 opengl? ( dev-util/xxdi )
56 test? ( >=dev-util/cunit-2.1_p2[ncurses] )
57 X? ( x11-proto/videoproto )"
58
59 PDEPEND="amr? ( !bindist? ( media-plugins/mediastreamer-amr ) )
60 g729? ( !bindist? ( media-plugins/mediastreamer-bcg729 ) )
61 ilbc? ( media-plugins/mediastreamer-ilbc )
62 video? ( x264? ( media-plugins/mediastreamer-x264 ) )
63 silk? ( !bindist? ( media-plugins/mediastreamer-silk ) )"
64
65 src_prepare() {
66 # variable causes "command not found" warning and is not
67 # needed anyway
68 sed -i \
69 -e 's/$(ACLOCAL_MACOS_FLAGS)//' \
70 Makefile.am || die
71
72 # respect user's CFLAGS
73 sed -i \
74 -e "s:-O2::;s: -g::" \
75 configure.ac || die "patching configure.ac failed"
76
77 # change default paths
78 sed -i \
79 -e "s:\(prefix/share\):\1/${PN}:" \
80 configure.ac || die "patching configure.ac failed"
81
82 # fix doc installation dir
83 sed -i \
84 -e "s:\$(pkgdocdir):\$(docdir):" \
85 help/Makefile.am || die "patching help/Makefile.am failed"
86
87 # fix html installation dir
88 sed -i \
89 -e "s:\(doc_htmldir=\).*:\1\$(htmldir):" \
90 help/Makefile.am || die "patching help/Makefile.am failed"
91
92 # linux/videodev.h dropped in 2.6.38
93 sed -i \
94 -e 's:linux/videodev.h ::' \
95 configure.ac || die
96
97 epatch "${FILESDIR}/${P}-v4l-automagic.patch" \
98 "${FILESDIR}/${P}-libav9.patch" \
99 "${FILESDIR}/${P}-underlinking.patch" \
100 "${FILESDIR}/${P}-tests.patch" \
101 "${FILESDIR}/${P}-xxd.patch"
102
103 eautoreconf
104 }
105
106 src_configure() {
107 local myeconfargs=(
108 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
109 --datadir="${EPREFIX}"/usr/share/${PN}
110 # arts is deprecated
111 --disable-artsc
112 # don't want -Werror
113 --disable-strict
114 --disable-libv4l1
115 # don't use bundled libs
116 --enable-external-ortp
117 $(use_enable alsa)
118 $(use_enable pulseaudio)
119 $(use_enable coreaudio macsnd)
120 $(use_enable debug)
121 $(use_enable filters)
122 $(use_enable g726 spandsp)
123 $(use_enable gsm)
124 $(use_enable ipv6)
125 $(use_enable ntp-timestamp)
126 $(use_enable opengl glx)
127 $(use_enable opus)
128 $(use_enable ortp)
129 $(use_enable oss)
130 $(use_enable pcap)
131 $(use_enable portaudio)
132 $(use_enable speex)
133 $(use_enable static-libs static)
134 $(use_enable theora)
135 $(use_enable upnp)
136 $(use_enable video)
137 $(use_enable v4l)
138 $(use_enable v4l libv4l2)
139 $(use_enable sdl)
140 $(use_enable X x11)
141 $(use_enable X xv)
142
143 $(use doc || echo ac_cv_path_DOXYGEN=false)
144 )
145
146 # Mac OS X Audio Queue is an audio recording facility, available on
147 # 10.5 (Leopard, Darwin9) and onward
148 if use coreaudio && [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 9 ]]
149 then
150 myeconfargs+=( --enable-macaqsnd )
151 else
152 myeconfargs+=( --disable-macaqsnd )
153 fi
154
155 econf "${myeconfargs[@]}"
156 }
157
158 src_test() {
159 default
160 cd tester || die
161 ./mediastreamer2_tester || die
162 }
163
164 src_install() {
165 default
166 prune_libtool_files
167
168 if use examples; then
169 insinto /usr/share/doc/${PF}/examples
170 doins tester/*.c
171 fi
172 }

  ViewVC Help
Powered by ViewVC 1.1.20