/[gentoo-x86]/net-libs/opal/opal-3.12.4.ebuild
Gentoo

Contents of /net-libs/opal/opal-3.12.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu May 15 12:05:02 2014 UTC (6 years, 6 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +8 -8 lines
QA: Rename "audio" USE flag to "sound", bug 357661.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/opal/opal-3.12.4.ebuild,v 1.2 2013/06/24 16:43:40 scarabeus Exp $
4
5 EAPI=5
6
7 inherit eutils autotools toolchain-funcs java-pkg-opt-2 flag-o-matic
8
9 DESCRIPTION="C++ class library normalising numerous telephony protocols"
10 HOMEPAGE="http://www.opalvoip.org/"
11 SRC_URI="mirror://sourceforge/opalvoip/${P}.tar.bz2
12 doc? ( mirror://sourceforge/opalvoip/${P}-htmldoc.tar.bz2 )"
13
14 LICENSE="MPL-1.0"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
17 IUSE="capi celt debug doc +dtmf examples fax ffmpeg h224 h281 h323 iax ilbc
18 ipv6 ivr ixj java ldap lid +plugins sbc sip sipim +sound srtp ssl static-libs
19 stats swig theora +video vpb vxml wav x264 x264-static xml"
20
21 REQUIRED_USE="x264-static? ( x264 )
22 h281? ( h224 )
23 sip? ( sipim )"
24
25 RDEPEND=">=net-libs/ptlib-2.12.4:=[stun,debug=,dtmf,http,ipv6?,ldap?,sound?,ssl?,video?,vxml?,wav?,xml?]
26 >=media-libs/speex-1.2_beta
27 fax? ( net-libs/ptlib[asn] )
28 h323? ( net-libs/ptlib[asn] )
29 ivr? ( net-libs/ptlib[http,xml,vxml] )
30 java? ( >=virtual/jre-1.4 )
31 plugins? (
32 media-sound/gsm
33 capi? ( net-dialup/capi4k-utils )
34 celt? ( media-libs/celt )
35 ffmpeg? ( virtual/ffmpeg[encode] )
36 ixj? ( sys-kernel/linux-headers )
37 ilbc? ( dev-libs/ilbc-rfc3951 )
38 sbc? ( media-libs/libsamplerate )
39 theora? ( media-libs/libtheora )
40 x264? ( virtual/ffmpeg
41 media-libs/x264 ) )
42 srtp? ( net-libs/libsrtp )
43 vxml? ( net-libs/ptlib[http,vxml] )"
44 DEPEND="${RDEPEND}
45 virtual/pkgconfig
46 >=sys-devel/gcc-3
47 java? ( swig? ( dev-lang/swig )
48 >=virtual/jdk-1.4 )"
49
50 # NOTES:
51 # ffmpeg[encode] is for h263 and mpeg4
52 # ssl, xml, vxml, ipv6, ldap, sound, wav, and video are use flags
53 # herited from ptlib: feature is enabled if ptlib has enabled it
54 # however, disabling it if ptlib has it looks hard (coz of buildopts.h)
55 # forcing ptlib to disable it for opal is not a solution too
56 # atm, accepting the "auto-feature" looks like a good solution
57 # (asn is used for fax and config _only_ for examples)
58 # OPALDIR should not be used anymore but if a package still need it, create it
59
60 pkg_setup() {
61 # workaround for bug 282838
62 append-cxxflags "-fno-visibility-inlines-hidden"
63 append-cxxflags "-fno-strict-aliasing"
64
65 java-pkg-opt-2_pkg_setup
66 }
67
68 src_prepare() {
69 # remove visual studio related files from samples/
70 if use examples; then
71 rm -f samples/*/*.vcproj
72 rm -f samples/*/*.sln
73 rm -f samples/*/*.dsp
74 rm -f samples/*/*.dsw
75 fi
76
77 epatch "${FILESDIR}/${PN}-3.10.9-svn_revision_override.patch"
78 epatch "${FILESDIR}/${PN}-3.10.9-labs_is_in_stdlib.patch"
79 epatch "${FILESDIR}/${PN}-3.12.4-avoid_cflags_mixup.patch"
80
81 if ! use h323; then
82 # Without this patch, ekiga wont compile, even with
83 # USE=-h323.
84 epatch "${FILESDIR}/${PN}-3.10.9-disable-h323-workaround.patch"
85 fi
86
87 epatch "${FILESDIR}/${PN}-3.12.4-java-ruby-swig-fix.patch"
88
89 sed -i -e "s:\(.*HAS_H224.*\), \[OPAL_H323\]:\1:" configure.ac \
90 || die "sed failed"
91
92 eaclocal
93 eautoconf
94
95 # in plugins
96 cd plugins/
97 eaclocal
98 eautoconf
99 cd ..
100
101 # disable celt if celt is not enabled (prevent auto magic dep)
102 # already in repository
103 if ! use celt; then
104 sed -i -e "s/HAVE_CELT=yes/HAVE_CELT=no/" plugins/configure \
105 || die "sed failed"
106 fi
107
108 # fix automatic swig detection, upstream bug 2712521 (upstream reject it)
109 if ! use swig; then
110 sed -i -e "/^SWIG=/d" configure || die "patching configure failed"
111 fi
112
113 use ilbc || { rm -r plugins/audio/iLBC/ || die "removing iLBC failed"; }
114
115 java-pkg-opt-2_src_prepare
116 }
117
118 src_configure() {
119 # --with-libavcodec-source-dir should _not_ be set, it's for trunk sources
120 # versioncheck: check for ptlib version
121 # shared: should always be enabled for a lib
122 # localspeex, localspeexdsp, localgsm, localilbc: never use bundled libs
123 # samples: only build some samples, useless
124 # libavcodec-stackalign-hack: prevent hack (default disable by upstream)
125 # default-to-full-capabilties: default enable by upstream
126 # aec: atm, only used when bundled speex, so it's painless for us
127 # zrtp doesn't depend on net-libs/libzrtpcpp but on libzrtp from
128 # http://zfoneproject.com/ wich is not in portage
129 # msrp: highly experimental
130 # spandsp: doesn't work with newest spandsp, upstream bug 2796047
131 # g711plc: force enable
132 # rfc4103: not really used, upstream bug 2795831
133 # t38, spandsp: merged in fax
134 # h450, h460, h501: merged in h323 (they are additional features of h323)
135 econf \
136 --enable-versioncheck \
137 --enable-shared \
138 --disable-zrtp \
139 --disable-localspeex \
140 --disable-localspeexdsp \
141 --disable-localgsm \
142 --disable-localilbc \
143 --disable-samples \
144 --disable-libavcodec-stackalign-hack \
145 --enable-default-to-full-capabilties \
146 --enable-aec \
147 --disable-msrp \
148 --disable-spandsp \
149 --enable-g711plc \
150 --enable-rfc4103 \
151 $(use_enable debug) \
152 $(use_enable capi) \
153 $(use_enable fax) \
154 $(use_enable fax t38) \
155 $(use_enable h224) \
156 $(use_enable h281) \
157 $(use_enable h323) \
158 $(use_enable h323 h450) \
159 $(use_enable h323 h460) \
160 $(use_enable h323 h501) \
161 $(use_enable iax) \
162 $(use_enable ivr) \
163 $(use_enable ixj) \
164 $(use_enable java) \
165 $(use_enable lid) \
166 $(use_enable plugins) \
167 $(use_enable sbc) \
168 $(use_enable sip) \
169 $(use_enable sipim) \
170 $(use_enable stats statistics) \
171 $(use_enable video) $(use_enable video rfc4175) \
172 $(use_enable vpb) \
173 $(use_enable x264 h264) \
174 $(use_enable x264-static x264-link-static)
175 }
176
177 src_compile() {
178 local makeopts=""
179
180 use debug && makeopts="debug"
181
182 emake ${makeopts}
183 }
184
185 src_install() {
186 emake DESTDIR="${D}" install
187
188 # Get rid of static libraries if not requested
189 # There seems to be no easy way to disable this in the build system
190 if ! use static-libs; then
191 rm -v "${D}"/usr/lib*/*.a || die
192 fi
193
194 if use doc; then
195 dohtml -r "${WORKDIR}"/html/* docs/*
196 fi
197
198 # ChangeLog is not standard and does not exist on 3.10.10
199 # dodoc ChangeLog-${PN}-v${PV//./_}.txt || die "dodoc failed"
200
201 if use examples; then
202 local exampledir="/usr/share/doc/${PF}/examples"
203 local basedir="samples"
204 local sampledirs="`ls ${basedir} --hide=configure* \
205 --hide=opal_samples.mak.in --hide=ReadMe.txt`"
206
207 # first, install files
208 insinto ${exampledir}/
209 doins ${basedir}/{configure*,opal_samples*,ReadMe.txt}
210
211 # now, all examples
212 for x in ${sampledirs}; do
213 insinto ${exampledir}/${x}/
214 doins ${basedir}/${x}/*
215 done
216
217 # some examples need version.h
218 insinto "/usr/share/doc/${PF}/"
219 doins version.h
220 fi
221 }
222
223 pkg_postinst() {
224 if use examples; then
225 ewarn "All examples have been installed, some of them will not work on your system"
226 ewarn "it will depend of the enabled USE flags in ptlib and opal"
227 fi
228
229 if ! use plugins || ! use sound || ! use video; then
230 ewarn "You have disabled sound, video or plugins USE flags."
231 ewarn "Most audio/video features or plugins have been disabled silently"
232 ewarn "even if enabled via USE flags."
233 ewarn "Having a feature enabled via USE flag but disabled can lead to issues."
234 fi
235 }

  ViewVC Help
Powered by ViewVC 1.1.20