summaryrefslogtreecommitdiff
path: root/net-misc/asterisk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
commitabaa75b10f899ada8dd05b23cc03205064394bc6 (patch)
treeeca3dd248b73b92013cba00a0fcc1edf2696e19a /net-misc/asterisk
parent24fd814c326e282c4321965c31f341dad77e270d (diff)
gentoo resync : 22.01.2021
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r--net-misc/asterisk/Manifest7
-rw-r--r--net-misc/asterisk/asterisk-13.38.1-r2.ebuild313
-rw-r--r--net-misc/asterisk/asterisk-16.15.1-r2.ebuild322
-rw-r--r--net-misc/asterisk/files/asterisk-13.18.1-r2-autoconf-2.70.patch10
-rw-r--r--net-misc/asterisk/files/asterisk-16.15.1-r2-autoconf-2.70.patch14
-rw-r--r--net-misc/asterisk/files/asterisk.tmpfiles2.conf1
-rw-r--r--net-misc/asterisk/metadata.xml2
7 files changed, 668 insertions, 1 deletions
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
index 2fd2be012d54..9835918f8160 100644
--- a/net-misc/asterisk/Manifest
+++ b/net-misc/asterisk/Manifest
@@ -1,17 +1,22 @@
AUX 1.6.2/asterisk.logrotate4 848 BLAKE2B b169368ad6893e2fc2680b788569cf8b74657531b9484664aae2869f6dfef3ff71cf64a3fa91e90c4fdbb275a8038751fff4087129e67f63b11b81a436e459b7 SHA512 8d661424838fd9500512290785a56af4364717df87d3423ab8dc3039affd1a26fa7aae6afe2ca4fe1ce668a0172b07a96f4cc9a73eced95f25d5848f3a3f2624
+AUX asterisk-13.18.1-r2-autoconf-2.70.patch 535 BLAKE2B 06f880515f27166a75738bde6e81be1cac961a2ec2eec049cddbbb39b58d350f37a4feb49e86157d6dd5e80abaf251cf6b122ec094e0109c1f20f3e9b0f65c29 SHA512 77d1bb1be97fe5b8df78a8b21173c0d12a91f9a543404d73e4f4af2080a0b4edb87b3ccd36b1935f4fbd2a0bb44e971d303eba774e648c48c2a453c8e42838a7
AUX asterisk-13.38.1-r1-autoconf-lua-version.patch 2320 BLAKE2B 5f9a4b4063286f964da0756698134ce9127a3ae854e19ccec098fb554f4835cbb1698da6ac76293dcb1af3dfd8ea741e9450d58b61c7da440ff3077c848dae68 SHA512 dae3daad5a6755a8a932b40c5d209c348a72266c139a2e05420ea4b8f292062832cf791bc8d41de4bf8c1e0516e8699efdb80724a5afb2d017ab707073d7fca8
AUX asterisk-13.38.1-r1-func_lock-fix-races.patch 9580 BLAKE2B 174aa69b0738c87f02692c2eec978171216b2117218a54b9785a836d0b72b779ed1aa48a3c3b624deb9e16e3485d60a8390b60019c90524f6248665d1ae0ff44 SHA512 bff6f20a677eef837a6727859c1c90309e6f012621743b7e8b6b92ad17cf44c9b94aa75a0b64550ae39a6260210a944725d9e9603fbe0ca7bcbd4fd61d991748
+AUX asterisk-16.15.1-r2-autoconf-2.70.patch 499 BLAKE2B d52c6514d3cd120402298322dac081d88821035a13a5210bddf8574dfe69ec1e6eca1f3335dbd2976e870a8dfc634d1883b3e0db707557581da38b074f7359e6 SHA512 a55725377a874ee15a722076fc63323d73a976592aad524e56bdff5f4164eaa7e533723f5add93b738f39532392541bd2615fc39b3a4fd55a49f57f584d82846
AUX asterisk-historic-no-var-run-install.patch 790 BLAKE2B 6fb753a3dc1b557b4cca8df1dc93eba3de70114f0bb206692461a3faf4068ffbf641740fa51e5010cabf0cbb64d8856dd9a830eba802b1988208b8a185a1fc57 SHA512 9c941d49a1ea10f702b7ce2c9c4a120c0e8ea297f13ecaa9d2a9b059cf4452a981aa0e0eabd5c4711c222311e3f9a52ee1135c59433ba878a9bd3a979be852fd
AUX asterisk.service 456 BLAKE2B 4a5da9f0e45aa3b1eff29d59317d09e061e0a0e3c0e38cd39732e7880e96b7f34a68b44001d2608a7636b1259803f567b94bdb85ef15428727427fa1081ee385 SHA512 d443c3821d50e78a76b7cad8906f560ab0f4b58007f6c9322256626bc4a502bdbd844f1ee48cdaf86d499bf78f50cebb0cfc88a0cab0c4876f4e853bc2e76aa8
AUX asterisk.service.conf 324 BLAKE2B b802f69897f050f661412631da7ddc6e3207ff0d776ad2c2cfb13677049b8e3fce8c565103057745a48a4245f8c660f805088844fdea7fb042facd32b5ec13b7 SHA512 94be3b27f9d862d357b62d14b9d59ca47487bfd4987ce3b0ea2bb862c6d03e1d3c8b536590f20295fd085166da3efdff869c4cfc37542a31933d22b6d9b73da3
AUX asterisk.tmpfiles.conf 88 BLAKE2B 3c32a8dd17b94d607407a7b201448be69c72f1cbe2c414a72e2e2a49436160edcd79b370df6cd830d37d713ee0083e11b92b8053a7822645db960af9fe97ba2f SHA512 a3bdc4608f8fa9e71c2ba398e7a12ed91b7f6c6eb52c96daa86133d382bd08e84d8dd5c1749baa0d1c9c6c5fca9be7aa932eb946d188869294af5b7062ed7a23
+AUX asterisk.tmpfiles2.conf 43 BLAKE2B b459348ce0bf46a915b0a64a4961d753bb9610486dc8499e7ff4eb2fab8d1afda59d880057bd4862f12a497d4cba5b025d73f5f510987d349dd46d269a4d1869 SHA512 65e35490966095a7be6f4acb9e338fe94021976860319fd1c13b8d1b19376854f45348e182ce3a6c02d459c6dfeae62236148b7c992ddfaeb0ed55d0d8682e1b
AUX confd-13.32.0 3895 BLAKE2B eada6c9ef6bb6754645679e6f2f5f2d299d89a3df3830f32ad468d2b83da3e98a4dda51250d86b5625e240c89dc151b26199e23b4131fd00764bcad223d15768 SHA512 55e8b2e2ac4da129375224cdfbb1165032b934fcce3da509e966083c80d7606af77025460214349da5203d9650cc03a9d4087266128459c7d99593068d94aae5
AUX initd-13.32.0-r1 9945 BLAKE2B 231bb632b6634fbe1455ba9e6312562c00a14552a2a38fe88dce5655e36628644e38f07984e305c706b167ec3674eec63933fb889586b78a9386c16bb3765766 SHA512 6c31c7627e30b15a35540d9eabad310841b5f740f8f361fc01630fd6ab389bae02f0d1092ee35e6375b5ae93a7d8d71d03cb06201045d084882177a2ce49a4da
DIST asterisk-13.38.1.tar.gz 33705256 BLAKE2B c783ee40880455cee5a60b111f69d95fdc42bd42a598834236e9999d0f2f401548229560e937fa8d842c5d24715d3891e7860f098d35d5630522e7a659123242 SHA512 270b7c8374104b3c2e9999503fa5cab5b465e37ddfa6759c1019fb99b6bb5877fe4505501ac3306a708ce911aeda36d04796f51156312c04fec013dbaa56a57f
DIST asterisk-16.15.1.tar.gz 27796648 BLAKE2B 4daa0b121a789d0384d81c3b56951bfd7c919cae3de1d7eaa0ba50f01f428c1d56555838f9ce2b3fe24309b131310c59622ed114cd4f76ac7b06896ceb3da6fc SHA512 5ce6e1301825b142859087ba237b2c1b3e0687cac3fac28f35b043727cac26583697534b2726a65510e50ef27cf373b0c4cef60042f789aa6b875448a5f08914
DIST gentoo-asterisk-patchset-4.08.tar.bz2 2176 BLAKE2B 7f8c9b5fda855091e66b2534d2be23fb1616f565480459f71f766826e5deeeecb24899e2ee9eefe74323e892624d32ab954ec7e9be6a002431ff029fc13493ed SHA512 365c1b8628882c48c279e1fd77d982e6d0820ba7d7122e97bb4988f875d7010caa956798c833c3b01d389004fa08a63a9de2c1b452c9e5701c6106e29fd8e9e1
EBUILD asterisk-13.38.1-r1.ebuild 9456 BLAKE2B dcb95d4a66e3a79ec8493ca92103cba49f87d4a355208cb92602d8d16d81d37fb9d5d6225ad067dfff3eba475f00c7322024d986c12db77967e676a9fa32ede7 SHA512 9c8f127f40b7d87e9721e67d04c7be55101c1bcffcecddf98072cb3eb45e250af74421cbc65565fc70fd71158b9850ec4e2b22485a09842d186bcb6d2432141d
+EBUILD asterisk-13.38.1-r2.ebuild 9787 BLAKE2B 656c7a18b9bbbe933f49644c26ebc466d69e6f0033e189e1618bc7a0622a655873f0f551683936532ba802fbfa350956d3ee78a73529e66483c874205d5ef83d SHA512 643f4d40847b8ff76a39110fda1909727710ce53a924cbc8aeacca324c14e04cb26edf7603fff116ca9a757f8bdb0cd92c2726bfdd372c716dffb987bfb1272c
EBUILD asterisk-13.38.1.ebuild 9184 BLAKE2B da7b6e6754a5825d1960346d779820aace4450232a728890ef9555e637fb27d5e20312fdef9b0288b09544d3b669636aadf1dfb64f46040435ce64a1029c1538 SHA512 1f9b49e36fccdc32f80f9018e1c5e3c89dd10dc1ca89647fb0c148e0b66286f9bd01484f54290cfc9aa14da4b35ed36c41d2e691e84af9138311322ff60e7c3f
EBUILD asterisk-16.15.1-r1.ebuild 9633 BLAKE2B 5a6dd460244d81b83f943c982008f79071685a547140d9bf1abed4f0b845ee9a416cb510f9d8c5e9b80fa7d1b351a6cfa2cd087672aafc5d552dd78c542268ce SHA512 74187eff38dff704c9f3de4b7a3f82f054b0c90c2aad6882acd8f227840663f7bc97c8845fcdd1301ddee22328e437004554c6c03bafdfa8a911267ec4009e4c
+EBUILD asterisk-16.15.1-r2.ebuild 10100 BLAKE2B 1ad9ba65ce8d89ddc53220f30803a4dc0248991b710c0b9d933343abcd63495b711914ecc6f6151cae6830bb39d01cf6dcea3e9fa8dce39c80b0994473422de1 SHA512 d07ada08b13ba033f0e28748084f512a39201ae9271f28fa84da41e9732e978da89d69a8f6f8796a7d0ca20eb3754b0a9dc2ff37b97a695a6a155c88de9a5155
EBUILD asterisk-16.15.1.ebuild 9363 BLAKE2B beb1386217856dd1f215ff7ba9ea0dedfede09cea00abfff509703fd66dd924f5b2ce0ce8549dea3fdd3ae5349cad2ffde9fc5a110663b3682e6cf9dd24b608a SHA512 cf2bca2b143231e8875ee2a28465c7e3eeefe0d63436d8252fa5246799831ef66faad2c1e82250b5d00864364c78d6e977eb455c79d5a0351104375f59db10d1
-MISC metadata.xml 1212 BLAKE2B c9ad06a8991f05ba0355febe14ad4dfef9bd2d5b03327b90958c3164f5baaa1d9ff8458075dbc4270e7f4e09e806a4dd54b4d64ce4defd9883159ed56a616d27 SHA512 082b14c964a23b9616d73358b50af8644c05a5ebd86337719146b996cfdc1594d2871bc67d7b353c34687eee64706b9511efcad0ef4003e8a76d509d89b3cdd1
+MISC metadata.xml 1377 BLAKE2B 4b7f76e4834ff58ed593b7e1141b4781b6dfbfb1fb32ee7a1e4f6a982f1267f2e690409f4d6d7f7ea45d4dc8f93bda274a72d1e39d9034f39ed6386a25382413 SHA512 192b14fc1c15b7a7117ee1653adada3fdc480082d2533662c7e7c8ccd13dce08d4eb0c02413c269f544b93870a1deb60092dee8ea92abfd6ce0a39630a9807d8
diff --git a/net-misc/asterisk/asterisk-13.38.1-r2.ebuild b/net-misc/asterisk/asterisk-13.38.1-r2.ebuild
new file mode 100644
index 000000000000..638c1695a1f3
--- /dev/null
+++ b/net-misc/asterisk/asterisk-13.38.1-r2.ebuild
@@ -0,0 +1,313 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..4} )
+
+inherit autotools linux-info lua-single systemd toolchain-funcs
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="https://www.asterisk.org/"
+SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz
+ https://downloads.uls.co.za/gentoo/asterisk/gentoo-asterisk-patchset-4.08.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0/${PV%%.*}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+IUSE_VOICEMAIL_STORAGE=(
+ +voicemail_storage_file
+ voicemail_storage_odbc
+ voicemail_storage_imap
+)
+IUSE="${IUSE_VOICEMAIL_STORAGE[*]//+/} alsa blocks bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc ldap libressl lua mysql newt odbc oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog vorbis xmpp"
+REQUIRED_USE="gtalk? ( xmpp )
+ lua? ( ${LUA_REQUIRED_USE} )
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE[*]//+/} )
+ voicemail_storage_odbc? ( odbc )
+"
+
+PATCHES=(
+ "${FILESDIR}/asterisk-historic-no-var-run-install.patch"
+ "${FILESDIR}/asterisk-13.38.1-r1-autoconf-lua-version.patch"
+ "${FILESDIR}/asterisk-13.38.1-r1-func_lock-fix-races.patch"
+ "${FILESDIR}/asterisk-13.18.1-r2-autoconf-2.70.patch"
+)
+
+DEPEND="acct-user/asterisk
+ acct-group/asterisk
+ dev-db/sqlite:3
+ dev-libs/popt
+ dev-libs/jansson
+ dev-libs/libedit
+ dev-libs/libxml2:2
+ dev-libs/libxslt
+ sys-libs/ncurses:0=
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ bluetooth? ( net-wireless/bluez:= )
+ calendar? (
+ net-libs/neon:=
+ dev-libs/libical:=
+ dev-libs/iksemel
+ )
+ caps? ( sys-libs/libcap )
+ blocks? ( sys-libs/blocksruntime )
+ cluster? ( sys-cluster/corosync )
+ curl? ( net-misc/curl )
+ dahdi? (
+ net-libs/libpri
+ net-misc/dahdi-tools
+ )
+ freetds? ( dev-db/freetds )
+ gtalk? ( dev-libs/iksemel )
+ http? ( dev-libs/gmime:2.6 )
+ iconv? ( virtual/libiconv )
+ ilbc? ( media-libs/libilbc )
+ ldap? ( net-nds/openldap )
+ lua? ( ${LUA_DEPS} )
+ mysql? ( dev-db/mysql-connector-c:= )
+ newt? ( dev-libs/newt )
+ odbc? ( dev-db/unixODBC )
+ pjproject? ( net-libs/pjproject )
+ portaudio? ( media-libs/portaudio )
+ postgres? ( dev-db/postgresql:* )
+ radius? ( net-dialup/freeradius-client )
+ snmp? ( net-analyzer/net-snmp:= )
+ span? ( media-libs/spandsp )
+ speex? (
+ media-libs/libogg
+ media-libs/speex
+ media-libs/speexdsp
+ )
+ srtp? ( net-libs/libsrtp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ voicemail_storage_imap? ( virtual/imap-c-client )
+ xmpp? ( dev-libs/iksemel )
+"
+
+RDEPEND="${DEPEND}
+ net-misc/asterisk-core-sounds
+ net-misc/asterisk-extra-sounds
+ net-misc/asterisk-moh-opsound
+ selinux? ( sec-policy/selinux-asterisk )
+ syslog? ( virtual/logger )"
+
+BDEPEND="virtual/pkgconfig"
+
+QA_DT_NEEDED="/usr/lib.*/libasteriskssl[.]so[.][0-9]\+"
+
+pkg_pretend() {
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP"
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
+ have reported that this module dropped critical SIP packets in their deployments. You
+ may want to disable it if you see such problems."
+ check_extra_config
+
+ [[ "${MERGE_TYPE}" == binary ]] && return
+
+ if tc-is-clang; then
+ use blocks || die "CC=clang requires USE=blocks"
+ else
+ use blocks && die "USE=blocks can only be used with CC=clang"
+ fi
+}
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ default
+ AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" eautoreconf
+}
+
+src_configure() {
+ local vmst
+
+ econf \
+ LUA_VERSION="${ELUA#lua}" \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-crypto \
+ --with-gsm=internal \
+ --with-popt \
+ --with-z \
+ --with-libedit \
+ $(use_with caps cap) \
+ $(use_with lua lua) \
+ $(use_with http gmime) \
+ $(use_with newt) \
+ $(use_with pjproject) \
+ $(use_with portaudio) \
+ $(use_with ssl)
+
+ _menuselect() {
+ menuselect/menuselect "$@" || die "menuselect $* failed."
+ }
+
+ _use_select() {
+ local state=$(usex "$1" enable disable)
+ shift # remove use from parameters
+
+ while [[ -n $1 ]]; do
+ _menuselect --${state} "$1" menuselect.makeopts
+ shift
+ done
+ }
+
+ # Blank out sounds/sounds.xml file to prevent
+ # asterisk from installing sounds files (we pull them in via
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
+ >"${S}"/sounds/sounds.xml
+
+ # That NATIVE_ARCH chatter really is quite bothersome
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
+
+ # Compile menuselect binary for optional components
+ emake NOISE_BUILD=yes menuselect.makeopts
+
+ # Disable BUILD_NATIVE (bug #667498)
+ _menuselect --disable build_native menuselect.makeopts
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ _menuselect --disable chan_misdn menuselect.makeopts
+ _menuselect --disable chan_ooh323 menuselect.makeopts
+
+ # Utility set is forcibly enabled (bug #358001)
+ _menuselect --enable smsq menuselect.makeopts
+ _menuselect --enable streamplayer menuselect.makeopts
+ _menuselect --enable aelparse menuselect.makeopts
+ _menuselect --enable astman menuselect.makeopts
+
+ # this is connected, otherwise it would not find
+ # ast_pktccops_gate_alloc symbol
+ _menuselect --enable chan_mgcp menuselect.makeopts
+ _menuselect --enable res_pktccops menuselect.makeopts
+
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
+ _menuselect --enable pbx_dundi menuselect.makeopts
+ _menuselect --enable func_aes menuselect.makeopts
+ _menuselect --enable chan_iax2 menuselect.makeopts
+
+ # SQlite3 is now the main database backend, enable related features
+ _menuselect --enable cdr_sqlite3_custom menuselect.makeopts
+ _menuselect --enable cel_sqlite3_custom menuselect.makeopts
+
+ # The others are based on USE-flag settings
+ _use_select alsa chan_alsa
+ _use_select bluetooth chan_mobile
+ _use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
+ _use_select cluster res_corosync
+ _use_select curl func_curl res_config_curl res_curl
+ _use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
+ _use_select freetds {cdr,cel}_tds
+ _use_select gtalk chan_motif
+ _use_select http res_http_post
+ _use_select iconv func_iconv
+ _use_select ilbc codec_ilbc format_ilbc
+ _use_select ldap res_config_ldap
+ _use_select lua pbx_lua
+ _use_select mysql app_mysql cdr_mysql res_config_mysql
+ _use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
+ _use_select oss chan_oss
+ _use_select postgres {cdr,cel}_pgsql res_config_pgsql
+ _use_select radius {cdr,cel}_radius
+ _use_select snmp res_snmp
+ _use_select span res_fax_spandsp
+ _use_select speex {codec,func}_speex
+ _use_select speex format_ogg_speex
+ _use_select srtp res_srtp
+ _use_select statsd res_statsd res_{endpoint,chan}_stats
+ _use_select syslog cdr_syslog
+ _use_select vorbis format_ogg_vorbis
+ _use_select xmpp res_xmpp
+
+ # Voicemail storage ...
+ for vmst in "${IUSE_VOICEMAIL_STORAGE[@]}"; do
+ if use "${vmst#+}"; then
+ _menuselect --enable "$(echo "${vmst##*_}" | tr '[:lower:]' '[:upper:]')_STORAGE" menuselect.makeopts
+ fi
+ done
+
+ if use debug; then
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
+ _menuselect --enable $o menuselect.makeopts
+ done
+ fi
+}
+
+src_compile() {
+ emake ASTCFLAGS="${CFLAGS}" ASTLDFLAGS="${LDFLAGS}" NOISY_BUILD=yes
+}
+
+src_install() {
+ local d
+
+ dodir "/usr/$(get_libdir)/pkgconfig"
+ emake DESTDIR="${D}" NOISY_BUILD=yes install
+
+ if use radius; then
+ insinto /etc/radiusclient/
+ doins contrib/dictionary.digium
+ fi
+ diropts -m 0750 -o root -g asterisk
+ keepdir /etc/asterisk
+ emake NOISY_BUILD=yes DESTDIR="${D}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs
+ chown root:root "${ED}/etc/asterisk/"* || die "chown root:root of config files failed"
+ chmod 644 "${ED}/etc/asterisk/"* || die "chmod 644 of config files failed"
+
+ # keep directories
+ diropts -m 0750 -o asterisk -g root
+ keepdir /var/lib/asterisk
+ keepdir /var/spool/asterisk
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail,recording}
+ diropts -m 0750 -o asterisk -g asterisk
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
+
+ newinitd "${FILESDIR}"/initd-13.32.0-r1 asterisk
+ newconfd "${FILESDIR}"/confd-13.32.0 asterisk
+
+ systemd_dounit "${FILESDIR}"/asterisk.service
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles2.conf asterisk.conf
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
+
+ # Reset diropts else dodoc uses it for doc installations.
+ diropts -m0755
+
+ # install the upgrade documentation
+ dodoc UPGRADE* BUGS CREDITS
+
+ # install extra documentation
+ use doc &&doc/*.{txt,pdf}
+
+ # install logrotate snippet; bug #329281
+ #
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
+
+ # Asterisk installs a few folders that's empty by design,
+ # but still required. This finds them, and marks them for
+ # portage.
+ while read d < <(find "${ED}"/var -type d -empty || die "Find failed."); do
+ keepdir "${d#${ED}}"
+ done
+}
+
+pkg_postinst() {
+ if [ -z "${REPLACING_VERSIONS}" ]; then
+ elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/"
+ elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.freenode.net"
+ elif [ "$(ver_cut 1 "${REPLACING_VERSIONS}")" != "$(ver_cut 1)" ]; then
+ elog "You are updating from Asterisk $(ver_cut 1 "${REPLACING_VERSIONS}") upgrade document:"
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+$(ver_cut 1)"
+ elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.freenode.net"
+ fi
+}
diff --git a/net-misc/asterisk/asterisk-16.15.1-r2.ebuild b/net-misc/asterisk/asterisk-16.15.1-r2.ebuild
new file mode 100644
index 000000000000..8316274ea097
--- /dev/null
+++ b/net-misc/asterisk/asterisk-16.15.1-r2.ebuild
@@ -0,0 +1,322 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..4} )
+
+inherit autotools linux-info lua-single systemd toolchain-funcs
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="https://www.asterisk.org/"
+SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz
+ https://downloads.uls.co.za/gentoo/asterisk/gentoo-asterisk-patchset-4.08.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0/${PV%%.*}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+IUSE_VOICEMAIL_STORAGE=(
+ +voicemail_storage_file
+ voicemail_storage_odbc
+ voicemail_storage_imap
+)
+IUSE="${IUSE_VOICEMAIL_STORAGE[*]//+/} alsa blocks bluetooth calendar +caps cluster codec2 curl dahdi debug doc freetds gtalk http iconv ilbc ldap libressl lua mysql newt odbc oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog unbound vorbis xmpp"
+IUSE_EXPAND="VOICEMAIL_STORAGE"
+REQUIRED_USE="gtalk? ( xmpp )
+ lua? ( ${LUA_REQUIRED_USE} )
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE[*]//+/} )
+ voicemail_storage_odbc? ( odbc )
+"
+
+PATCHES=(
+ "${FILESDIR}/asterisk-historic-no-var-run-install.patch"
+ "${FILESDIR}/asterisk-13.38.1-r1-autoconf-lua-version.patch"
+ "${FILESDIR}/asterisk-13.38.1-r1-func_lock-fix-races.patch"
+ "${FILESDIR}/asterisk-16.15.1-r2-autoconf-2.70.patch"
+)
+
+DEPEND="acct-user/asterisk
+ acct-group/asterisk
+ dev-db/sqlite:3
+ dev-libs/popt
+ >=dev-libs/jansson-2.11
+ dev-libs/libedit
+ dev-libs/libxml2:2
+ dev-libs/libxslt
+ sys-apps/util-linux
+ sys-libs/ncurses:0=
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ bluetooth? ( net-wireless/bluez:= )
+ calendar? (
+ net-libs/neon:=
+ dev-libs/libical:=
+ dev-libs/iksemel
+ )
+ caps? ( sys-libs/libcap )
+ blocks? ( sys-libs/blocksruntime )
+ cluster? ( sys-cluster/corosync )
+ codec2? ( media-libs/codec2:= )
+ curl? ( net-misc/curl )
+ dahdi? (
+ net-libs/libpri
+ net-misc/dahdi-tools
+ )
+ freetds? ( dev-db/freetds )
+ gtalk? ( dev-libs/iksemel )
+ http? ( dev-libs/gmime:2.6 )
+ iconv? ( virtual/libiconv )
+ ilbc? ( media-libs/libilbc )
+ ldap? ( net-nds/openldap )
+ lua? ( ${LUA_DEPS} )
+ mysql? ( dev-db/mysql-connector-c:= )
+ newt? ( dev-libs/newt )
+ odbc? ( dev-db/unixODBC )
+ pjproject? ( >=net-libs/pjproject-2.9 )
+ portaudio? ( media-libs/portaudio )
+ postgres? ( dev-db/postgresql:* )
+ radius? ( net-dialup/freeradius-client )
+ snmp? ( net-analyzer/net-snmp:= )
+ span? ( media-libs/spandsp )
+ speex? (
+ media-libs/libogg
+ media-libs/speex
+ media-libs/speexdsp
+ )
+ srtp? ( net-libs/libsrtp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ unbound? ( net-dns/unbound )
+ vorbis? (
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+ voicemail_storage_imap? ( virtual/imap-c-client )
+ xmpp? ( dev-libs/iksemel )
+"
+
+RDEPEND="${DEPEND}
+ net-misc/asterisk-core-sounds
+ net-misc/asterisk-extra-sounds
+ net-misc/asterisk-moh-opsound
+ selinux? ( sec-policy/selinux-asterisk )
+ syslog? ( virtual/logger )"
+
+BDEPEND="virtual/pkgconfig"
+
+QA_DT_NEEDED="/usr/lib.*/libasteriskssl[.]so[.][0-9]\+"
+
+pkg_pretend() {
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP"
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
+ have reported that this module dropped critical SIP packets in their deployments. You
+ may want to disable it if you see such problems."
+ check_extra_config
+
+ [[ "${MERGE_TYPE}" == binary ]] && return
+
+ if tc-is-clang; then
+ use blocks || die "CC=clang requires USE=blocks"
+ else
+ use blocks && die "USE=blocks can only be used with CC=clang"
+ fi
+}
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ default
+ AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" eautoreconf
+}
+
+src_configure() {
+ local vmst
+
+ econf \
+ LUA_VERSION="${ELUA#lua}" \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-crypto \
+ --with-gsm=internal \
+ --with-popt \
+ --with-z \
+ --with-libedit \
+ --without-jansson-bundled \
+ --without-pjproject-bundled \
+ $(use_with caps cap) \
+ $(use_with codec2) \
+ $(use_with lua lua) \
+ $(use_with http gmime) \
+ $(use_with newt) \
+ $(use_with pjproject) \
+ $(use_with portaudio) \
+ $(use_with ssl) \
+ $(use_with unbound)
+
+ _menuselect() {
+ menuselect/menuselect "$@" || die "menuselect $* failed."
+ }
+
+ _use_select() {
+ local state=$(use "$1" && echo enable || echo disable)
+ shift # remove use from parameters
+
+ while [[ -n $1 ]]; do
+ _menuselect --${state} "$1" menuselect.makeopts
+ shift
+ done
+ }
+
+ # Blank out sounds/sounds.xml file to prevent
+ # asterisk from installing sounds files (we pull them in via
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
+ >"${S}"/sounds/sounds.xml
+
+ # That NATIVE_ARCH chatter really is quite bothersome
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
+
+ # Compile menuselect binary for optional components
+ emake NOISY_BUILD=yes menuselect.makeopts
+
+ # Disable BUILD_NATIVE (bug #667498)
+ _menuselect --disable build_native menuselect.makeopts
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ _menuselect --disable chan_misdn menuselect.makeopts
+ _menuselect --disable chan_ooh323 menuselect.makeopts
+
+ # Utility set is forcibly enabled (bug #358001)
+ _menuselect --enable smsq menuselect.makeopts
+ _menuselect --enable streamplayer menuselect.makeopts
+ _menuselect --enable aelparse menuselect.makeopts
+ _menuselect --enable astman menuselect.makeopts
+
+ # this is connected, otherwise it would not find
+ # ast_pktccops_gate_alloc symbol
+ _menuselect --enable chan_mgcp menuselect.makeopts
+ _menuselect --enable res_pktccops menuselect.makeopts
+
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
+ _menuselect --enable pbx_dundi menuselect.makeopts
+ _menuselect --enable func_aes menuselect.makeopts
+ _menuselect --enable chan_iax2 menuselect.makeopts
+
+ # SQlite3 is now the main database backend, enable related features
+ _menuselect --enable cdr_sqlite3_custom menuselect.makeopts
+ _menuselect --enable cel_sqlite3_custom menuselect.makeopts
+
+ # The others are based on USE-flag settings
+ _use_select alsa chan_alsa
+ _use_select bluetooth chan_mobile
+ _use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
+ _use_select cluster res_corosync
+ _use_select codec2 codec_codec2
+ _use_select curl func_curl res_config_curl res_curl
+ _use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
+ _use_select freetds {cdr,cel}_tds
+ _use_select gtalk chan_motif
+ _use_select http res_http_post
+ _use_select iconv func_iconv
+ _use_select ilbc codec_ilbc format_ilbc
+ _use_select ldap res_config_ldap
+ _use_select lua pbx_lua
+ _use_select mysql app_mysql cdr_mysql res_config_mysql
+ _use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
+ _use_select oss chan_oss
+ _use_select postgres {cdr,cel}_pgsql res_config_pgsql
+ _use_select radius {cdr,cel}_radius
+ _use_select snmp res_snmp
+ _use_select span res_fax_spandsp
+ _use_select speex {codec,func}_speex
+ _use_select speex format_ogg_speex
+ _use_select srtp res_srtp
+ _use_select statsd res_statsd res_{endpoint,chan}_stats
+ _use_select syslog cdr_syslog
+ _use_select vorbis format_ogg_vorbis
+ _use_select xmpp res_xmpp
+
+ # Voicemail storage ...
+ for vmst in "${IUSE_VOICEMAIL_STORAGE[@]}"; do
+ if use "${vmst#+}"; then
+ _menuselect --enable "$(echo "${vmst##*_}" | tr '[:lower:]' '[:upper:]')_STORAGE" menuselect.makeopts
+ fi
+ done
+
+ if use debug; then
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
+ _menuselect --enable "${o}" menuselect.makeopts
+ done
+ fi
+}
+
+src_compile() {
+ emake ASTCFLAGS="${CFLAGS}" ASTLDFLAGS="${LDFLAGS}" NOISY_BUILD=yes
+}
+
+src_install() {
+ local d
+
+ dodir "/usr/$(get_libdir)/pkgconfig"
+ emake DESTDIR="${D}" NOISY_BUILD=yes install
+
+ if use radius; then
+ insinto /etc/radiusclient/
+ doins contrib/dictionary.digium
+ fi
+ diropts -m 0750 -o root -g asterisk
+ keepdir /etc/asterisk
+ emake NOISY_BUILD=yes DESTDIR="${D}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs
+ chown root:root "${ED}/etc/asterisk/"* || die "chown root:root of config files failed."
+ chmod 644 "${ED}/etc/asterisk/"* || die "chmod 644 of config files failed."
+
+ # keep directories
+ diropts -m 0750 -o asterisk -g root
+ keepdir /var/lib/asterisk
+ keepdir /var/spool/asterisk
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail,recording}
+ diropts -m 0750 -o asterisk -g asterisk
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
+
+ newinitd "${FILESDIR}"/initd-13.32.0-r1 asterisk
+ newconfd "${FILESDIR}"/confd-13.32.0 asterisk
+
+ systemd_dounit "${FILESDIR}"/asterisk.service
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles2.conf asterisk.conf
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
+
+ # Reset diropts else dodoc uses it for doc installations.
+ diropts -m0755
+
+ # install the upgrade documentation
+ dodoc UPGRADE* BUGS CREDITS
+
+ # install extra documentation
+ use doc &&doc/*.{txt,pdf}
+
+ # install logrotate snippet; bug #329281
+ #
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
+
+ # Asterisk installs a few folders that's empty by design,
+ # but still required. This finds them, and marks them for
+ # portage.
+ while read d < <(find "${ED}"/var -type d -empty || die "Find failed."); do
+ keepdir "${d#${ED}}"
+ done
+}
+
+pkg_postinst() {
+ if [ -z "${REPLACING_VERSIONS}" ]; then
+ elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/"
+ elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.freenode.net"
+ elif [ "$(ver_cut 1 "${REPLACING_VERSIONS}")" != "$(ver_cut 1)" ]; then
+ elog "You are updating from Asterisk $(ver_cut 1 "${REPLACING_VERSIONS}") upgrade document:"
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+$(ver_cut 1)"
+ elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.freenode.net"
+ fi
+}
diff --git a/net-misc/asterisk/files/asterisk-13.18.1-r2-autoconf-2.70.patch b/net-misc/asterisk/files/asterisk-13.18.1-r2-autoconf-2.70.patch
new file mode 100644
index 000000000000..68a5604757b2
--- /dev/null
+++ b/net-misc/asterisk/files/asterisk-13.18.1-r2-autoconf-2.70.patch
@@ -0,0 +1,10 @@
+--- asterisk-13.38.1/configure.ac.o 2021-01-08 18:33:41.360112920 +0200
++++ asterisk-13.38.1/configure.ac 2021-01-08 18:38:26.649995123 +0200
+@@ -605,7 +605,6 @@
+
+ AC_FUNC_ALLOCA
+ AC_HEADER_DIRENT
+-AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/types.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
+
diff --git a/net-misc/asterisk/files/asterisk-16.15.1-r2-autoconf-2.70.patch b/net-misc/asterisk/files/asterisk-16.15.1-r2-autoconf-2.70.patch
new file mode 100644
index 000000000000..99c597540192
--- /dev/null
+++ b/net-misc/asterisk/files/asterisk-16.15.1-r2-autoconf-2.70.patch
@@ -0,0 +1,14 @@
+--- asterisk-16.15.1/configure.ac.o 2021-01-08 18:41:50.979913016 +0200
++++ asterisk-16.15.1/configure.ac 2021-01-08 18:42:23.739899786 +0200
+@@ -612,11 +612,6 @@
+ AC_MSG_ERROR([*** Could not find dirent header that defines 'DIR'.])
+ fi
+
+-AC_HEADER_STDC
+-if test "$ac_cv_header_stdc" != "yes"; then
+- AC_MSG_ERROR([*** ANSI C header files not found.])
+-fi
+-
+ AC_HEADER_SYS_WAIT
+ if test "$ac_cv_header_sys_wait_h" != "yes"; then
+ AC_MSG_ERROR([*** POSIX.1 compatible sys/wait.h is required.])
diff --git a/net-misc/asterisk/files/asterisk.tmpfiles2.conf b/net-misc/asterisk/files/asterisk.tmpfiles2.conf
new file mode 100644
index 000000000000..ce85c7f5461a
--- /dev/null
+++ b/net-misc/asterisk/files/asterisk.tmpfiles2.conf
@@ -0,0 +1 @@
+d /var/run/asterisk 0750 asterisk asterisk
diff --git a/net-misc/asterisk/metadata.xml b/net-misc/asterisk/metadata.xml
index d3ea21bdff55..9951bd05d61a 100644
--- a/net-misc/asterisk/metadata.xml
+++ b/net-misc/asterisk/metadata.xml
@@ -10,7 +10,9 @@
<name>Proxy Maintainers</name>
</maintainer>
<use>
+ <flag name="blocks">Utlize -fblocks (only supported by, and required when using, clang/LLVM)</flag>
<flag name="cluster">Enable high-availability support through the Corosync Cluster Engine</flag>
+ <flag name="codec2">Enable Codec2 support in asterisk</flag>
<flag name="dahdi">Support Digium compatible hardware (formerly known as Zaptel).</flag>
<flag name="gtalk">Enable support for Google Talk services</flag>
<flag name="http">Enable embedded web server</flag>