comparison media-libs/mediastreamer/mediastreamer-2.8.2.ebuild @ 433:79a0505c6421

add a patched ebuild for mediastreamer
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sun, 04 Dec 2016 16:13:16 +0100
parents
children
comparison
equal deleted inserted replaced
432:8b06995f9f2a 433:79a0505c6421
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="4"
6
7 inherit autotools eutils multilib
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"
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 g726 g729 gsm ilbc
20 ipv6 oss portaudio pulseaudio sdl silk +speex static-libs theora v4l
21 video x264 X"
22
23 REQUIRED_USE="|| ( oss alsa portaudio coreaudio pulseaudio )
24 video? ( || ( sdl X ) )
25 theora? ( video )
26 X? ( video )
27 v4l? ( video )"
28
29 RDEPEND=">=net-libs/ortp-0.17[ipv6?]
30 alsa? ( media-libs/alsa-lib )
31 g726? ( >=media-libs/spandsp-0.0.6_pre1 )
32 gsm? ( media-sound/gsm )
33 portaudio? ( media-libs/portaudio )
34 pulseaudio? ( >=media-sound/pulseaudio-0.9.21 )
35 speex? ( >=media-libs/speex-1.2_beta3 )
36 video? (
37 virtual/ffmpeg
38 v4l? ( media-libs/libv4l
39 sys-kernel/linux-headers )
40 theora? ( media-libs/libtheora )
41 sdl? ( media-libs/libsdl[video,X] )
42 X? ( x11-libs/libX11
43 x11-libs/libXv ) )"
44 DEPEND="${RDEPEND}
45 dev-util/intltool
46 virtual/pkgconfig
47 x11-proto/videoproto
48 doc? ( app-doc/doxygen )"
49
50 PDEPEND="amr? ( !bindist? ( media-plugins/mediastreamer-amr ) )
51 g729? ( !bindist? ( media-plugins/mediastreamer-bcg729 ) )
52 ilbc? ( media-plugins/mediastreamer-ilbc )
53 video? ( x264? ( media-plugins/mediastreamer-x264 ) )
54 silk? ( !bindist? ( media-plugins/mediastreamer-silk ) )"
55
56 src_prepare() {
57 # respect user's CFLAGS
58 sed -i -e "s:-O2::;s: -g::" configure.ac || die "patching configure.ac failed"
59
60 # change default paths
61 sed -i -e "s:\(\${prefix}/\)lib:\1$(get_libdir):" \
62 -e "s:\(prefix/share\):\1/${PN}:" configure.ac \
63 || die "patching configure.ac failed"
64
65 # fix html doc installation dir
66 sed -i -e "s:\$(pkgdocdir):\$(docdir):" help/Makefile.am \
67 || die "patching help/Makefile.am failed"
68 sed -i -e "s:\(doc_htmldir=\).*:\1\$(htmldir):" help/Makefile.am \
69 || die "patching help/Makefile.am failed"
70
71 epatch "${FILESDIR}/${P}-v4l-automagic.patch" \
72 "${FILESDIR}/${P}-autopoint.patch" \
73 "${FILESDIR}/${P}-ffmpeg-1.0.patch" \
74 "${FILESDIR}/${P}-libav9.patch"
75
76 # linux/videodev.h dropped in 2.6.38
77 sed -i -e 's:linux/videodev.h ::' configure.ac || die
78
79 # don't build examples in tests/
80 sed -i -e "/SUBDIRS/s/ tests//" Makefile.in || die
81
82 # patch from https://bugs.gentoo.org/show_bug.cgi?id=560334
83 sed -i -e "s/CodecID/AVCodecID/g" src/videodec.c
84 sed -i -e "s/CodecID/AVCodecID/g" src/videoenc.c
85
86 eautoreconf
87 }
88
89 src_configure() {
90 local myeconfargs=(
91 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
92 --datadir="${EPREFIX}"/usr/share/${PN}
93 # arts is deprecated
94 --disable-artsc
95 # don't want -Werror
96 --disable-strict
97 --disable-libv4l1
98 # don't use bundled libs
99 --enable-external-ortp
100 $(use_enable alsa)
101 $(use_enable pulseaudio)
102 $(use_enable coreaudio macsnd)
103 $(use_enable debug)
104 $(use_enable g726 spandsp )
105 $(use_enable gsm)
106 $(use_enable ipv6)
107 $(use_enable oss)
108 $(use_enable portaudio)
109 $(use_enable speex)
110 $(use_enable static-libs static)
111 $(use_enable theora)
112 $(use_enable video)
113 $(use_enable v4l)
114 $(use_enable v4l libv4l2)
115 $(use_enable sdl)
116 $(use_enable X x11)
117 $(use_enable X xv)
118
119 $(use doc || echo ac_cv_path_DOXYGEN=false)
120 )
121
122 # Mac OS X Audio Queue is an audio recording facility, available on
123 # 10.5 (Leopard, Darwin9) and onward
124 if use coreaudio && [[ ${CHOST} == *-darwin* && ${CHOST##*-darwin} -ge 9 ]]
125 then
126 myeconfargs+=( --enable-macaqsnd )
127 else
128 myeconfargs+=( --disable-macaqsnd )
129 fi
130
131 econf "${myeconfargs[@]}"
132 }
133
134 src_install() {
135 default
136 prune_libtool_files
137
138 if use examples; then
139 insinto /usr/share/doc/${PF}/examples
140 doins tests/*.c
141 fi
142 }