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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Thu Aug 21 09:59:30 2014 UTC (6 years, 3 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -2 lines
Stable for ppc64, wrt bug #517960

(Portage version: 2.2.8-r1/cvs/Linux x86_64, RepoMan options: --include-arches="ppc64", signed Manifest commit with key 7194459F)

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.10.11.ebuild,v 1.6 2014/08/04 18:50:19 armin76 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.10.10:=[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 # need >=gcc-3
66 if [[ $(gcc-major-version) -lt 3 ]]; then
67 eerror "You need to use gcc-3 at least."
68 eerror "Please change gcc version with 'gcc-config'."
69 die "You need to use gcc-3 at least."
70 fi
71
72 java-pkg-opt-2_pkg_setup
73 }
74
75 src_prepare() {
76 # remove visual studio related files from samples/
77 if use examples; then
78 rm -f samples/*/*.vcproj
79 rm -f samples/*/*.sln
80 rm -f samples/*/*.dsp
81 rm -f samples/*/*.dsw
82 fi
83
84 epatch "${FILESDIR}/${PN}-3.10.9-svn_revision_override.patch" \
85 "${FILESDIR}/${PN}-3.10.9-labs_is_in_stdlib.patch" \
86 "${FILESDIR}/${PN}-3.10.9-avoid_cflags_mixup.patch" \
87 "${FILESDIR}/${PN}-3.10.9-ffmpeg.patch" \
88 "${FILESDIR}/${PN}-3.10.11-libav9-gentoo.patch"
89
90 if ! use h323; then
91 # Without this patch, ekiga wont compile, even with
92 # USE=-h323.
93 epatch "${FILESDIR}/${PN}-3.10.9-disable-h323-workaround.patch"
94 fi
95
96 epatch "${FILESDIR}/${PN}-3.10.9-java-ruby-swig-fix.patch"
97
98 sed -i -e "s:\(.*HAS_H224.*\), \[OPAL_H323\]:\1:" configure.ac \
99 || die "sed failed"
100
101 eaclocal
102 eautoconf
103
104 # in plugins
105 cd plugins/
106 eaclocal
107 eautoconf
108 cd ..
109
110 # disable celt if celt is not enabled (prevent auto magic dep)
111 # already in repository
112 if ! use celt; then
113 sed -i -e "s/HAVE_CELT=yes/HAVE_CELT=no/" plugins/configure \
114 || die "sed failed"
115 fi
116
117 # fix automatic swig detection, upstream bug 2712521 (upstream reject it)
118 if ! use swig; then
119 sed -i -e "/^SWIG=/d" configure || die "patching configure failed"
120 fi
121
122 use ilbc || { rm -r plugins/audio/iLBC/ || die "removing iLBC failed"; }
123
124 java-pkg-opt-2_src_prepare
125 }
126
127 src_configure() {
128 local forcedconf=""
129
130 # fix bug 277233, upstream bug 2820939
131 if use fax; then
132 forcedconf="${forcedconf} --enable-statistics"
133 fi
134
135 # --with-libavcodec-source-dir should _not_ be set, it's for trunk sources
136 # versioncheck: check for ptlib version
137 # shared: should always be enabled for a lib
138 # localspeex, localspeexdsp, localgsm, localilbc: never use bundled libs
139 # samples: only build some samples, useless
140 # libavcodec-stackalign-hack: prevent hack (default disable by upstream)
141 # default-to-full-capabilties: default enable by upstream
142 # aec: atm, only used when bundled speex, so it's painless for us
143 # zrtp doesn't depend on net-libs/libzrtpcpp but on libzrtp from
144 # http://zfoneproject.com/ wich is not in portage
145 # msrp: highly experimental
146 # spandsp: doesn't work with newest spandsp, upstream bug 2796047
147 # g711plc: force enable
148 # rfc4103: not really used, upstream bug 2795831
149 # t38, spandsp: merged in fax
150 # h450, h460, h501: merged in h323 (they are additional features of h323)
151 econf \
152 --enable-versioncheck \
153 --enable-shared \
154 --disable-zrtp \
155 --disable-localspeex \
156 --disable-localspeexdsp \
157 --disable-localgsm \
158 --disable-localilbc \
159 --disable-samples \
160 --disable-libavcodec-stackalign-hack \
161 --enable-default-to-full-capabilties \
162 --enable-aec \
163 --disable-msrp \
164 --disable-spandsp \
165 --enable-g711plc \
166 --enable-rfc4103 \
167 $(use_enable debug) \
168 $(use_enable capi) \
169 $(use_enable fax) \
170 $(use_enable fax t38) \
171 $(use_enable h224) \
172 $(use_enable h281) \
173 $(use_enable h323) \
174 $(use_enable h323 h450) \
175 $(use_enable h323 h460) \
176 $(use_enable h323 h501) \
177 $(use_enable iax) \
178 $(use_enable ivr) \
179 $(use_enable ixj) \
180 $(use_enable java) \
181 $(use_enable lid) \
182 $(use_enable plugins) \
183 $(use_enable sbc) \
184 $(use_enable sip) \
185 $(use_enable sipim) \
186 $(use_enable stats statistics) \
187 $(use_enable video) $(use_enable video rfc4175) \
188 $(use_enable vpb) \
189 $(use_enable x264 h264) \
190 $(use_enable x264-static x264-link-static) \
191 ${forcedconf}
192 }
193
194 src_compile() {
195 local makeopts=""
196
197 use debug && makeopts="debug"
198
199 emake ${makeopts} || die "emake failed"
200 }
201
202 src_install() {
203 emake DESTDIR="${D}" install || die "emake install failed"
204
205 # Get rid of static libraries if not requested
206 # There seems to be no easy way to disable this in the build system
207 if ! use static-libs; then
208 rm -v "${D}"/usr/lib*/*.a || die
209 fi
210
211 if use doc; then
212 dohtml -r "${WORKDIR}"/html/* docs/* || die "dohtml failed"
213 fi
214
215 # ChangeLog is not standard and does not exist on 3.10.10
216 # dodoc ChangeLog-${PN}-v${PV//./_}.txt || die "dodoc failed"
217
218 if use examples; then
219 local exampledir="/usr/share/doc/${PF}/examples"
220 local basedir="samples"
221 local sampledirs="`ls ${basedir} --hide=configure* \
222 --hide=opal_samples.mak.in`"
223
224 # first, install files
225 insinto ${exampledir}/
226 doins ${basedir}/{configure*,opal_samples*} \
227 || die "doins failed"
228
229 # now, all examples
230 for x in ${sampledirs}; do
231 insinto ${exampledir}/${x}/
232 doins ${basedir}/${x}/* || die "doins failed"
233 done
234
235 # some examples need version.h
236 insinto "/usr/share/doc/${PF}/"
237 doins version.h || die "doins failed"
238 fi
239 }
240
241 pkg_postinst() {
242 if use examples; then
243 ewarn "All examples have been installed, some of them will not work on your system"
244 ewarn "it will depend of the enabled USE flags in ptlib and opal"
245 fi
246
247 if ! use plugins || ! use sound || ! use video; then
248 ewarn "You have disabled sound, video or plugins USE flags."
249 ewarn "Most audio/video features or plugins have been disabled silently"
250 ewarn "even if enabled via USE flags."
251 ewarn "Having a feature enabled via USE flag but disabled can lead to issues."
252 fi
253 }

  ViewVC Help
Powered by ViewVC 1.1.20