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

Contents of /net-libs/ptlib/ptlib-2.10.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Dec 3 23:16:28 2012 UTC (19 months, 3 weeks ago) by neurogeek
Branch: MAIN
Version bump. Added pulseaudio USE wrt bug #442458

(Portage version: 2.2.0_alpha138/cvs/Linux i686, signed Manifest commit with key 748B2C601F6F0683)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="4"
6
7 inherit eutils
8
9 DESCRIPTION="Network focused portable C++ class library providing high level functions"
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 # default enabled are features from 'minsize', the most used according to ptlib
18 IUSE="alsa +asn +audio debug doc +dtmf examples ffmpeg ftp +http ipv6
19 jabber ldap lua mail odbc oss pch pulseaudio qos remote sasl sdl serial
20 shmvideo snmp soap socks ssl static-libs +stun telnet tts v4l +video
21 vxml wav xml xmlrpc"
22
23 CDEPEND="
24 audio? ( alsa? ( media-libs/alsa-lib ) )
25 ldap? ( net-nds/openldap )
26 lua? ( dev-lang/lua )
27 odbc? ( dev-db/unixODBC )
28 pulseaudio? ( media-sound/pulseaudio )
29 sasl? ( dev-libs/cyrus-sasl:2 )
30 sdl? ( media-libs/libsdl )
31 ssl? ( dev-libs/openssl )
32 video? ( v4l? ( media-libs/libv4l ) )
33 xml? ( dev-libs/expat )
34 !!dev-libs/pwlib"
35 RDEPEND="${CDEPEND}
36 ffmpeg? ( virtual/ffmpeg )"
37 DEPEND="${CDEPEND}
38 virtual/pkgconfig
39 sys-devel/bison
40 sys-devel/flex
41 video? ( v4l? ( sys-kernel/linux-headers ) )"
42
43 # NOTES:
44 # media-libs/libdc1394:2 should be supported but headers location have changed
45 # tools/ directory is ignored
46 # avc plugin is disabled to fix bug 276514, see upstream bug 2821744
47
48 conditional_use_warn_msg() {
49 ewarn "To enable ${1} USE flag, you need ${2} USE flag to be enabled"
50 ewarn "Please, enable ${2} or disable ${1}"
51 }
52
53 REQUIRED_USE="sdl? ( video )
54 jabber? ( xml )
55 vxml? ( http tts xml )
56 xmlrpc? ( http xml )
57 soap? ( http xml )"
58
59 src_prepare() {
60 epatch "${FILESDIR}/${P}-svn_revision_override.patch"
61 epatch "${FILESDIR}/${P}-pkgconfig_ldflags.patch"
62 epatch "${FILESDIR}/${P}-respect_cxxflags.patch"
63
64 if ! use telnet; then
65 epatch "${FILESDIR}/${P}-disable-telnet-symbols.patch"
66 fi
67
68 # remove visual studio related files from samples/
69 if use examples; then
70 rm -f samples/*/*.vcproj
71 rm -f samples/*/*.sln
72 rm -f samples/*/*.dsp
73 rm -f samples/*/*.dsw
74 fi
75 }
76
77 src_configure() {
78 local myconf=""
79
80 # plugins are disabled only if ! audio and ! video
81 if ! use audio && ! use video; then
82 myconf="${myconf} --disable-plugins"
83 else
84 myconf="${myconf} --enable-plugins"
85 fi
86
87 # minsize: presets of features (overwritten by use flags)
88 # ansi-bool, atomicity: there is no reason to disable those features
89 # internalregex: we want to use system one
90 # sunaudio and bsdvideo are respectively for SunOS and BSD's
91 # appshare, vfw: only for windows
92 # samples: no need to build samples
93 # avc: disabled, bug 276514, upstream bug 2821744
94 # mlib: SUN mediaLibs. Not in tree.
95 # pipechan, configfile, resolver, url: force enabling
96 econf ${myconf} \
97 --disable-minsize \
98 --enable-ansi-bool \
99 --enable-atomicity \
100 --disable-internalregex \
101 --disable-sunaudio \
102 --disable-bsdvideo \
103 --disable-appshare \
104 --disable-vfw \
105 --disable-samples \
106 --disable-avc \
107 --disable-mlib \
108 --enable-configfile \
109 --enable-pipechan \
110 --enable-resolver \
111 --enable-url \
112 $(use_enable audio) \
113 $(use_enable alsa) \
114 $(use_enable asn) \
115 $(use_enable debug exceptions) \
116 $(use_enable debug memcheck) \
117 $(use_enable debug tracing) \
118 $(use_enable dtmf) \
119 --disable-esd \
120 $(use_enable ffmpeg ffvdev) \
121 $(use_enable ftp) \
122 $(use_enable http) \
123 $(use_enable http httpforms) \
124 $(use_enable http httpsvc) \
125 --disable-dc \
126 $(use_enable ipv6) \
127 $(use_enable jabber) \
128 $(use_enable ldap openldap) \
129 $(use_enable lua) \
130 $(use_enable mail pop3smtp) \
131 $(use_enable pulseaudio pulse) \
132 $(use_enable odbc) \
133 $(use_enable oss) \
134 $(use_enable pch) \
135 $(use_enable qos) \
136 $(use_enable remote remconn) \
137 $(use_enable sasl) \
138 $(use_enable sdl) \
139 $(use_enable serial) \
140 $(use_enable shmvideo) \
141 $(use_enable snmp) \
142 $(use_enable soap) \
143 $(use_enable socks) \
144 $(use_enable ssl openssl) \
145 $(use_enable stun) \
146 $(use_enable telnet) \
147 $(use_enable tts) \
148 --disable-v4l \
149 $(use_enable v4l v4l2) \
150 $(use_enable video) $(use_enable video vidfile) \
151 $(use_enable vxml) \
152 $(use_enable wav wavfile) \
153 $(use_enable xml expat) \
154 $(use_enable xmlrpc)
155 }
156
157 src_compile() {
158 local makeopts=""
159 tc-env_build
160
161 use debug && makeopts="debug"
162
163 emake ${makeopts} || die "emake failed"
164 }
165
166 src_install() {
167 local makeopts=""
168
169 use debug && makeopts="DEBUG=1"
170
171 emake DESTDIR="${D}" ${makeopts} install || die "emake install failed"
172
173 # Get rid of static libraries if not requested
174 # There seems to be no easy way to disable this in the build system
175 if ! use static-libs; then
176 rm -v "${D}"/usr/lib*/*.a || die
177 fi
178
179 if use doc; then
180 dohtml -r "${WORKDIR}"/html/* || die "dohtml failed"
181 fi
182
183 dodoc History.txt ReadMe.txt ReadMe_QOS.txt || die "dodoc failed"
184
185 if use audio || use video; then
186 newdoc plugins/ReadMe.txt ReadMe-Plugins.txt || die "newdoc failed"
187 fi
188
189 if use examples; then
190 local exampledir="/usr/share/doc/${PF}/examples"
191 local basedir="samples"
192 local sampledirs="`ls samples --hide=Makefile`"
193
194 # first, install Makefile
195 insinto ${exampledir}/
196 doins ${basedir}/Makefile || die "doins failed"
197
198 # now, all examples
199 for x in ${sampledirs}; do
200 insinto ${exampledir}/${x}/
201 doins ${basedir}/${x}/* || die "doins failed"
202 done
203 fi
204 }
205
206 pkg_postinst() {
207 if use examples; then
208 ewarn "All examples have been installed, some of them will not work on your system"
209 ewarn "it will depend of the enabled USE flags."
210 ewarn "To test examples, you have to run PTLIBDIR=/usr/share/ptlib make"
211 fi
212
213 if ! use audio || ! use video; then
214 ewarn "You have disabled audio or video USE flags."
215 ewarn "Most audio/video have been disabled silently even if enabled via USE flags."
216 ewarn "Having a feature enabled via use flag but disabled can lead to issues."
217 fi
218
219 ewarn "If you've just removed pwlib to install ptlib, some packages will be broken."
220 ewarn "Please use 'revdep-rebuild' from app-portage/gentoolkit to check."
221 ewarn "If some packages need pwlib, consider removing ptlib and re-installing pwlib"
222 ewarn "or help us to make them live together."
223 }

  ViewVC Help
Powered by ViewVC 1.1.20