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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (show annotations) (download)
Thu Jul 30 19:07:46 2015 UTC (5 years, 4 months ago) by zlogene
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +2 -2 lines
ia64 stable wrt bug #549480

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x1BDC0E5AC42EB5D6)

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.10.11.ebuild,v 1.15 2015/07/30 12:37:54 ago 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/${PN}-2.10.10-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 qos 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 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 xmpp? ( xml )
55 vxml? ( http tts xml )
56 xmlrpc? ( http xml )
57 soap? ( http xml )"
58
59 src_prepare() {
60 epatch "${FILESDIR}/${PN}-2.10.9-svn_revision_override.patch" \
61 "${FILESDIR}/${PN}-2.10.9-pkgconfig_ldflags.patch" \
62 "${FILESDIR}/${PN}-2.10.9-respect_cxxflags.patch" \
63 "${FILESDIR}/${PN}-2.10.10-mga-bison-parameter.patch" \
64 "${FILESDIR}/${PN}-2.10.10-respect_cflags_cxxflags.patch"
65
66 if ! use telnet; then
67 epatch "${FILESDIR}/${PN}-2.10.9-disable-telnet-symbols.patch"
68 fi
69
70 # remove visual studio related files from samples/
71 if use examples; then
72 rm -f samples/*/*.vcproj
73 rm -f samples/*/*.sln
74 rm -f samples/*/*.dsp
75 rm -f samples/*/*.dsw
76 fi
77
78 if [[ ! -z ${TARGET+set} ]]; then
79 ewarn "TARGET variable is set. Removing as it would break the build, bug #465722."
80 unset TARGET
81 fi
82 }
83
84 src_configure() {
85 local myconf=""
86
87 # plugins are disabled only if ! sound and ! video
88 if ! use sound && ! use video; then
89 myconf="${myconf} --disable-plugins"
90 else
91 myconf="${myconf} --enable-plugins"
92 fi
93
94 # minsize: presets of features (overwritten by use flags)
95 # ansi-bool, atomicity: there is no reason to disable those features
96 # internalregex: we want to use system one
97 # sunaudio and bsdvideo are respectively for SunOS and BSD's
98 # appshare, vfw: only for windows
99 # samples: no need to build samples
100 # avc: disabled, bug 276514, upstream bug 2821744
101 # mlib: SUN mediaLibs. Not in tree.
102 # pipechan, configfile, resolver, url: force enabling
103 econf ${myconf} \
104 --disable-minsize \
105 --enable-ansi-bool \
106 --enable-atomicity \
107 --disable-internalregex \
108 --disable-sunaudio \
109 --disable-bsdvideo \
110 --disable-appshare \
111 --disable-vfw \
112 --disable-samples \
113 --disable-avc \
114 --disable-mlib \
115 --enable-configfile \
116 --enable-pipechan \
117 --enable-resolver \
118 --enable-url \
119 $(use_enable alsa) \
120 $(use_enable asn) \
121 $(use_enable debug exceptions) \
122 $(use_enable debug memcheck) \
123 $(use_enable debug tracing) \
124 $(use_enable dtmf) \
125 --disable-esd \
126 $(use_enable ffmpeg ffvdev) \
127 $(use_enable ftp) \
128 $(use_enable http) \
129 $(use_enable http httpforms) \
130 $(use_enable http httpsvc) \
131 --disable-dc \
132 $(use_enable ipv6) \
133 $(use_enable xmpp jabber) \
134 $(use_enable ldap openldap) \
135 $(use_enable lua) \
136 $(use_enable mail pop3smtp) \
137 $(use_enable pulseaudio pulse) \
138 $(use_enable odbc) \
139 $(use_enable oss) \
140 $(use_enable pch) \
141 $(use_enable qos) \
142 $(use_enable remote remconn) \
143 $(use_enable sasl) \
144 $(use_enable sdl) \
145 $(use_enable serial) \
146 $(use_enable shmvideo) \
147 $(use_enable snmp) \
148 $(use_enable soap) \
149 $(use_enable socks) \
150 $(use_enable sound audio) \
151 $(use_enable ssl openssl) \
152 $(use_enable stun) \
153 $(use_enable telnet) \
154 $(use_enable tts) \
155 --disable-v4l \
156 $(use_enable v4l v4l2) \
157 $(use_enable video) $(use_enable video vidfile) \
158 $(use_enable vxml) \
159 $(use_enable wav wavfile) \
160 $(use_enable xml expat) \
161 $(use_enable xmlrpc)
162 }
163
164 src_compile() {
165 local makeopts=""
166 tc-env_build
167
168 use debug && makeopts="debug"
169
170 emake ${makeopts} V=1 || die "emake failed"
171 }
172
173 src_install() {
174 local makeopts=""
175
176 use debug && makeopts="DEBUG=1"
177
178 emake DESTDIR="${D}" ${makeopts} install || die "emake install failed"
179
180 # Get rid of static libraries if not requested
181 # There seems to be no easy way to disable this in the build system
182 if ! use static-libs; then
183 rm -v "${D}"/usr/lib*/*.a || die
184 fi
185
186 if use doc; then
187 dohtml -r "${WORKDIR}"/html/* || die "dohtml failed"
188 fi
189
190 dodoc History.txt ReadMe.txt ReadMe_QOS.txt || die "dodoc failed"
191
192 if use sound || use video; then
193 newdoc plugins/ReadMe.txt ReadMe-Plugins.txt || die "newdoc failed"
194 fi
195
196 if use examples; then
197 local exampledir="/usr/share/doc/${PF}/examples"
198 local basedir="samples"
199 local sampledirs="`ls samples --hide=Makefile`"
200
201 # first, install Makefile
202 insinto ${exampledir}/
203 doins ${basedir}/Makefile || die "doins failed"
204
205 # now, all examples
206 for x in ${sampledirs}; do
207 insinto ${exampledir}/${x}/
208 doins ${basedir}/${x}/* || die "doins failed"
209 done
210 fi
211 }
212
213 pkg_postinst() {
214 if use examples; then
215 ewarn "All examples have been installed, some of them will not work on your system"
216 ewarn "it will depend of the enabled USE flags."
217 ewarn "To test examples, you have to run PTLIBDIR=/usr/share/ptlib make"
218 fi
219
220 if ! use sound || ! use video; then
221 ewarn "You have disabled sound or video USE flags."
222 ewarn "Most audio/video have been disabled silently even if enabled via USE flags."
223 ewarn "Having a feature enabled via use flag but disabled can lead to issues."
224 fi
225
226 ewarn "If you've just removed pwlib to install ptlib, some packages will be broken."
227 ewarn "Please use 'revdep-rebuild' from app-portage/gentoolkit to check."
228 ewarn "If some packages need pwlib, consider removing ptlib and re-installing pwlib"
229 ewarn "or help us to make them live together."
230 }

  ViewVC Help
Powered by ViewVC 1.1.20