Gentoo Archives: gentoo-commits

From: Matthew Smith <matthew@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/asterisk/
Date: Tue, 23 Aug 2022 08:59:26
Message-Id: 1661244561.9e85822eb60d0f8b3b3a991f4031c990ac1cce9b.matthew@gentoo
1 commit: 9e85822eb60d0f8b3b3a991f4031c990ac1cce9b
2 Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
3 AuthorDate: Tue Aug 23 08:27:20 2022 +0000
4 Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 23 08:49:21 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e85822e
7
8 net-misc/asterisk: Remove <16.26.1:16 (security)
9
10 Bug: https://bugs.gentoo.org/838391
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
13 Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
14
15 net-misc/asterisk/Manifest | 3 -
16 net-misc/asterisk/asterisk-16.22.0-r1.ebuild | 367 ---------------------------
17 net-misc/asterisk/asterisk-16.23.0-r1.ebuild | 367 ---------------------------
18 net-misc/asterisk/asterisk-16.24.0-r1.ebuild | 367 ---------------------------
19 4 files changed, 1104 deletions(-)
20
21 diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
22 index c0d412e23a98..3500332a3261 100644
23 --- a/net-misc/asterisk/Manifest
24 +++ b/net-misc/asterisk/Manifest
25 @@ -1,6 +1,3 @@
26 -DIST asterisk-16.22.0.tar.gz 27925083 BLAKE2B ce700f8924fb2c7c8fc521879c0768595eb7462bb3aa78dd8b64c8a268b357e522ece17c6c4a02a4e17c16bad5141d5c2c15b602d335567be5a3df49f67300ca SHA512 7032da647f4063320fb2ea9c3cd7b0079fbb907e5c8f9d5cdc4197c82d07c99c75bfdcace5c74a593573cd0d9a1b9eb73b2030dc0b13604abb481a311a742173
27 -DIST asterisk-16.23.0.tar.gz 27960909 BLAKE2B 60aa12e41c199da7c052555f5716fd7325de66d0821c8f285635c8ad01435a182c670b12c9d3959ce8206b1bad255e61eeea199bf23b9dd49915da84487e2ce2 SHA512 d9f6cc083afb858ce48b090bea6a8479679ff840eb35dbc6af7d88ded17539c6e906547a7d936de31b3a50d692df1ccce2fe40b81bba1dc6a82a78c94e1198c4
28 -DIST asterisk-16.24.0.tar.gz 27987904 BLAKE2B 2a179366d3853afd6528b7b61c33b6683e924ae62bb4cbfd04b3e6717b4d73345b893632164396a5587d633d60338615f69a02d1f8b7f7ac3903131e209825ea SHA512 0c770264fad5a5f4c8cc6572b524349337635f0a8def26391897776d7ba4ec8f0cf595f588abc75f9f37ba941a56b7d3704b3ef3ddb4b67d3e4e341992e8f815
29 DIST asterisk-16.26.1.tar.gz 28001023 BLAKE2B d426566827bd3466720f94eed04a654edac3566fd7cdd77e0a1596d4536b5612e24d48e8dc6891a89f2f63feef938a5c1fd6898c5a5efcd56d1a11500fa9e00b SHA512 cc8c72c8167210bc506ee224f83208d1c0f983a9e061465a25b133fce526fdf56693a9e5cbb1f65d13cb9c9515619663748b332c704d17e21d90ef37a697948a
30 DIST asterisk-16.27.0.tar.gz 28014649 BLAKE2B 785650674bb2762ab898118cf49aa2cddde60f7e42df0a882751e36053f3cfb7de94475acf6bd484a1998c04b1edd1dca2ee4e9895bf9e411d9b09f91f7a4743 SHA512 ae016a79f8c38c5ae0069d0fa7434a564c8a72efa69135ce17dc7febf220a189ef47aba064ab39a2f49be0f7d5138b36e29f2d004ba51aa3724708efce645d1e
31 DIST asterisk-18.10.0.tar.gz 28071071 BLAKE2B 750cebfdb8ae0485e29b9b92c652e7e1aaea6701e2dd14679b271e22360aac5a6aa5f7570c7a8255999c60cebcf9fae118a6e949ee2413adc250fd47ad214ef1 SHA512 d0746431d87d7c5ce0b76b935cf144ea6a8f759f0dbc012f9a4d7a838ac8f811c3ffde539de5f44d4298c752e3a3242e00c9cf02824207c09c72f90f58898d2e
32
33 diff --git a/net-misc/asterisk/asterisk-16.22.0-r1.ebuild b/net-misc/asterisk/asterisk-16.22.0-r1.ebuild
34 deleted file mode 100644
35 index b4d9db65f36e..000000000000
36 --- a/net-misc/asterisk/asterisk-16.22.0-r1.ebuild
37 +++ /dev/null
38 @@ -1,367 +0,0 @@
39 -# Copyright 1999-2022 Gentoo Authors
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -EAPI=7
43 -
44 -LUA_COMPAT=( lua5-{1..4} )
45 -
46 -inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles
47 -
48 -DESCRIPTION="Asterisk: A Modular Open Source PBX System"
49 -HOMEPAGE="https://www.asterisk.org/"
50 -SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz"
51 -LICENSE="GPL-2"
52 -SLOT="0/${PV%%.*}"
53 -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
54 -
55 -IUSE_VOICEMAIL_STORAGE=(
56 - +voicemail_storage_file
57 - voicemail_storage_odbc
58 - voicemail_storage_imap
59 -)
60 -IUSE="${IUSE_VOICEMAIL_STORAGE[*]} alsa blocks bluetooth calendar +caps cluster codec2 curl dahdi debug deprecated doc freetds gtalk http iconv ilbc ldap lua mysql newt odbc oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog systemd unbound vorbis xmpp"
61 -IUSE_EXPAND="VOICEMAIL_STORAGE"
62 -REQUIRED_USE="gtalk? ( xmpp )
63 - lua? ( ${LUA_REQUIRED_USE} )
64 - ^^ ( ${IUSE_VOICEMAIL_STORAGE[*]//+/} )
65 - voicemail_storage_odbc? ( odbc )
66 -"
67 -
68 -PATCHES=(
69 - "${FILESDIR}/${PN}-16.16.2-no-var-run-install.patch"
70 -)
71 -
72 -DEPEND="acct-user/asterisk
73 - acct-group/asterisk
74 - dev-db/sqlite:3
75 - dev-libs/popt
76 - >=dev-libs/jansson-2.11:=
77 - dev-libs/libedit
78 - dev-libs/libxml2:2
79 - dev-libs/libxslt
80 - sys-apps/util-linux
81 - sys-libs/zlib
82 - virtual/libcrypt:=
83 - alsa? ( media-libs/alsa-lib )
84 - bluetooth? ( net-wireless/bluez:= )
85 - calendar? (
86 - net-libs/neon:=
87 - dev-libs/libical:=
88 - dev-libs/iksemel
89 - )
90 - caps? ( sys-libs/libcap )
91 - blocks? ( sys-libs/blocksruntime )
92 - cluster? ( sys-cluster/corosync )
93 - codec2? ( media-libs/codec2:= )
94 - curl? ( net-misc/curl )
95 - dahdi? (
96 - net-libs/libpri
97 - net-misc/dahdi-tools
98 - )
99 - freetds? ( dev-db/freetds )
100 - gtalk? ( dev-libs/iksemel )
101 - http? ( dev-libs/gmime:2.6 )
102 - iconv? ( virtual/libiconv )
103 - ilbc? ( media-libs/libilbc )
104 - ldap? ( net-nds/openldap:= )
105 - lua? ( ${LUA_DEPS} )
106 - mysql? ( dev-db/mysql-connector-c:= )
107 - newt? ( dev-libs/newt )
108 - odbc? ( dev-db/unixODBC )
109 - pjproject? ( >=net-libs/pjproject-2.9:= )
110 - portaudio? ( media-libs/portaudio )
111 - postgres? ( dev-db/postgresql:* )
112 - radius? ( net-dialup/freeradius-client )
113 - snmp? ( net-analyzer/net-snmp:= )
114 - span? ( media-libs/spandsp )
115 - speex? (
116 - media-libs/libogg
117 - media-libs/speex
118 - media-libs/speexdsp
119 - )
120 - srtp? ( net-libs/libsrtp:0 )
121 - ssl? (
122 - dev-libs/openssl:0=
123 - )
124 - systemd? ( sys-apps/systemd )
125 - !systemd? ( !sys-apps/systemd )
126 - unbound? ( net-dns/unbound )
127 - vorbis? (
128 - media-libs/libogg
129 - media-libs/libvorbis
130 - )
131 - voicemail_storage_imap? ( virtual/imap-c-client )
132 - xmpp? ( dev-libs/iksemel )
133 -"
134 -
135 -RDEPEND="${DEPEND}
136 - net-misc/asterisk-core-sounds
137 - net-misc/asterisk-extra-sounds
138 - net-misc/asterisk-moh-opsound
139 - selinux? ( sec-policy/selinux-asterisk )
140 - syslog? ( virtual/logger )"
141 -
142 -BDEPEND="dev-libs/libxml2:2
143 - virtual/pkgconfig"
144 -
145 -QA_DT_NEEDED="/usr/lib.*/libasteriskssl[.]so[.][0-9]\+"
146 -
147 -_make_args=(
148 - "NOISY_BUILD=yes"
149 - "ASTDBDIR=\$(ASTDATADIR)/astdb"
150 - "ASTVARRUNDIR=/run/asterisk"
151 - "ASTCACHEDIR=/var/cache/asterisk"
152 - "OPTIMIZE="
153 - "DEBUG="
154 - "DESTDIR=${D}"
155 - "CONFIG_SRC=configs/samples"
156 - "CONFIG_EXTEN=.sample"
157 -)
158 -
159 -pkg_pretend() {
160 - CONFIG_CHECK="~!NF_CONNTRACK_SIP"
161 - local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
162 - have reported that this module dropped critical SIP packets in their deployments. You
163 - may want to disable it if you see such problems."
164 - check_extra_config
165 -
166 - [[ "${MERGE_TYPE}" == binary ]] && return
167 -
168 - if tc-is-clang; then
169 - use blocks || die "CC=clang requires USE=blocks"
170 - else
171 - use blocks && die "USE=blocks can only be used with CC=clang"
172 - fi
173 -}
174 -
175 -pkg_setup() {
176 - use lua && lua-single_pkg_setup
177 -}
178 -
179 -src_prepare() {
180 - default
181 - AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" \
182 - AC_CONFIG_SUBDIRS=menuselect eautoreconf
183 -}
184 -
185 -src_configure() {
186 - local vmst
187 - local copt cstate
188 -
189 - econf \
190 - LUA_VERSION="${ELUA#lua}" \
191 - --libdir="/usr/$(get_libdir)" \
192 - --localstatedir="/var" \
193 - --with-crypto \
194 - --with-gsm=internal \
195 - --with-popt \
196 - --with-z \
197 - --with-libedit \
198 - --without-jansson-bundled \
199 - --without-pjproject-bundled \
200 - $(use_with caps cap) \
201 - $(use_with codec2) \
202 - $(use_with lua lua) \
203 - $(use_with http gmime) \
204 - $(use_with newt) \
205 - $(use_with pjproject) \
206 - $(use_with portaudio) \
207 - $(use_with ssl) \
208 - $(use_with unbound)
209 -
210 - _menuselect() {
211 - menuselect/menuselect "$@" || die "menuselect $* failed."
212 - }
213 -
214 - _use_select() {
215 - local state=$(use "$1" && echo enable || echo disable)
216 - shift # remove use from parameters
217 -
218 - while [[ -n $1 ]]; do
219 - _menuselect --${state} "$1" menuselect.makeopts
220 - shift
221 - done
222 - }
223 -
224 - # Blank out sounds/sounds.xml file to prevent
225 - # asterisk from installing sounds files (we pull them in via
226 - # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
227 - >"${S}"/sounds/sounds.xml
228 -
229 - # That NATIVE_ARCH chatter really is quite bothersome
230 - sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
231 -
232 - # Compile menuselect binary for optional components
233 - emake "${_make_args[@]}" menuselect.makeopts
234 -
235 - # Disable BUILD_NATIVE (bug #667498)
236 - _menuselect --disable build_native menuselect.makeopts
237 -
238 - # Broken functionality is forcibly disabled (bug #360143)
239 - _menuselect --disable chan_misdn menuselect.makeopts
240 - _menuselect --disable chan_ooh323 menuselect.makeopts
241 -
242 - # Utility set is forcibly enabled (bug #358001)
243 - _menuselect --enable smsq menuselect.makeopts
244 - _menuselect --enable streamplayer menuselect.makeopts
245 - _menuselect --enable aelparse menuselect.makeopts
246 - _menuselect --enable astman menuselect.makeopts
247 -
248 - # this is connected, otherwise it would not find
249 - # ast_pktccops_gate_alloc symbol
250 - _menuselect --enable chan_mgcp menuselect.makeopts
251 - _menuselect --enable res_pktccops menuselect.makeopts
252 -
253 - # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
254 - _menuselect --enable pbx_dundi menuselect.makeopts
255 - _menuselect --enable func_aes menuselect.makeopts
256 - _menuselect --enable chan_iax2 menuselect.makeopts
257 -
258 - # SQlite3 is now the main database backend, enable related features
259 - _menuselect --enable cdr_sqlite3_custom menuselect.makeopts
260 - _menuselect --enable cel_sqlite3_custom menuselect.makeopts
261 -
262 - # The others are based on USE-flag settings
263 - _use_select alsa chan_alsa
264 - _use_select bluetooth chan_mobile
265 - _use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
266 - _use_select cluster res_corosync
267 - _use_select codec2 codec_codec2
268 - _use_select curl func_curl res_config_curl res_curl
269 - _use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
270 - _use_select deprecated app_macro
271 - _use_select freetds {cdr,cel}_tds
272 - _use_select gtalk chan_motif
273 - _use_select http res_http_post
274 - _use_select iconv func_iconv
275 - _use_select ilbc codec_ilbc format_ilbc
276 - _use_select ldap res_config_ldap
277 - _use_select lua pbx_lua
278 - _use_select mysql app_mysql cdr_mysql res_config_mysql
279 - _use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
280 - _use_select oss chan_oss
281 - _use_select postgres {cdr,cel}_pgsql res_config_pgsql
282 - _use_select radius {cdr,cel}_radius
283 - _use_select snmp res_snmp
284 - _use_select span res_fax_spandsp
285 - _use_select speex {codec,func}_speex
286 - _use_select speex format_ogg_speex
287 - _use_select srtp res_srtp
288 - _use_select statsd res_statsd res_{endpoint,chan}_stats
289 - _use_select syslog cdr_syslog
290 - _use_select vorbis format_ogg_vorbis
291 - _use_select xmpp res_xmpp
292 -
293 - # Voicemail storage ...
294 - for vmst in "${IUSE_VOICEMAIL_STORAGE[@]}"; do
295 - if use "${vmst#+}"; then
296 - _menuselect --enable "$(echo "${vmst##*_}" | tr '[:lower:]' '[:upper:]')_STORAGE" menuselect.makeopts
297 - fi
298 - done
299 -
300 - if use debug; then
301 - for o in DONT_OPTIMIZE DEBUG_FD_LEAKS MALLOC_DEBUG BETTER_BACKTRACES; do
302 - _menuselect --enable "${o}" menuselect.makeopts
303 - done
304 - fi
305 -
306 - if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then
307 - for copt in ${GENTOO_ASTERISK_CUSTOM_MENUSELECT}; do
308 - cstate=--enable
309 - [[ "${copt}" == -* ]] && cstate=--disable
310 - ebegin "Custom option ${copt#[-+]} ${cstate:2}d"
311 - _menuselect ${cstate} "${copt#[-+]}"
312 - eend $?
313 - done
314 - fi
315 -}
316 -
317 -src_compile() {
318 - emake "${_make_args[@]}"
319 -}
320 -
321 -src_install() {
322 - local d
323 -
324 - dodir "/usr/$(get_libdir)/pkgconfig"
325 -
326 - diropts -m 0750 -o root -g asterisk
327 - dodir /etc/asterisk
328 -
329 - emake "${_make_args[@]}" install install-configs
330 -
331 - fowners asterisk: /var/lib/asterisk/astdb
332 -
333 - if use radius; then
334 - insinto /etc/radiusclient/
335 - doins contrib/dictionary.digium
336 - fi
337 -
338 - # keep directories
339 - diropts -m 0750 -o asterisk -g root
340 - keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail,recording,outgoing}
341 - diropts -m 0750 -o asterisk -g asterisk
342 - keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
343 -
344 - newinitd "${FILESDIR}"/initd-16.22.0-18.8.0 asterisk
345 - newconfd "${FILESDIR}"/confd-16.16.2-r1 asterisk
346 -
347 - systemd_dounit "${FILESDIR}"/asterisk.service
348 - newtmpfiles "${FILESDIR}"/asterisk.tmpfiles-16.22.0-18.8.0.conf asterisk.conf
349 - systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
350 -
351 - # Reset diropts else dodoc uses it for doc installations.
352 - diropts -m0755
353 -
354 - # install the upgrade documentation
355 - dodoc UPGRADE* BUGS CREDITS
356 -
357 - # install extra documentation
358 - use doc && dodoc doc/*.{txt,pdf}
359 -
360 - # install logrotate snippet; bug #329281
361 - #
362 - insinto /etc/logrotate.d
363 - newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
364 -
365 - # Asterisk installs a few folders that's empty by design,
366 - # but still required. This finds them, and marks them for
367 - # portage.
368 - while read d <&3; do
369 - keepdir "${d#${ED}}"
370 - done 3< <(find "${ED}"/var -type d -empty || die "Find failed.")
371 -}
372 -
373 -pkg_postinst() {
374 - tmpfiles_process asterisk.conf
375 -
376 - if [ -z "${REPLACING_VERSIONS}" ]; then
377 - elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/"
378 - elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat"
379 - elif [ "$(ver_cut 1 "${REPLACING_VERSIONS}")" != "$(ver_cut 1)" ]; then
380 - elog "You are updating from Asterisk $(ver_cut 1 "${REPLACING_VERSIONS}") upgrade document:"
381 - elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+$(ver_cut 1)"
382 - elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat"
383 - fi
384 -
385 - if use deprecated; then
386 - ewarn "You really aught to port whatever code you have that depends on this since these are going to go away."
387 - ewarn "Refer: https://wiki.asterisk.org/wiki/display/AST/Module+Deprecation"
388 - fi
389 -
390 - if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then
391 - ewarn "You are using GENTOO_ASTERISK_CUSTOM_MENUSELECT, this should only be used"
392 - ewarn "for debugging, for anything else, please file a bug on https://bugs.gentoo.org"
393 - fi
394 -
395 - if [[ -f /var/lib/asterisk/astdb.sqlite3 ]]; then
396 - ewarn "Default astdb location has changed from /var/lib/asterisk to /var/lib/asterisk/astdb"
397 - ewarn "You still have a /var/lib/asterisk/astdb.sqlite file. You need to either set"
398 - ewarn "astdbdir in /etc/asterisk/asterisk.conf to /var/lib/asterisk or follow these"
399 - ewarn "steps to migrate:"
400 - ewarn "1. /etc/init.d/asterisk stop"
401 - ewarn "2. mv /var/lib/asterisk/astdb.sqlite /var/lib/asterisk/astdb/"
402 - ewarn "3. /etc/init.d/asterisk start"
403 - ewarn "This update was done partly for security reasons so that /var/lib/asterisk can be root owned."
404 - fi
405 -}
406
407 diff --git a/net-misc/asterisk/asterisk-16.23.0-r1.ebuild b/net-misc/asterisk/asterisk-16.23.0-r1.ebuild
408 deleted file mode 100644
409 index 5651421ddd25..000000000000
410 --- a/net-misc/asterisk/asterisk-16.23.0-r1.ebuild
411 +++ /dev/null
412 @@ -1,367 +0,0 @@
413 -# Copyright 1999-2022 Gentoo Authors
414 -# Distributed under the terms of the GNU General Public License v2
415 -
416 -EAPI=7
417 -
418 -LUA_COMPAT=( lua5-{1..4} )
419 -
420 -inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles
421 -
422 -DESCRIPTION="Asterisk: A Modular Open Source PBX System"
423 -HOMEPAGE="https://www.asterisk.org/"
424 -SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz"
425 -LICENSE="GPL-2"
426 -SLOT="0/${PV%%.*}"
427 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
428 -
429 -IUSE_VOICEMAIL_STORAGE=(
430 - +voicemail_storage_file
431 - voicemail_storage_odbc
432 - voicemail_storage_imap
433 -)
434 -IUSE="${IUSE_VOICEMAIL_STORAGE[*]} alsa blocks bluetooth calendar +caps cluster codec2 curl dahdi debug deprecated doc freetds gtalk http iconv ilbc ldap lua mysql newt odbc oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog systemd unbound vorbis xmpp"
435 -IUSE_EXPAND="VOICEMAIL_STORAGE"
436 -REQUIRED_USE="gtalk? ( xmpp )
437 - lua? ( ${LUA_REQUIRED_USE} )
438 - ^^ ( ${IUSE_VOICEMAIL_STORAGE[*]//+/} )
439 - voicemail_storage_odbc? ( odbc )
440 -"
441 -
442 -PATCHES=(
443 - "${FILESDIR}/${PN}-16.16.2-no-var-run-install.patch"
444 -)
445 -
446 -DEPEND="acct-user/asterisk
447 - acct-group/asterisk
448 - dev-db/sqlite:3
449 - dev-libs/popt
450 - >=dev-libs/jansson-2.11:=
451 - dev-libs/libedit
452 - dev-libs/libxml2:2
453 - dev-libs/libxslt
454 - sys-apps/util-linux
455 - sys-libs/zlib
456 - virtual/libcrypt:=
457 - alsa? ( media-libs/alsa-lib )
458 - bluetooth? ( net-wireless/bluez:= )
459 - calendar? (
460 - net-libs/neon:=
461 - dev-libs/libical:=
462 - dev-libs/iksemel
463 - )
464 - caps? ( sys-libs/libcap )
465 - blocks? ( sys-libs/blocksruntime )
466 - cluster? ( sys-cluster/corosync )
467 - codec2? ( media-libs/codec2:= )
468 - curl? ( net-misc/curl )
469 - dahdi? (
470 - net-libs/libpri
471 - net-misc/dahdi-tools
472 - )
473 - freetds? ( dev-db/freetds )
474 - gtalk? ( dev-libs/iksemel )
475 - http? ( dev-libs/gmime:2.6 )
476 - iconv? ( virtual/libiconv )
477 - ilbc? ( media-libs/libilbc )
478 - ldap? ( net-nds/openldap:= )
479 - lua? ( ${LUA_DEPS} )
480 - mysql? ( dev-db/mysql-connector-c:= )
481 - newt? ( dev-libs/newt )
482 - odbc? ( dev-db/unixODBC )
483 - pjproject? ( >=net-libs/pjproject-2.9:= )
484 - portaudio? ( media-libs/portaudio )
485 - postgres? ( dev-db/postgresql:* )
486 - radius? ( net-dialup/freeradius-client )
487 - snmp? ( net-analyzer/net-snmp:= )
488 - span? ( media-libs/spandsp )
489 - speex? (
490 - media-libs/libogg
491 - media-libs/speex
492 - media-libs/speexdsp
493 - )
494 - srtp? ( net-libs/libsrtp:0 )
495 - ssl? (
496 - dev-libs/openssl:0=
497 - )
498 - systemd? ( sys-apps/systemd )
499 - !systemd? ( !sys-apps/systemd )
500 - unbound? ( net-dns/unbound )
501 - vorbis? (
502 - media-libs/libogg
503 - media-libs/libvorbis
504 - )
505 - voicemail_storage_imap? ( virtual/imap-c-client )
506 - xmpp? ( dev-libs/iksemel )
507 -"
508 -
509 -RDEPEND="${DEPEND}
510 - net-misc/asterisk-core-sounds
511 - net-misc/asterisk-extra-sounds
512 - net-misc/asterisk-moh-opsound
513 - selinux? ( sec-policy/selinux-asterisk )
514 - syslog? ( virtual/logger )"
515 -
516 -BDEPEND="dev-libs/libxml2:2
517 - virtual/pkgconfig"
518 -
519 -QA_DT_NEEDED="/usr/lib.*/libasteriskssl[.]so[.][0-9]\+"
520 -
521 -_make_args=(
522 - "NOISY_BUILD=yes"
523 - "ASTDBDIR=\$(ASTDATADIR)/astdb"
524 - "ASTVARRUNDIR=/run/asterisk"
525 - "ASTCACHEDIR=/var/cache/asterisk"
526 - "OPTIMIZE="
527 - "DEBUG="
528 - "DESTDIR=${D}"
529 - "CONFIG_SRC=configs/samples"
530 - "CONFIG_EXTEN=.sample"
531 -)
532 -
533 -pkg_pretend() {
534 - CONFIG_CHECK="~!NF_CONNTRACK_SIP"
535 - local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
536 - have reported that this module dropped critical SIP packets in their deployments. You
537 - may want to disable it if you see such problems."
538 - check_extra_config
539 -
540 - [[ "${MERGE_TYPE}" == binary ]] && return
541 -
542 - if tc-is-clang; then
543 - use blocks || die "CC=clang requires USE=blocks"
544 - else
545 - use blocks && die "USE=blocks can only be used with CC=clang"
546 - fi
547 -}
548 -
549 -pkg_setup() {
550 - use lua && lua-single_pkg_setup
551 -}
552 -
553 -src_prepare() {
554 - default
555 - AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" \
556 - AC_CONFIG_SUBDIRS=menuselect eautoreconf
557 -}
558 -
559 -src_configure() {
560 - local vmst
561 - local copt cstate
562 -
563 - econf \
564 - LUA_VERSION="${ELUA#lua}" \
565 - --libdir="/usr/$(get_libdir)" \
566 - --localstatedir="/var" \
567 - --with-crypto \
568 - --with-gsm=internal \
569 - --with-popt \
570 - --with-z \
571 - --with-libedit \
572 - --without-jansson-bundled \
573 - --without-pjproject-bundled \
574 - $(use_with caps cap) \
575 - $(use_with codec2) \
576 - $(use_with lua lua) \
577 - $(use_with http gmime) \
578 - $(use_with newt) \
579 - $(use_with pjproject) \
580 - $(use_with portaudio) \
581 - $(use_with ssl) \
582 - $(use_with unbound)
583 -
584 - _menuselect() {
585 - menuselect/menuselect "$@" || die "menuselect $* failed."
586 - }
587 -
588 - _use_select() {
589 - local state=$(use "$1" && echo enable || echo disable)
590 - shift # remove use from parameters
591 -
592 - while [[ -n $1 ]]; do
593 - _menuselect --${state} "$1" menuselect.makeopts
594 - shift
595 - done
596 - }
597 -
598 - # Blank out sounds/sounds.xml file to prevent
599 - # asterisk from installing sounds files (we pull them in via
600 - # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
601 - >"${S}"/sounds/sounds.xml
602 -
603 - # That NATIVE_ARCH chatter really is quite bothersome
604 - sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
605 -
606 - # Compile menuselect binary for optional components
607 - emake "${_make_args[@]}" menuselect.makeopts
608 -
609 - # Disable BUILD_NATIVE (bug #667498)
610 - _menuselect --disable build_native menuselect.makeopts
611 -
612 - # Broken functionality is forcibly disabled (bug #360143)
613 - _menuselect --disable chan_misdn menuselect.makeopts
614 - _menuselect --disable chan_ooh323 menuselect.makeopts
615 -
616 - # Utility set is forcibly enabled (bug #358001)
617 - _menuselect --enable smsq menuselect.makeopts
618 - _menuselect --enable streamplayer menuselect.makeopts
619 - _menuselect --enable aelparse menuselect.makeopts
620 - _menuselect --enable astman menuselect.makeopts
621 -
622 - # this is connected, otherwise it would not find
623 - # ast_pktccops_gate_alloc symbol
624 - _menuselect --enable chan_mgcp menuselect.makeopts
625 - _menuselect --enable res_pktccops menuselect.makeopts
626 -
627 - # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
628 - _menuselect --enable pbx_dundi menuselect.makeopts
629 - _menuselect --enable func_aes menuselect.makeopts
630 - _menuselect --enable chan_iax2 menuselect.makeopts
631 -
632 - # SQlite3 is now the main database backend, enable related features
633 - _menuselect --enable cdr_sqlite3_custom menuselect.makeopts
634 - _menuselect --enable cel_sqlite3_custom menuselect.makeopts
635 -
636 - # The others are based on USE-flag settings
637 - _use_select alsa chan_alsa
638 - _use_select bluetooth chan_mobile
639 - _use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
640 - _use_select cluster res_corosync
641 - _use_select codec2 codec_codec2
642 - _use_select curl func_curl res_config_curl res_curl
643 - _use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
644 - _use_select deprecated app_macro
645 - _use_select freetds {cdr,cel}_tds
646 - _use_select gtalk chan_motif
647 - _use_select http res_http_post
648 - _use_select iconv func_iconv
649 - _use_select ilbc codec_ilbc format_ilbc
650 - _use_select ldap res_config_ldap
651 - _use_select lua pbx_lua
652 - _use_select mysql app_mysql cdr_mysql res_config_mysql
653 - _use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
654 - _use_select oss chan_oss
655 - _use_select postgres {cdr,cel}_pgsql res_config_pgsql
656 - _use_select radius {cdr,cel}_radius
657 - _use_select snmp res_snmp
658 - _use_select span res_fax_spandsp
659 - _use_select speex {codec,func}_speex
660 - _use_select speex format_ogg_speex
661 - _use_select srtp res_srtp
662 - _use_select statsd res_statsd res_{endpoint,chan}_stats
663 - _use_select syslog cdr_syslog
664 - _use_select vorbis format_ogg_vorbis
665 - _use_select xmpp res_xmpp
666 -
667 - # Voicemail storage ...
668 - for vmst in "${IUSE_VOICEMAIL_STORAGE[@]}"; do
669 - if use "${vmst#+}"; then
670 - _menuselect --enable "$(echo "${vmst##*_}" | tr '[:lower:]' '[:upper:]')_STORAGE" menuselect.makeopts
671 - fi
672 - done
673 -
674 - if use debug; then
675 - for o in DONT_OPTIMIZE DEBUG_FD_LEAKS MALLOC_DEBUG BETTER_BACKTRACES; do
676 - _menuselect --enable "${o}" menuselect.makeopts
677 - done
678 - fi
679 -
680 - if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then
681 - for copt in ${GENTOO_ASTERISK_CUSTOM_MENUSELECT}; do
682 - cstate=--enable
683 - [[ "${copt}" == -* ]] && cstate=--disable
684 - ebegin "Custom option ${copt#[-+]} ${cstate:2}d"
685 - _menuselect ${cstate} "${copt#[-+]}"
686 - eend $?
687 - done
688 - fi
689 -}
690 -
691 -src_compile() {
692 - emake "${_make_args[@]}"
693 -}
694 -
695 -src_install() {
696 - local d
697 -
698 - dodir "/usr/$(get_libdir)/pkgconfig"
699 -
700 - diropts -m 0750 -o root -g asterisk
701 - dodir /etc/asterisk
702 -
703 - emake "${_make_args[@]}" install install-configs
704 -
705 - fowners asterisk: /var/lib/asterisk/astdb
706 -
707 - if use radius; then
708 - insinto /etc/radiusclient/
709 - doins contrib/dictionary.digium
710 - fi
711 -
712 - # keep directories
713 - diropts -m 0750 -o asterisk -g root
714 - keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail,recording,outgoing}
715 - diropts -m 0750 -o asterisk -g asterisk
716 - keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
717 -
718 - newinitd "${FILESDIR}"/initd-16.22.0-18.8.0 asterisk
719 - newconfd "${FILESDIR}"/confd-16.16.2-r1 asterisk
720 -
721 - systemd_dounit "${FILESDIR}"/asterisk.service
722 - newtmpfiles "${FILESDIR}"/asterisk.tmpfiles-16.22.0-18.8.0.conf asterisk.conf
723 - systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
724 -
725 - # Reset diropts else dodoc uses it for doc installations.
726 - diropts -m0755
727 -
728 - # install the upgrade documentation
729 - dodoc UPGRADE* BUGS CREDITS
730 -
731 - # install extra documentation
732 - use doc && dodoc doc/*.{txt,pdf}
733 -
734 - # install logrotate snippet; bug #329281
735 - #
736 - insinto /etc/logrotate.d
737 - newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
738 -
739 - # Asterisk installs a few folders that's empty by design,
740 - # but still required. This finds them, and marks them for
741 - # portage.
742 - while read d <&3; do
743 - keepdir "${d#${ED}}"
744 - done 3< <(find "${ED}"/var -type d -empty || die "Find failed.")
745 -}
746 -
747 -pkg_postinst() {
748 - tmpfiles_process asterisk.conf
749 -
750 - if [ -z "${REPLACING_VERSIONS}" ]; then
751 - elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/"
752 - elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat"
753 - elif [ "$(ver_cut 1 "${REPLACING_VERSIONS}")" != "$(ver_cut 1)" ]; then
754 - elog "You are updating from Asterisk $(ver_cut 1 "${REPLACING_VERSIONS}") upgrade document:"
755 - elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+$(ver_cut 1)"
756 - elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat"
757 - fi
758 -
759 - if use deprecated; then
760 - ewarn "You really aught to port whatever code you have that depends on this since these are going to go away."
761 - ewarn "Refer: https://wiki.asterisk.org/wiki/display/AST/Module+Deprecation"
762 - fi
763 -
764 - if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then
765 - ewarn "You are using GENTOO_ASTERISK_CUSTOM_MENUSELECT, this should only be used"
766 - ewarn "for debugging, for anything else, please file a bug on https://bugs.gentoo.org"
767 - fi
768 -
769 - if [[ -f /var/lib/asterisk/astdb.sqlite3 ]]; then
770 - ewarn "Default astdb location has changed from /var/lib/asterisk to /var/lib/asterisk/astdb"
771 - ewarn "You still have a /var/lib/asterisk/astdb.sqlite file. You need to either set"
772 - ewarn "astdbdir in /etc/asterisk/asterisk.conf to /var/lib/asterisk or follow these"
773 - ewarn "steps to migrate:"
774 - ewarn "1. /etc/init.d/asterisk stop"
775 - ewarn "2. mv /var/lib/asterisk/astdb.sqlite /var/lib/asterisk/astdb/"
776 - ewarn "3. /etc/init.d/asterisk start"
777 - ewarn "This update was done partly for security reasons so that /var/lib/asterisk can be root owned."
778 - fi
779 -}
780
781 diff --git a/net-misc/asterisk/asterisk-16.24.0-r1.ebuild b/net-misc/asterisk/asterisk-16.24.0-r1.ebuild
782 deleted file mode 100644
783 index 5651421ddd25..000000000000
784 --- a/net-misc/asterisk/asterisk-16.24.0-r1.ebuild
785 +++ /dev/null
786 @@ -1,367 +0,0 @@
787 -# Copyright 1999-2022 Gentoo Authors
788 -# Distributed under the terms of the GNU General Public License v2
789 -
790 -EAPI=7
791 -
792 -LUA_COMPAT=( lua5-{1..4} )
793 -
794 -inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles
795 -
796 -DESCRIPTION="Asterisk: A Modular Open Source PBX System"
797 -HOMEPAGE="https://www.asterisk.org/"
798 -SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz"
799 -LICENSE="GPL-2"
800 -SLOT="0/${PV%%.*}"
801 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
802 -
803 -IUSE_VOICEMAIL_STORAGE=(
804 - +voicemail_storage_file
805 - voicemail_storage_odbc
806 - voicemail_storage_imap
807 -)
808 -IUSE="${IUSE_VOICEMAIL_STORAGE[*]} alsa blocks bluetooth calendar +caps cluster codec2 curl dahdi debug deprecated doc freetds gtalk http iconv ilbc ldap lua mysql newt odbc oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog systemd unbound vorbis xmpp"
809 -IUSE_EXPAND="VOICEMAIL_STORAGE"
810 -REQUIRED_USE="gtalk? ( xmpp )
811 - lua? ( ${LUA_REQUIRED_USE} )
812 - ^^ ( ${IUSE_VOICEMAIL_STORAGE[*]//+/} )
813 - voicemail_storage_odbc? ( odbc )
814 -"
815 -
816 -PATCHES=(
817 - "${FILESDIR}/${PN}-16.16.2-no-var-run-install.patch"
818 -)
819 -
820 -DEPEND="acct-user/asterisk
821 - acct-group/asterisk
822 - dev-db/sqlite:3
823 - dev-libs/popt
824 - >=dev-libs/jansson-2.11:=
825 - dev-libs/libedit
826 - dev-libs/libxml2:2
827 - dev-libs/libxslt
828 - sys-apps/util-linux
829 - sys-libs/zlib
830 - virtual/libcrypt:=
831 - alsa? ( media-libs/alsa-lib )
832 - bluetooth? ( net-wireless/bluez:= )
833 - calendar? (
834 - net-libs/neon:=
835 - dev-libs/libical:=
836 - dev-libs/iksemel
837 - )
838 - caps? ( sys-libs/libcap )
839 - blocks? ( sys-libs/blocksruntime )
840 - cluster? ( sys-cluster/corosync )
841 - codec2? ( media-libs/codec2:= )
842 - curl? ( net-misc/curl )
843 - dahdi? (
844 - net-libs/libpri
845 - net-misc/dahdi-tools
846 - )
847 - freetds? ( dev-db/freetds )
848 - gtalk? ( dev-libs/iksemel )
849 - http? ( dev-libs/gmime:2.6 )
850 - iconv? ( virtual/libiconv )
851 - ilbc? ( media-libs/libilbc )
852 - ldap? ( net-nds/openldap:= )
853 - lua? ( ${LUA_DEPS} )
854 - mysql? ( dev-db/mysql-connector-c:= )
855 - newt? ( dev-libs/newt )
856 - odbc? ( dev-db/unixODBC )
857 - pjproject? ( >=net-libs/pjproject-2.9:= )
858 - portaudio? ( media-libs/portaudio )
859 - postgres? ( dev-db/postgresql:* )
860 - radius? ( net-dialup/freeradius-client )
861 - snmp? ( net-analyzer/net-snmp:= )
862 - span? ( media-libs/spandsp )
863 - speex? (
864 - media-libs/libogg
865 - media-libs/speex
866 - media-libs/speexdsp
867 - )
868 - srtp? ( net-libs/libsrtp:0 )
869 - ssl? (
870 - dev-libs/openssl:0=
871 - )
872 - systemd? ( sys-apps/systemd )
873 - !systemd? ( !sys-apps/systemd )
874 - unbound? ( net-dns/unbound )
875 - vorbis? (
876 - media-libs/libogg
877 - media-libs/libvorbis
878 - )
879 - voicemail_storage_imap? ( virtual/imap-c-client )
880 - xmpp? ( dev-libs/iksemel )
881 -"
882 -
883 -RDEPEND="${DEPEND}
884 - net-misc/asterisk-core-sounds
885 - net-misc/asterisk-extra-sounds
886 - net-misc/asterisk-moh-opsound
887 - selinux? ( sec-policy/selinux-asterisk )
888 - syslog? ( virtual/logger )"
889 -
890 -BDEPEND="dev-libs/libxml2:2
891 - virtual/pkgconfig"
892 -
893 -QA_DT_NEEDED="/usr/lib.*/libasteriskssl[.]so[.][0-9]\+"
894 -
895 -_make_args=(
896 - "NOISY_BUILD=yes"
897 - "ASTDBDIR=\$(ASTDATADIR)/astdb"
898 - "ASTVARRUNDIR=/run/asterisk"
899 - "ASTCACHEDIR=/var/cache/asterisk"
900 - "OPTIMIZE="
901 - "DEBUG="
902 - "DESTDIR=${D}"
903 - "CONFIG_SRC=configs/samples"
904 - "CONFIG_EXTEN=.sample"
905 -)
906 -
907 -pkg_pretend() {
908 - CONFIG_CHECK="~!NF_CONNTRACK_SIP"
909 - local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
910 - have reported that this module dropped critical SIP packets in their deployments. You
911 - may want to disable it if you see such problems."
912 - check_extra_config
913 -
914 - [[ "${MERGE_TYPE}" == binary ]] && return
915 -
916 - if tc-is-clang; then
917 - use blocks || die "CC=clang requires USE=blocks"
918 - else
919 - use blocks && die "USE=blocks can only be used with CC=clang"
920 - fi
921 -}
922 -
923 -pkg_setup() {
924 - use lua && lua-single_pkg_setup
925 -}
926 -
927 -src_prepare() {
928 - default
929 - AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" \
930 - AC_CONFIG_SUBDIRS=menuselect eautoreconf
931 -}
932 -
933 -src_configure() {
934 - local vmst
935 - local copt cstate
936 -
937 - econf \
938 - LUA_VERSION="${ELUA#lua}" \
939 - --libdir="/usr/$(get_libdir)" \
940 - --localstatedir="/var" \
941 - --with-crypto \
942 - --with-gsm=internal \
943 - --with-popt \
944 - --with-z \
945 - --with-libedit \
946 - --without-jansson-bundled \
947 - --without-pjproject-bundled \
948 - $(use_with caps cap) \
949 - $(use_with codec2) \
950 - $(use_with lua lua) \
951 - $(use_with http gmime) \
952 - $(use_with newt) \
953 - $(use_with pjproject) \
954 - $(use_with portaudio) \
955 - $(use_with ssl) \
956 - $(use_with unbound)
957 -
958 - _menuselect() {
959 - menuselect/menuselect "$@" || die "menuselect $* failed."
960 - }
961 -
962 - _use_select() {
963 - local state=$(use "$1" && echo enable || echo disable)
964 - shift # remove use from parameters
965 -
966 - while [[ -n $1 ]]; do
967 - _menuselect --${state} "$1" menuselect.makeopts
968 - shift
969 - done
970 - }
971 -
972 - # Blank out sounds/sounds.xml file to prevent
973 - # asterisk from installing sounds files (we pull them in via
974 - # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
975 - >"${S}"/sounds/sounds.xml
976 -
977 - # That NATIVE_ARCH chatter really is quite bothersome
978 - sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
979 -
980 - # Compile menuselect binary for optional components
981 - emake "${_make_args[@]}" menuselect.makeopts
982 -
983 - # Disable BUILD_NATIVE (bug #667498)
984 - _menuselect --disable build_native menuselect.makeopts
985 -
986 - # Broken functionality is forcibly disabled (bug #360143)
987 - _menuselect --disable chan_misdn menuselect.makeopts
988 - _menuselect --disable chan_ooh323 menuselect.makeopts
989 -
990 - # Utility set is forcibly enabled (bug #358001)
991 - _menuselect --enable smsq menuselect.makeopts
992 - _menuselect --enable streamplayer menuselect.makeopts
993 - _menuselect --enable aelparse menuselect.makeopts
994 - _menuselect --enable astman menuselect.makeopts
995 -
996 - # this is connected, otherwise it would not find
997 - # ast_pktccops_gate_alloc symbol
998 - _menuselect --enable chan_mgcp menuselect.makeopts
999 - _menuselect --enable res_pktccops menuselect.makeopts
1000 -
1001 - # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
1002 - _menuselect --enable pbx_dundi menuselect.makeopts
1003 - _menuselect --enable func_aes menuselect.makeopts
1004 - _menuselect --enable chan_iax2 menuselect.makeopts
1005 -
1006 - # SQlite3 is now the main database backend, enable related features
1007 - _menuselect --enable cdr_sqlite3_custom menuselect.makeopts
1008 - _menuselect --enable cel_sqlite3_custom menuselect.makeopts
1009 -
1010 - # The others are based on USE-flag settings
1011 - _use_select alsa chan_alsa
1012 - _use_select bluetooth chan_mobile
1013 - _use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
1014 - _use_select cluster res_corosync
1015 - _use_select codec2 codec_codec2
1016 - _use_select curl func_curl res_config_curl res_curl
1017 - _use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
1018 - _use_select deprecated app_macro
1019 - _use_select freetds {cdr,cel}_tds
1020 - _use_select gtalk chan_motif
1021 - _use_select http res_http_post
1022 - _use_select iconv func_iconv
1023 - _use_select ilbc codec_ilbc format_ilbc
1024 - _use_select ldap res_config_ldap
1025 - _use_select lua pbx_lua
1026 - _use_select mysql app_mysql cdr_mysql res_config_mysql
1027 - _use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
1028 - _use_select oss chan_oss
1029 - _use_select postgres {cdr,cel}_pgsql res_config_pgsql
1030 - _use_select radius {cdr,cel}_radius
1031 - _use_select snmp res_snmp
1032 - _use_select span res_fax_spandsp
1033 - _use_select speex {codec,func}_speex
1034 - _use_select speex format_ogg_speex
1035 - _use_select srtp res_srtp
1036 - _use_select statsd res_statsd res_{endpoint,chan}_stats
1037 - _use_select syslog cdr_syslog
1038 - _use_select vorbis format_ogg_vorbis
1039 - _use_select xmpp res_xmpp
1040 -
1041 - # Voicemail storage ...
1042 - for vmst in "${IUSE_VOICEMAIL_STORAGE[@]}"; do
1043 - if use "${vmst#+}"; then
1044 - _menuselect --enable "$(echo "${vmst##*_}" | tr '[:lower:]' '[:upper:]')_STORAGE" menuselect.makeopts
1045 - fi
1046 - done
1047 -
1048 - if use debug; then
1049 - for o in DONT_OPTIMIZE DEBUG_FD_LEAKS MALLOC_DEBUG BETTER_BACKTRACES; do
1050 - _menuselect --enable "${o}" menuselect.makeopts
1051 - done
1052 - fi
1053 -
1054 - if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then
1055 - for copt in ${GENTOO_ASTERISK_CUSTOM_MENUSELECT}; do
1056 - cstate=--enable
1057 - [[ "${copt}" == -* ]] && cstate=--disable
1058 - ebegin "Custom option ${copt#[-+]} ${cstate:2}d"
1059 - _menuselect ${cstate} "${copt#[-+]}"
1060 - eend $?
1061 - done
1062 - fi
1063 -}
1064 -
1065 -src_compile() {
1066 - emake "${_make_args[@]}"
1067 -}
1068 -
1069 -src_install() {
1070 - local d
1071 -
1072 - dodir "/usr/$(get_libdir)/pkgconfig"
1073 -
1074 - diropts -m 0750 -o root -g asterisk
1075 - dodir /etc/asterisk
1076 -
1077 - emake "${_make_args[@]}" install install-configs
1078 -
1079 - fowners asterisk: /var/lib/asterisk/astdb
1080 -
1081 - if use radius; then
1082 - insinto /etc/radiusclient/
1083 - doins contrib/dictionary.digium
1084 - fi
1085 -
1086 - # keep directories
1087 - diropts -m 0750 -o asterisk -g root
1088 - keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail,recording,outgoing}
1089 - diropts -m 0750 -o asterisk -g asterisk
1090 - keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
1091 -
1092 - newinitd "${FILESDIR}"/initd-16.22.0-18.8.0 asterisk
1093 - newconfd "${FILESDIR}"/confd-16.16.2-r1 asterisk
1094 -
1095 - systemd_dounit "${FILESDIR}"/asterisk.service
1096 - newtmpfiles "${FILESDIR}"/asterisk.tmpfiles-16.22.0-18.8.0.conf asterisk.conf
1097 - systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
1098 -
1099 - # Reset diropts else dodoc uses it for doc installations.
1100 - diropts -m0755
1101 -
1102 - # install the upgrade documentation
1103 - dodoc UPGRADE* BUGS CREDITS
1104 -
1105 - # install extra documentation
1106 - use doc && dodoc doc/*.{txt,pdf}
1107 -
1108 - # install logrotate snippet; bug #329281
1109 - #
1110 - insinto /etc/logrotate.d
1111 - newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
1112 -
1113 - # Asterisk installs a few folders that's empty by design,
1114 - # but still required. This finds them, and marks them for
1115 - # portage.
1116 - while read d <&3; do
1117 - keepdir "${d#${ED}}"
1118 - done 3< <(find "${ED}"/var -type d -empty || die "Find failed.")
1119 -}
1120 -
1121 -pkg_postinst() {
1122 - tmpfiles_process asterisk.conf
1123 -
1124 - if [ -z "${REPLACING_VERSIONS}" ]; then
1125 - elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/"
1126 - elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat"
1127 - elif [ "$(ver_cut 1 "${REPLACING_VERSIONS}")" != "$(ver_cut 1)" ]; then
1128 - elog "You are updating from Asterisk $(ver_cut 1 "${REPLACING_VERSIONS}") upgrade document:"
1129 - elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+$(ver_cut 1)"
1130 - elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat"
1131 - fi
1132 -
1133 - if use deprecated; then
1134 - ewarn "You really aught to port whatever code you have that depends on this since these are going to go away."
1135 - ewarn "Refer: https://wiki.asterisk.org/wiki/display/AST/Module+Deprecation"
1136 - fi
1137 -
1138 - if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then
1139 - ewarn "You are using GENTOO_ASTERISK_CUSTOM_MENUSELECT, this should only be used"
1140 - ewarn "for debugging, for anything else, please file a bug on https://bugs.gentoo.org"
1141 - fi
1142 -
1143 - if [[ -f /var/lib/asterisk/astdb.sqlite3 ]]; then
1144 - ewarn "Default astdb location has changed from /var/lib/asterisk to /var/lib/asterisk/astdb"
1145 - ewarn "You still have a /var/lib/asterisk/astdb.sqlite file. You need to either set"
1146 - ewarn "astdbdir in /etc/asterisk/asterisk.conf to /var/lib/asterisk or follow these"
1147 - ewarn "steps to migrate:"
1148 - ewarn "1. /etc/init.d/asterisk stop"
1149 - ewarn "2. mv /var/lib/asterisk/astdb.sqlite /var/lib/asterisk/astdb/"
1150 - ewarn "3. /etc/init.d/asterisk start"
1151 - ewarn "This update was done partly for security reasons so that /var/lib/asterisk can be root owned."
1152 - fi
1153 -}