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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat May 16 11:02:04 2015 UTC (5 years, 6 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +5 -5 lines
Rename jabber to xmpp USE (#216300)

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

1 # Copyright 1999-2015 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.12.9.ebuild,v 1.3 2014/07/27 16:03:22 zerochaos Exp $
4
5 EAPI=5
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/${PV}"
16 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
17 # default enabled are features from 'minsize', the most used according to ptlib
18 IUSE="alsa +asn debug doc +dtmf examples ffmpeg ftp +http ipv6
19 xmpp ldap lua mail odbc oss pch pulseaudio remote sasl sdl serial
20 shmvideo snmp soap socks +sound ssl static-libs +stun telnet tts v4l +video
21 vxml wav xml xmlrpc"
22
23 CDEPEND="
24 ldap? ( net-nds/openldap )
25 lua? ( dev-lang/lua )
26 odbc? ( dev-db/unixODBC )
27 pulseaudio? ( media-sound/pulseaudio )
28 sasl? ( dev-libs/cyrus-sasl:2 )
29 sdl? ( media-libs/libsdl )
30 sound? ( alsa? ( media-libs/alsa-lib ) )
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 REQUIRED_USE="sdl? ( video )
49 xmpp? ( xml )
50 vxml? ( http tts xml )
51 xmlrpc? ( http xml )
52 soap? ( http xml )"
53
54 src_prepare() {
55 epatch "${FILESDIR}/${PN}-2.10.9-svn_revision_override.patch" \
56 "${FILESDIR}/${PN}-2.10.9-pkgconfig_ldflags.patch" \
57 "${FILESDIR}/${PN}-2.12.4-respect_cxxflags.patch" \
58 "${FILESDIR}/${PN}-2.12.4-sdl-linking.patch"
59
60 if ! use telnet; then
61 epatch "${FILESDIR}/${PN}-2.10.9-disable-telnet-symbols.patch"
62 fi
63
64 # remove visual studio related files from samples/
65 if use examples; then
66 rm -f samples/*/*.vcproj
67 rm -f samples/*/*.sln
68 rm -f samples/*/*.dsp
69 rm -f samples/*/*.dsw
70 fi
71
72 if [[ ! -z ${TARGET+set} ]]; then
73 ewarn "TARGET variable is set. Removing as it would break the build, bug #465722."
74 unset TARGET
75 fi
76 }
77
78 src_configure() {
79 local myconf=""
80
81 # plugins are disabled only if ! sound and ! video
82 if ! use sound && ! use video; then
83 myconf+=" --disable-plugins"
84 else
85 myconf+=" --enable-plugins"
86 fi
87
88 # minsize: presets of features (overwritten by use flags)
89 # ansi-bool, atomicity: there is no reason to disable those features
90 # internalregex: we want to use system one
91 # sunaudio and bsdvideo are respectively for SunOS and BSD's
92 # appshare, vfw: only for windows
93 # samples: no need to build samples
94 # avc: disabled, bug 276514, upstream bug 2821744
95 # mlib: SUN mediaLibs. Not in tree.
96 # pipechan, configfile, resolver, url: force enabling
97 econf ${myconf} \
98 --disable-minsize \
99 --enable-ansi-bool \
100 --enable-atomicity \
101 --disable-internalregex \
102 --disable-sunaudio \
103 --disable-bsdvideo \
104 --disable-appshare \
105 --disable-vfw \
106 --disable-samples \
107 --disable-avc \
108 --disable-mlib \
109 --enable-configfile \
110 --enable-pipechan \
111 --enable-resolver \
112 --enable-url \
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 xmpp 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 remote remconn) \
136 $(use_enable sasl) \
137 $(use_enable sdl) \
138 $(use_enable serial) \
139 $(use_enable shmvideo) \
140 $(use_enable snmp) \
141 $(use_enable soap) \
142 $(use_enable socks) \
143 $(use_enable sound audio) \
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}
164 }
165
166 src_install() {
167 local makeopts=""
168
169 use debug && makeopts="DEBUG=1"
170
171 emake DESTDIR="${D}" ${makeopts} install
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/*
181 fi
182
183 dodoc History.txt ReadMe.txt ReadMe_QOS.txt
184
185 if use sound || use video; then
186 newdoc plugins/ReadMe.txt ReadMe-Plugins.txt
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 sound || ! use video; then
214 ewarn "You have disabled sound 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