Gentoo Archives: gentoo-commits

From: "Tony Vroon (chainsaw)" <chainsaw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/asterisk: ChangeLog asterisk-11.7.0-r1.ebuild
Date: Thu, 06 Feb 2014 16:48:23
Message-Id: 20140206164819.B20C22004C@flycatcher.gentoo.org
1 chainsaw 14/02/06 16:48:19
2
3 Modified: ChangeLog
4 Added: asterisk-11.7.0-r1.ebuild
5 Log:
6 Stop blowing up the V21 tone detector in SpanDSP by sanitising the input data properly. Patch by Michal Rybarik scavenged from an upstream bug report by Jaco Kroon. Closes bug #500504.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A)
9
10 Revision Changes Path
11 1.470 net-misc/asterisk/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.470&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.470&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.469&r2=1.470
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v
20 retrieving revision 1.469
21 retrieving revision 1.470
22 diff -u -r1.469 -r1.470
23 --- ChangeLog 13 Jan 2014 10:22:34 -0000 1.469
24 +++ ChangeLog 6 Feb 2014 16:48:19 -0000 1.470
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-misc/asterisk
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.469 2014/01/13 10:22:34 chainsaw Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.470 2014/02/06 16:48:19 chainsaw Exp $
30 +
31 +*asterisk-11.7.0-r1 (06 Feb 2014)
32 +
33 + 06 Feb 2014; Tony Vroon <chainsaw@g.o> +asterisk-11.7.0-r1.ebuild:
34 + Stop blowing up the V21 tone detector in SpanDSP by sanitising the input data
35 + properly. Patch by Michal Rybarik scavenged from an upstream bug report by
36 + Jaco Kroon. Closes bug #500504.
37
38 *asterisk-12.0.0 (13 Jan 2014)
39
40
41
42
43 1.1 net-misc/asterisk/asterisk-11.7.0-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.7.0-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.7.0-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: asterisk-11.7.0-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.7.0-r1.ebuild,v 1.1 2014/02/06 16:48:19 chainsaw Exp $
53
54 EAPI=5
55 inherit autotools base eutils linux-info multilib user
56
57 MY_P="${PN}-${PV/_/-}"
58
59 DESCRIPTION="Asterisk: A Modular Open Source PBX System"
60 HOMEPAGE="http://www.asterisk.org/"
61 SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
62 mirror://gentoo/gentoo-asterisk-patchset-3.8.tar.bz2"
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~amd64 ~x86"
66
67 IUSE_VOICEMAIL_STORAGE="
68 +voicemail_storage_file
69 voicemail_storage_odbc
70 voicemail_storage_imap
71 "
72 IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc jabber ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
73 IUSE_EXPAND="VOICEMAIL_STORAGE"
74 REQUIRED_USE="gtalk? ( jabber )
75 ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
76 voicemail_storage_odbc? ( odbc )
77 "
78
79 EPATCH_SUFFIX="patch"
80 PATCHES=( "${WORKDIR}/asterisk-patchset" )
81
82 RDEPEND="dev-db/sqlite:3
83 dev-libs/popt
84 dev-libs/libxml2
85 dev-libs/openssl
86 sys-libs/ncurses
87 sys-libs/zlib
88 alsa? ( media-libs/alsa-lib )
89 bluetooth? ( net-wireless/bluez )
90 calendar? ( net-libs/neon
91 dev-libs/libical
92 dev-libs/iksemel )
93 caps? ( sys-libs/libcap )
94 cluster? ( sys-cluster/corosync )
95 curl? ( net-misc/curl )
96 dahdi? ( >=net-libs/libpri-1.4.12_beta2
97 net-misc/dahdi-tools )
98 freetds? ( dev-db/freetds )
99 gtalk? ( dev-libs/iksemel )
100 http? ( dev-libs/gmime:2.4 )
101 iconv? ( virtual/libiconv )
102 ilbc? ( dev-libs/ilbc-rfc3951 )
103 jabber? ( dev-libs/iksemel )
104 ldap? ( net-nds/openldap )
105 libedit? ( dev-libs/libedit )
106 lua? ( dev-lang/lua )
107 mysql? ( virtual/mysql )
108 newt? ( dev-libs/newt )
109 odbc? ( dev-db/unixODBC )
110 osplookup? ( net-libs/osptoolkit )
111 portaudio? ( media-libs/portaudio )
112 postgres? ( dev-db/postgresql-base )
113 radius? ( net-dialup/radiusclient-ng )
114 selinux? ( sec-policy/selinux-asterisk )
115 snmp? ( net-analyzer/net-snmp )
116 span? ( media-libs/spandsp )
117 speex? ( media-libs/speex )
118 srtp? ( net-libs/libsrtp )
119 vorbis? ( media-libs/libvorbis )"
120
121 DEPEND="${RDEPEND}
122 !net-libs/openh323
123 !net-libs/pjsip
124 voicemail_storage_imap? ( virtual/imap-c-client )
125 "
126
127 RDEPEND="${RDEPEND}
128 syslog? ( virtual/logger )"
129
130 PDEPEND="net-misc/asterisk-core-sounds
131 net-misc/asterisk-extra-sounds
132 net-misc/asterisk-moh-opsound"
133
134 S="${WORKDIR}/${MY_P}"
135
136 pkg_setup() {
137 CONFIG_CHECK="~!NF_CONNTRACK_SIP"
138 local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
139 have reported that this module dropped critical SIP packets in their deployments. You
140 may want to disable it if you see such problems."
141 check_extra_config
142
143 enewgroup asterisk
144 enewgroup dialout 20
145 enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
146 }
147
148 src_prepare() {
149 base_src_prepare
150 AT_M4DIR=autoconf eautoreconf
151 }
152
153 src_configure() {
154 local vmst
155
156 econf \
157 --libdir="/usr/$(get_libdir)" \
158 --localstatedir="/var" \
159 --with-crypto \
160 --with-gsm=internal \
161 --with-popt \
162 --with-ssl \
163 --with-z \
164 --without-pwlib \
165 $(use_with caps cap) \
166 $(use_with http gmime) \
167 $(use_with newt) \
168 $(use_with portaudio)
169
170 # Blank out sounds/sounds.xml file to prevent
171 # asterisk from installing sounds files (we pull them in via
172 # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
173 >"${S}"/sounds/sounds.xml
174
175 # That NATIVE_ARCH chatter really is quite bothersome
176 sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
177
178 # Compile menuselect binary for optional components
179 emake menuselect.makeopts
180
181 # Broken functionality is forcibly disabled (bug #360143)
182 menuselect/menuselect --disable chan_misdn menuselect.makeopts
183 menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
184
185 # Utility set is forcibly enabled (bug #358001)
186 menuselect/menuselect --enable smsq menuselect.makeopts
187 menuselect/menuselect --enable streamplayer menuselect.makeopts
188 menuselect/menuselect --enable aelparse menuselect.makeopts
189 menuselect/menuselect --enable astman menuselect.makeopts
190
191 # this is connected, otherwise it would not find
192 # ast_pktccops_gate_alloc symbol
193 menuselect/menuselect --enable chan_mgcp menuselect.makeopts
194 menuselect/menuselect --enable res_pktccops menuselect.makeopts
195
196 # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
197 menuselect/menuselect --enable pbx_dundi menuselect.makeopts
198 menuselect/menuselect --enable func_aes menuselect.makeopts
199 menuselect/menuselect --enable chan_iax2 menuselect.makeopts
200
201 # SQlite3 is now the main database backend, enable related features
202 menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
203 menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
204
205 # The others are based on USE-flag settings
206 use_select() {
207 local state=$(use "$1" && echo enable || echo disable)
208 shift # remove use from parameters
209
210 while [[ -n $1 ]]; do
211 menuselect/menuselect --${state} "$1" menuselect.makeopts
212 shift
213 done
214 }
215
216 use_select alsa chan_alsa
217 use_select bluetooth chan_mobile
218 use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
219 use_select cluster res_corosync
220 use_select curl func_curl res_config_curl res_curl
221 use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi
222 use_select freetds {cdr,cel}_tds
223 use_select gtalk chan_motif
224 use_select http res_http_post
225 use_select iconv func_iconv
226 use_select jabber res_xmpp
227 use_select ilbc codec_ilbc format_ilbc
228 use_select ldap res_config_ldap
229 use_select lua pbx_lua
230 use_select mysql app_mysql cdr_mysql res_config_mysql
231 use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
232 use_select osplookup app_osplookup
233 use_select oss chan_oss
234 use_select postgres {cdr,cel}_pgsql res_config_pgsql
235 use_select radius {cdr,cel}_radius
236 use_select snmp res_snmp
237 use_select span res_fax_spandsp
238 use_select speex {codec,func}_speex
239 use_select srtp res_srtp
240 use_select syslog cdr_syslog
241 use_select vorbis format_ogg_vorbis
242
243 # Voicemail storage ...
244 for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
245 if use ${vmst}; then
246 menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
247 fi
248 done
249
250 if use debug; then
251 for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
252 menuselect/menuselect --enable $o menuselect.makeopts
253 done
254 fi
255 }
256
257 src_compile() {
258 ASTLDFLAGS="${LDFLAGS}" emake
259 }
260
261 src_install() {
262 mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
263 emake DESTDIR="${D}" installdirs
264 emake DESTDIR="${D}" install
265
266 if use radius; then
267 insinto /etc/radiusclient-ng/
268 doins contrib/dictionary.digium
269 fi
270 if use samples; then
271 emake DESTDIR="${D}" samples
272 for conffile in "${D}"etc/asterisk/*.*
273 do
274 chown asterisk:asterisk $conffile
275 chmod 0660 $conffile
276 done
277 einfo "Sample files have been installed"
278 else
279 einfo "Skipping installation of sample files..."
280 rm -f "${D}"var/lib/asterisk/mohmp3/* || die
281 rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
282 rm -f "${D}"var/lib/asterisk/agi-bin/* || die
283 rm -f "${D}"etc/asterisk/* || die
284 fi
285 rm -rf "${D}"var/spool/asterisk/voicemail/default || die
286
287 # keep directories
288 diropts -m 0770 -o asterisk -g asterisk
289 keepdir /etc/asterisk
290 keepdir /var/lib/asterisk
291 keepdir /var/spool/asterisk
292 keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
293 diropts -m 0750 -o asterisk -g asterisk
294 keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
295
296 newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk
297 newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
298
299 # install the upgrade documentation
300 #
301 dodoc README UPGRADE* BUGS CREDITS
302
303 # install extra documentation
304 #
305 if use doc
306 then
307 dodoc doc/*.txt
308 dodoc doc/*.pdf
309 fi
310
311 # install SIP scripts; bug #300832
312 #
313 dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
314 dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
315 dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
316 dodoc "${FILESDIR}/1.6.2/call_data.txt"
317
318 # install logrotate snippet; bug #329281
319 #
320 insinto /etc/logrotate.d
321 newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk
322 }
323
324 pkg_postinst() {
325 #
326 # Announcements, warnings, reminders...
327 #
328 einfo "Asterisk has been installed"
329 echo
330 elog "If you want to know more about asterisk, visit these sites:"
331 elog "http://www.asteriskdocs.org/"
332 elog "http://www.voip-info.org/wiki-Asterisk"
333 echo
334 elog "http://www.automated.it/guidetoasterisk.htm"
335 echo
336 elog "Gentoo VoIP IRC Channel:"
337 elog "#gentoo-voip @ irc.freenode.net"
338 echo
339 echo
340 elog "Please read the Asterisk 11 upgrade document:"
341 elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11"
342 }
343
344 pkg_config() {
345 einfo "Do you want to reset file permissions and ownerships (y/N)?"
346
347 read tmp
348 tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
349
350 if [[ "$tmp" = "y" ]] ||\
351 [[ "$tmp" = "yes" ]]
352 then
353 einfo "Resetting permissions to defaults..."
354
355 for x in spool run lib log; do
356 chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
357 chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
358 done
359
360 chown -R root:asterisk "${ROOT}"etc/asterisk
361 chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
362
363 einfo "done"
364 else
365 einfo "skipping"
366 fi
367 }