/[gentoo-x86]/net-libs/ptlib/ptlib-2.6.7-r1.ebuild
Gentoo

Contents of /net-libs/ptlib/ptlib-2.6.7-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Sun Sep 30 18:15:02 2012 UTC (2 years, 2 months ago) by armin76
Branch: MAIN
Changes since 1.14: +2 -2 lines
alpha stable wrt #397617

(Portage version: 2.1.11.16/cvs/Linux ia64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/ptlib/ptlib-2.6.7-r1.ebuild,v 1.14 2012/06/17 16:24:29 armin76 Exp $
4
5 EAPI="2"
6
7 inherit eutils
8
9 HTMLV="2.6.6" # There no 2.6.7 release of htmldoc
10 DESCRIPTION="Network focused portable C++ class library providing high level functions"
11 HOMEPAGE="http://www.opalvoip.org/"
12 SRC_URI="mirror://sourceforge/opalvoip/${P}.tar.bz2
13 doc? ( mirror://sourceforge/opalvoip/${PN}-${HTMLV}-htmldoc.tar.bz2 )"
14
15 LICENSE="MPL-1.0"
16 SLOT="0"
17 KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
18 # default enabled are features from 'minsize', the most used according to ptlib
19 IUSE="alsa +asn +audio debug doc dtmf examples ffmpeg ftp http ipv6
20 jabber ldap mail odbc oss pch qos remote sasl sdl serial shmvideo snmp soap
21 socks ssl static-libs +stun telnet tts v4l +video vxml wav xml xmlrpc"
22
23 CDEPEND="
24 audio? ( alsa? ( media-libs/alsa-lib ) )
25 ldap? ( net-nds/openldap )
26 odbc? ( dev-db/unixODBC )
27 sasl? ( dev-libs/cyrus-sasl:2 )
28 sdl? ( media-libs/libsdl )
29 ssl? ( dev-libs/openssl )
30 video? ( v4l? ( media-libs/libv4l ) )
31 xml? ( dev-libs/expat )
32 !!dev-libs/pwlib"
33 RDEPEND="${CDEPEND}
34 ffmpeg? ( virtual/ffmpeg )"
35 DEPEND="${CDEPEND}
36 virtual/pkgconfig
37 sys-devel/bison
38 sys-devel/flex
39 video? ( v4l? ( sys-kernel/linux-headers ) )"
40
41 # NOTES:
42 # media-libs/libdc1394:2 should be supported but headers location have changed
43 # tools/ directory is ignored
44 # looks to have an auto-magic dep with medialibs, but not in the tree so...
45 # upstream bug 2794736
46 # avc plugin is disabled to fix bug 276514, see upstream bug 2821744
47
48 # TODO:
49 # manage in a better way the conditional use flags (with eapi-3 ?)
50 # libv4l is an automagic dep for v4l2 plugin, see upstream bug 2867383
51
52 conditional_use_warn_msg() {
53 ewarn "To enable ${1} USE flag, you need ${2} USE flag to be enabled"
54 ewarn "Please, enable ${2} or disable ${1}"
55 }
56
57 pkg_setup() {
58 local use_warn=false
59
60 if use sdl && ! use video; then
61 conditional_use_warn_msg "sdl" "video"
62 use_warn=true
63 fi
64
65 if use jabber && ! use xml; then
66 conditional_use_warn_msg "jabber" "xml"
67 use_warn=true
68 fi
69
70 if use vxml; then
71 if ! use xml; then
72 conditional_use_warn_msg "vxml" "xml"
73 use_warn=true
74 fi
75 if ! use http; then
76 conditional_use_warn_msg "vxml" "http"
77 use_warn=true
78 fi
79 fi
80
81 if use xmlrpc; then
82 if ! use xml; then
83 conditional_use_warn_msg "xmlrpc" "xml"
84 use_warn=true
85 fi
86 # configure script tells it needs http but it fails, see bug 277385
87 # the bug has been reported at upstream bug 2820814
88 if ! use http; then
89 conditional_use_warn_msg "xmlrpc" "http"
90 use_warn=true
91 fi
92 fi
93
94 if use soap; then
95 if ! use xml; then
96 conditional_use_warn_msg "soap" "xml"
97 use_warn=true
98 fi
99 # fix bug 280850, see upstream bug 2844915
100 if ! use http; then
101 conditional_use_warn_msg "soap" "http"
102 use_warn=true
103 fi
104 fi
105
106 if ${use_warn}; then
107 echo
108 ewarn "Please look at previous messages and re-emerge accordingly if needed."
109 ebeep
110 epause 5
111 fi
112 }
113
114 src_prepare() {
115 # remove visual studio related files from samples/
116 if use examples; then
117 rm -f samples/*/*.vcproj
118 rm -f samples/*/*.sln
119 rm -f samples/*/*.dsp
120 rm -f samples/*/*.dsw
121 fi
122
123 # bug 283675, upstream bug 2857750
124 if use vxml && ! use dtmf; then
125 epatch "${FILESDIR}"/${PN}-2.6.4-vxml-ptones.patch
126 fi
127 }
128
129 src_configure() {
130 local myconf=""
131
132 # plugins are disabled only if ! audio and ! video
133 if ! use audio && ! use video; then
134 myconf="${myconf} --disable-plugins"
135 else
136 myconf="${myconf} --enable-plugins"
137 fi
138
139 # minsize, openh323, opal: presets of features (overwritten by use flags)
140 # ansi-bool, atomicity: there is no reason to disable those features
141 # internalregex: we want to use system one
142 # sunaudio and bsdvideo are respectively for SunOS and BSD's
143 # appshare, vfw: only for windows
144 # samples: no need to build samples
145 # avc: disabled, bug 276514, upstream bug 2821744
146 # pipechan, configfile, resolver, url: force enabling
147 econf ${myconf} \
148 --disable-minsize \
149 --disable-openh323 \
150 --disable-opal \
151 --enable-ansi-bool \
152 --enable-atomicity \
153 --disable-internalregex \
154 --disable-sunaudio \
155 --disable-bsdvideo \
156 --disable-appshare \
157 --disable-vfw \
158 --disable-samples \
159 --disable-avc \
160 --enable-configfile \
161 --enable-pipechan \
162 --enable-resolver \
163 --enable-url \
164 $(use_enable audio) \
165 $(use_enable alsa) \
166 $(use_enable asn) \
167 $(use_enable debug exceptions) \
168 $(use_enable debug memcheck) \
169 $(use_enable debug tracing) \
170 $(use_enable dtmf) \
171 --disable-esd \
172 $(use_enable ffmpeg ffvdev) \
173 $(use_enable ftp) \
174 $(use_enable http) \
175 $(use_enable http httpforms) \
176 $(use_enable http httpsvc) \
177 --disable-dc \
178 $(use_enable ipv6) \
179 $(use_enable jabber) \
180 $(use_enable ldap openldap) \
181 $(use_enable mail pop3smtp) \
182 $(use_enable odbc) \
183 $(use_enable oss) \
184 $(use_enable pch) \
185 $(use_enable qos) \
186 $(use_enable remote remconn) \
187 $(use_enable sasl) \
188 $(use_enable sdl) \
189 $(use_enable serial) \
190 $(use_enable shmvideo) \
191 $(use_enable snmp) \
192 $(use_enable soap) \
193 $(use_enable socks) \
194 $(use_enable ssl openssl) \
195 $(use_enable stun) \
196 $(use_enable telnet) \
197 $(use_enable tts) \
198 --disable-v4l \
199 $(use_enable v4l v4l2) \
200 $(use_enable video) $(use_enable video vidfile) \
201 $(use_enable vxml) \
202 $(use_enable wav wavfile) \
203 $(use_enable xml expat) \
204 $(use_enable xmlrpc)
205 }
206
207 src_compile() {
208 local makeopts=""
209
210 use debug && makeopts="debug"
211
212 emake ${makeopts} || die "emake failed"
213 }
214
215 src_install() {
216 local makeopts=""
217
218 use debug && makeopts="DEBUG=1"
219
220 emake DESTDIR="${D}" ${makeopts} install || die "emake install failed"
221
222 # Get rid of static libraries if not requested
223 # There seems to be no easy way to disable this in the build system
224 if ! use static-libs; then
225 rm -v "${D}"/usr/lib*/*.a || die
226 fi
227
228 if use doc; then
229 dohtml -r "${WORKDIR}"/html/* || die "dohtml failed"
230 fi
231
232 dodoc History.txt ReadMe.txt ReadMe_QOS.txt || die "dodoc failed"
233
234 # ChangeLog is not standard
235 # This version (2.6.7) doesn't have a ChangeLog file.
236 #dodoc ChangeLog-${PN}-v${PV//./_}.txt || die "dodoc failed"
237
238 if use audio || use video; then
239 newdoc plugins/ReadMe.txt ReadMe-Plugins.txt || die "newdoc failed"
240 fi
241
242 if use examples; then
243 local exampledir="/usr/share/doc/${PF}/examples"
244 local basedir="samples"
245 local sampledirs="`ls samples --hide=Makefile`"
246
247 # first, install Makefile
248 insinto ${exampledir}/
249 doins ${basedir}/Makefile || die "doins failed"
250
251 # now, all examples
252 for x in ${sampledirs}; do
253 insinto ${exampledir}/${x}/
254 doins ${basedir}/${x}/* || die "doins failed"
255 done
256 fi
257 }
258
259 pkg_postinst() {
260 if use examples; then
261 ewarn "All examples have been installed, some of them will not work on your system"
262 ewarn "it will depend of the enabled USE flags."
263 ewarn "To test examples, you have to run PTLIBDIR=/usr/share/ptlib make"
264 fi
265
266 if ! use audio || ! use video; then
267 ewarn "You have disabled audio or video USE flags."
268 ewarn "Most audio/video have been disabled silently even if enabled via USE flags."
269 ewarn "Having a feature enabled via use flag but disabled can lead to issues."
270 fi
271
272 ewarn "If you've just removed pwlib to install ptlib, some packages will be broken."
273 ewarn "Please use 'revdep-rebuild' from app-portage/gentoolkit to check."
274 ewarn "If some packages need pwlib, consider removing ptlib and re-installing pwlib"
275 ewarn "or help us to make them live together."
276 }

  ViewVC Help
Powered by ViewVC 1.1.20