diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-12-25 23:06:25 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-12-25 23:06:25 +0000 |
commit | 441d1370330332b7d78f238d2f5e13f7aed5e4e0 (patch) | |
tree | 6a5171dd615dfeee62a45044144c66e864738fb0 /net-misc/asterisk | |
parent | ab3da91fb6c91a9df52fff8f991570f456fd3c7a (diff) |
gentoo christmass resync : 25.12.2020
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r-- | net-misc/asterisk/Manifest | 13 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-11.25.3-r1.ebuild | 313 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-13.38.1-r1.ebuild | 308 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-13.38.1.ebuild | 299 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-16.15.1-r1.ebuild | 313 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-16.15.1.ebuild | 304 | ||||
-rw-r--r-- | net-misc/asterisk/files/asterisk-13.38.1-r1-autoconf-lua-version.patch | 56 | ||||
-rw-r--r-- | net-misc/asterisk/files/asterisk-13.38.1-r1-func_lock-fix-races.patch | 291 | ||||
-rw-r--r-- | net-misc/asterisk/metadata.xml | 1 |
9 files changed, 1580 insertions, 318 deletions
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index e2f49a9c12fc..e4a4c0f158fd 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -1,27 +1,32 @@ AUX 1.6.2/asterisk.logrotate4 848 BLAKE2B b169368ad6893e2fc2680b788569cf8b74657531b9484664aae2869f6dfef3ff71cf64a3fa91e90c4fdbb275a8038751fff4087129e67f63b11b81a436e459b7 SHA512 8d661424838fd9500512290785a56af4364717df87d3423ab8dc3039affd1a26fa7aae6afe2ca4fe1ce668a0172b07a96f4cc9a73eced95f25d5848f3a3f2624 AUX asterisk-13.33.0-nossl.patch 3176 BLAKE2B 1c225d3a4256e6bb69bac025adf3f21aec806cc864e55fcd1381244b68ef8a8d82d462d548a32dc9e1cec3b94f508bad09fbc3bd8602230fa79a916e6dededa5 SHA512 895e6bd770701fe25c389447f5a4454e9d5ead183c44fcc76c623f0140af1fac72ba12ad8331f7ef43ff926dbf3470646c99af93cf5f83cc70f9432ab1604e29 +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-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 confd-13.32.0 3895 BLAKE2B eada6c9ef6bb6754645679e6f2f5f2d299d89a3df3830f32ad468d2b83da3e98a4dda51250d86b5625e240c89dc151b26199e23b4131fd00764bcad223d15768 SHA512 55e8b2e2ac4da129375224cdfbb1165032b934fcce3da509e966083c80d7606af77025460214349da5203d9650cc03a9d4087266128459c7d99593068d94aae5 AUX initd-13.32.0-r1 9945 BLAKE2B 231bb632b6634fbe1455ba9e6312562c00a14552a2a38fe88dce5655e36628644e38f07984e305c706b167ec3674eec63933fb889586b78a9386c16bb3765766 SHA512 6c31c7627e30b15a35540d9eabad310841b5f740f8f361fc01630fd6ab389bae02f0d1092ee35e6375b5ae93a7d8d71d03cb06201045d084882177a2ce49a4da -DIST asterisk-11.25.3.tar.gz 35134682 BLAKE2B 9da24d5d6a674ab660edb103e5fc56ddfbcc58cd86166cc08cceb0598a63b51eae36133565e09a30ad11ff6623ba8945437dfb561d2916f68341d398540dabce SHA512 9c0521d55e5b69663ea40066d52e397ba6c165a4b20cd0a1e5e375b9c0e5a6e4f37908e50b0b580e288dec9be252af9a8bce7bceb03ba029f902fb757e6311ed DIST asterisk-13.34.0.tar.gz 33686020 BLAKE2B 48de77f2e29028ab3503ea30038e629b6ede43154bec8efe1384a7077fb971f91b85d9b4eb55f7a4ea6577a31ad5fe496453fe59cd607a0c613e46edef9a11d9 SHA512 2132db831bb063330c47cea8cea67af706839d25e64eee558475643cb79a4e548fc6ffe7ce61a053f41cf6f367320eedaa87973a5de4ef38ae858a6e5a183ee7 DIST asterisk-13.35.0.tar.gz 33685340 BLAKE2B 728281257541977ac150b1b7d6148fd326c584f7827af46882ff3e3af111d876c3e53f92f1034c55875d730e5b92c379b8906198393b7a4227a5bb74818ab27c SHA512 7596f387d45ef9f0327d78bc0446979e233aba517bbedfb539409cc507e2dac15e3b32d5c8a5e69783d106d4244661cb20b0580ed00904699bc5bf5db7b4713a DIST asterisk-13.36.0.tar.gz 33692378 BLAKE2B 7252e7a103d94bbdd4073563f88ec2952ef88856cb5a98f7a07818a993c1064ca4ffb12202f2c297125d7bc3fd3814c9921a87c179db03dede05162844bebbd1 SHA512 276175e6df1c8a2e642c4607aa32515e7c4fffe50f7db89bbfee8850b286579350a074bb8bbe743b3e95d6ce2d92f8d5444053fe52527071cc884356b57a1efc DIST asterisk-13.37.0.tar.gz 33696267 BLAKE2B 806e48fd2ed497becef87e5a349854e377aaaeb5f749e4c8ce957b585256edcc3c1812f199f793eecc829155baf12336f4971d2664e836ad38248139f5fc719f SHA512 f01ebc3a0b4d598f35f26e60aa6fdc03ab5d4ee28547ec048c2af9ab67f2657a5767484bf7d07d8fbcb1e84ce6865f4fe70772f30a5dc45568669ffeb7387b8e +DIST asterisk-13.38.1.tar.gz 33705256 BLAKE2B c783ee40880455cee5a60b111f69d95fdc42bd42a598834236e9999d0f2f401548229560e937fa8d842c5d24715d3891e7860f098d35d5630522e7a659123242 SHA512 270b7c8374104b3c2e9999503fa5cab5b465e37ddfa6759c1019fb99b6bb5877fe4505501ac3306a708ce911aeda36d04796f51156312c04fec013dbaa56a57f DIST asterisk-16.12.0.tar.gz 27727347 BLAKE2B 3e2e986136e5ff19a876f01fdc6db1b6c22f83bf38f8524a418e474e2400375d8091dd215fb54f5b01f998cecf46d6965a0c35a44dc6f3be7f7a811e2ce70b8c SHA512 1fc41b92d070efd4a7ea5db1a36c83bdb6dbbe7d9b5087b0a887ba3d6875e81ba1b71a79b216138b242f0349a176baf6745480ff6fb7ed47c62dda4b09b6a891 DIST asterisk-16.13.0.tar.gz 27735450 BLAKE2B 64cc75c7aa715734ebaf06fe7b3df54cfa309fc6126b45abfc21cc22c2c4e795946be473ce2887dc074124f9da6c8937d1bb4207fecf402eed7803ed063faa80 SHA512 872c5a5cb8faf9b1632895dafb6ee86c87e1766c9f33099b32216e6703f063800f87cac6db3537d1744349c42abd3ea83d70afe35138e45fb756872688822dfa DIST asterisk-16.14.0.tar.gz 27740877 BLAKE2B f8a09d39c36c1cdcc17878f1af69da7691503290177583ec1a92ac0471c029e527a3b62bd731a7340c43fb7abeca32b604303f0739e614c5a1edb0131f07e0fd SHA512 699b0c701a00df0ffcb7094f5cc732b645775deb85486e044685685b81aad09e6b2e9558436e80c505de93add630b76cf49d7261ba8eaae46f93272844346234 -DIST gentoo-asterisk-patchset-3.17.tar.bz2 5074 BLAKE2B 3c945e77b54b2449253acb9fcea8d289a7a3184729190622c14aff5557d36c93556efa83320fe4e7ae84021960c09f35ae9f997e8015706eef933aae2948309e SHA512 37f86f3c699b2643afd8080391e817a282571694bb56e00efd0734918dbc33d6c12a2463dbc24667597420863b4f506870140fbb8ef3f1700124ef790ae7252d +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-11.25.3-r1.ebuild 9181 BLAKE2B 9c7434766c9849f24c52f7ed62ccdaa1ba2c754c53ae4d989f975b44c70af73edcbca248eb9c817cf7729a18218c3decf5f996fe69204fbdaa60797ddb83b990 SHA512 288732af4757047e57486bfc47d3b1568a3d056a08b575fee641fd35eb9b2fe1248dc63f24b515898a43674713ee824e61d1f273d1701a8e0c2770211ee6dbfd EBUILD asterisk-13.34.0.ebuild 9115 BLAKE2B 700712cc94fbf23b4d75cfec564ed72597b492192343faa39d08fb5063d1e798a1995cdf6606a01201ef99553e003988333554364a60a01b80fd0c47b20775c7 SHA512 8ab0c0dbab33194ece3355d90a7552ceed2da00a1ce072d9229d765f763e36b1da193361f3be5abde9223c0b067626c3b84444eca0006a59fb968cdc7bb4cb62 EBUILD asterisk-13.35.0.ebuild 9186 BLAKE2B 933de7a389ff20b6f71b6b8a4eed6943a5a26217f744ac70b6b00394f4684e4eb8a7182095c05a094513fde4c65f0961a5512766ef41cf511e1fa95e47fd36a3 SHA512 5bf2dcb1ca6d14783b5745a2718466da783900ce923699a137d0ebe1ba99ca3aa424ae7f90013d2119861914dac2b41695825e3bb55520575fb8fb74e54f33e7 EBUILD asterisk-13.36.0.ebuild 9184 BLAKE2B 7a91118e4d0abbca316d7cfeb22b458dbde3d7311efc82ced7bdc082a3f44d62df207251aca41a2be878e817db6ea879fc53e73b55c49202c8fa007e7637ba03 SHA512 2fbe03f264440b50a73d052bc45394d65fc32ee3e717387cb5e2c96b24cd3f72d15dcd5d3ee0ae2ce6625e486898030c95d43791de1b254eec4fd7458f07a8bb EBUILD asterisk-13.37.0.ebuild 9186 BLAKE2B 933de7a389ff20b6f71b6b8a4eed6943a5a26217f744ac70b6b00394f4684e4eb8a7182095c05a094513fde4c65f0961a5512766ef41cf511e1fa95e47fd36a3 SHA512 5bf2dcb1ca6d14783b5745a2718466da783900ce923699a137d0ebe1ba99ca3aa424ae7f90013d2119861914dac2b41695825e3bb55520575fb8fb74e54f33e7 +EBUILD asterisk-13.38.1-r1.ebuild 9456 BLAKE2B dcb95d4a66e3a79ec8493ca92103cba49f87d4a355208cb92602d8d16d81d37fb9d5d6225ad067dfff3eba475f00c7322024d986c12db77967e676a9fa32ede7 SHA512 9c8f127f40b7d87e9721e67d04c7be55101c1bcffcecddf98072cb3eb45e250af74421cbc65565fc70fd71158b9850ec4e2b22485a09842d186bcb6d2432141d +EBUILD asterisk-13.38.1.ebuild 9186 BLAKE2B 933de7a389ff20b6f71b6b8a4eed6943a5a26217f744ac70b6b00394f4684e4eb8a7182095c05a094513fde4c65f0961a5512766ef41cf511e1fa95e47fd36a3 SHA512 5bf2dcb1ca6d14783b5745a2718466da783900ce923699a137d0ebe1ba99ca3aa424ae7f90013d2119861914dac2b41695825e3bb55520575fb8fb74e54f33e7 EBUILD asterisk-16.12.0-r1.ebuild 9363 BLAKE2B beb1386217856dd1f215ff7ba9ea0dedfede09cea00abfff509703fd66dd924f5b2ce0ce8549dea3fdd3ae5349cad2ffde9fc5a110663b3682e6cf9dd24b608a SHA512 cf2bca2b143231e8875ee2a28465c7e3eeefe0d63436d8252fa5246799831ef66faad2c1e82250b5d00864364c78d6e977eb455c79d5a0351104375f59db10d1 EBUILD asterisk-16.13.0.ebuild 9363 BLAKE2B beb1386217856dd1f215ff7ba9ea0dedfede09cea00abfff509703fd66dd924f5b2ce0ce8549dea3fdd3ae5349cad2ffde9fc5a110663b3682e6cf9dd24b608a SHA512 cf2bca2b143231e8875ee2a28465c7e3eeefe0d63436d8252fa5246799831ef66faad2c1e82250b5d00864364c78d6e977eb455c79d5a0351104375f59db10d1 EBUILD asterisk-16.14.0.ebuild 9363 BLAKE2B beb1386217856dd1f215ff7ba9ea0dedfede09cea00abfff509703fd66dd924f5b2ce0ce8549dea3fdd3ae5349cad2ffde9fc5a110663b3682e6cf9dd24b608a SHA512 cf2bca2b143231e8875ee2a28465c7e3eeefe0d63436d8252fa5246799831ef66faad2c1e82250b5d00864364c78d6e977eb455c79d5a0351104375f59db10d1 -MISC metadata.xml 1301 BLAKE2B 0989c94d86393562384681c19a2809dc6ebedfcdd592543b606206a8bd7829a4ca6768cb74082f74e75635c72804dda9154df3a4d61dcdbcc43eda93aa881322 SHA512 009e4dba6f55b8ff08940aab4722df6b76a055add43c7634a49dbc0fb68fe11e6c102a7a27ac84a253a2853b0d719f3a73bb40c86c2d2faa186b707e773987e3 +EBUILD asterisk-16.15.1-r1.ebuild 9633 BLAKE2B 5a6dd460244d81b83f943c982008f79071685a547140d9bf1abed4f0b845ee9a416cb510f9d8c5e9b80fa7d1b351a6cfa2cd087672aafc5d552dd78c542268ce SHA512 74187eff38dff704c9f3de4b7a3f82f054b0c90c2aad6882acd8f227840663f7bc97c8845fcdd1301ddee22328e437004554c6c03bafdfa8a911267ec4009e4c +EBUILD asterisk-16.15.1.ebuild 9363 BLAKE2B beb1386217856dd1f215ff7ba9ea0dedfede09cea00abfff509703fd66dd924f5b2ce0ce8549dea3fdd3ae5349cad2ffde9fc5a110663b3682e6cf9dd24b608a SHA512 cf2bca2b143231e8875ee2a28465c7e3eeefe0d63436d8252fa5246799831ef66faad2c1e82250b5d00864364c78d6e977eb455c79d5a0351104375f59db10d1 +MISC metadata.xml 1212 BLAKE2B c9ad06a8991f05ba0355febe14ad4dfef9bd2d5b03327b90958c3164f5baaa1d9ff8458075dbc4270e7f4e09e806a4dd54b4d64ce4defd9883159ed56a616d27 SHA512 082b14c964a23b9616d73358b50af8644c05a5ebd86337719146b996cfdc1594d2871bc67d7b353c34687eee64706b9511efcad0ef4003e8a76d509d89b3cdd1 diff --git a/net-misc/asterisk/asterisk-11.25.3-r1.ebuild b/net-misc/asterisk/asterisk-11.25.3-r1.ebuild deleted file mode 100644 index 0b7c8896f0ca..000000000000 --- a/net-misc/asterisk/asterisk-11.25.3-r1.ebuild +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit autotools linux-info systemd - -MY_P="${PN}-${PV/_/-}" - -DESCRIPTION="Asterisk: A Modular Open Source PBX System" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz - mirror://gentoo/gentoo-asterisk-patchset-3.17.tar.bz2" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" - -IUSE_VOICEMAIL_STORAGE=" - +voicemail_storage_file - voicemail_storage_odbc - voicemail_storage_imap -" -IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc xmpp ldap libedit libressl lua mysql newt +samples odbc oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis" -IUSE_EXPAND="VOICEMAIL_STORAGE" -REQUIRED_USE="gtalk? ( xmpp ) - ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) - voicemail_storage_odbc? ( odbc ) -" - -EPATCH_SUFFIX="patch" -PATCHES=( "${WORKDIR}/asterisk-patchset" ) - -CDEPEND="acct-user/asterisk - acct-group/asterisk - dev-db/sqlite:3 - dev-libs/popt - dev-libs/libxml2 - !libressl? ( =dev-libs/openssl-1.0*:0= ) - libressl? ( dev-libs/libressl:0= ) - sys-libs/ncurses:* - sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - bluetooth? ( net-wireless/bluez ) - calendar? ( - dev-libs/iksemel - dev-libs/libical - net-libs/neon - ) - caps? ( sys-libs/libcap ) - cluster? ( sys-cluster/corosync ) - curl? ( net-misc/curl ) - dahdi? ( >=net-libs/libpri-1.4.12_beta2 - net-misc/dahdi-tools ) - freetds? ( dev-db/freetds ) - gtalk? ( dev-libs/iksemel ) - http? ( dev-libs/gmime:2.6 ) - iconv? ( virtual/libiconv ) - ilbc? ( dev-libs/ilbc-rfc3951 ) - xmpp? ( dev-libs/iksemel ) - ldap? ( net-nds/openldap ) - libedit? ( dev-libs/libedit ) - lua? ( dev-lang/lua:0= ) - mysql? ( virtual/mysql ) - newt? ( dev-libs/newt ) - odbc? ( dev-db/unixODBC ) - 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/speex ) - srtp? ( net-libs/libsrtp:0 ) - vorbis? ( media-libs/libvorbis )" - -DEPEND="${CDEPEND} - voicemail_storage_imap? ( virtual/imap-c-client ) - virtual/pkgconfig -" - -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-asterisk ) - syslog? ( virtual/logger )" - -PDEPEND="net-misc/asterisk-core-sounds - net-misc/asterisk-extra-sounds - net-misc/asterisk-moh-opsound" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - 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 -} - -src_prepare() { - default - AT_M4DIR=autoconf eautoreconf -} - -src_configure() { - local vmst - - econf \ - --libdir="/usr/$(get_libdir)" \ - --localstatedir="/var" \ - --with-crypto \ - --with-gsm=internal \ - --with-popt \ - --with-ssl \ - --with-z \ - --without-pwlib \ - $(use_with caps cap) \ - $(use_with http gmime) \ - $(use_with newt) \ - $(use_with portaudio) - - # 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 menuselect.makeopts - - # Broken functionality is forcibly disabled (bug #360143) - menuselect/menuselect --disable chan_misdn menuselect.makeopts - menuselect/menuselect --disable chan_ooh323 menuselect.makeopts - - # Utility set is forcibly enabled (bug #358001) - menuselect/menuselect --enable smsq menuselect.makeopts - menuselect/menuselect --enable streamplayer menuselect.makeopts - menuselect/menuselect --enable aelparse menuselect.makeopts - menuselect/menuselect --enable astman menuselect.makeopts - - # this is connected, otherwise it would not find - # ast_pktccops_gate_alloc symbol - menuselect/menuselect --enable chan_mgcp menuselect.makeopts - menuselect/menuselect --enable res_pktccops menuselect.makeopts - - # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available - menuselect/menuselect --enable pbx_dundi menuselect.makeopts - menuselect/menuselect --enable func_aes menuselect.makeopts - menuselect/menuselect --enable chan_iax2 menuselect.makeopts - - # SQlite3 is now the main database backend, enable related features - menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts - menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts - - # The others are based on USE-flag settings - use_select() { - local state=$(use "$1" && echo enable || echo disable) - shift # remove use from parameters - - while [[ -n $1 ]]; do - menuselect/menuselect --${state} "$1" menuselect.makeopts - shift - done - } - - 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_dahdibarge 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 xmpp res_xmpp - 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 srtp res_srtp - use_select syslog cdr_syslog - use_select vorbis format_ogg_vorbis - - # Voicemail storage ... - for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do - if use ${vmst}; then - menuselect/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/menuselect --enable $o menuselect.makeopts - done - fi -} - -src_compile() { - ASTLDFLAGS="${LDFLAGS}" emake -} - -src_install() { - mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die - emake DESTDIR="${D}" installdirs - emake DESTDIR="${D}" install - - if use radius; then - insinto /etc/radiusclient/ - doins contrib/dictionary.digium - fi - diropts -m 0750 -o root -g asterisk - keepdir /etc/asterisk - if use samples; then - emake DESTDIR="${D}" samples - for conffile in "${D}"etc/asterisk/*.* - do - chown root:root $conffile - chmod 0644 $conffile - done - einfo "Sample files have been installed" - else - einfo "Skipping installation of sample files..." - rm -f "${D}"var/lib/asterisk/mohmp3/* || die - rm -f "${D}"var/lib/asterisk/sounds/demo-* || die - rm -f "${D}"var/lib/asterisk/agi-bin/* || die - rm -f "${D}"etc/asterisk/* || die - fi - rm -rf "${D}"var/spool/asterisk/voicemail/default || die - - # keep directories - diropts -m 0770 -o asterisk asterisk - keepdir /var/lib/asterisk - keepdir /var/spool/asterisk - keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} - 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.tmpfiles.conf asterisk.conf - systemd_install_serviced "${FILESDIR}"/asterisk.service.conf - - # install the upgrade documentation - # - dodoc README UPGRADE* BUGS CREDITS - - # install extra documentation - # - if use doc - then - dodoc doc/*.txt - dodoc doc/*.pdf - fi - - # install logrotate snippet; bug #329281 - # - insinto /etc/logrotate.d - newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk -} - -pkg_postinst() { - # - # Announcements, warnings, reminders... - # - einfo "Asterisk has been installed" - echo - elog "If you want to know more about asterisk, visit these sites:" - elog "http://www.asteriskdocs.org/" - elog "http://www.voip-info.org/wiki-Asterisk" - echo - elog "http://www.automated.it/guidetoasterisk.htm" - echo - elog "Gentoo VoIP IRC Channel:" - elog "#gentoo-voip @ irc.freenode.net" - echo - echo - elog "Please read the Asterisk 11 upgrade document:" - elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11" -} - -pkg_config() { - einfo "Do you want to reset file permissions and ownerships (y/N)?" - - read tmp - tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" - - if [[ "$tmp" = "y" ]] ||\ - [[ "$tmp" = "yes" ]] - then - einfo "Resetting permissions to defaults..." - - for x in spool run lib log; do - chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk - done - - chown -R root:asterisk "${ROOT}"etc/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk - - einfo "done" - else - einfo "skipping" - fi -} diff --git a/net-misc/asterisk/asterisk-13.38.1-r1.ebuild b/net-misc/asterisk/asterisk-13.38.1-r1.ebuild new file mode 100644 index 000000000000..7fd03e6fd84c --- /dev/null +++ b/net-misc/asterisk/asterisk-13.38.1-r1.ebuild @@ -0,0 +1,308 @@ +# 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 + +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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +IUSE_VOICEMAIL_STORAGE=" + +voicemail_storage_file + voicemail_storage_odbc + voicemail_storage_imap +" +IUSE="${IUSE_VOICEMAIL_STORAGE} alsa 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" +IUSE_EXPAND="VOICEMAIL_STORAGE" +REQUIRED_USE="gtalk? ( xmpp ) + lua? ( ${LUA_REQUIRED_USE} ) + ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) + voicemail_storage_odbc? ( odbc ) +" + +PATCHES=( + "${FILESDIR}/${PN}-historic-no-var-run-install.patch" + "${FILESDIR}/${PN}-13.38.1-r1-autoconf-lua-version.patch" + "${FILESDIR}/${PN}-13.38.1-r1-func_lock-fix-races.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 ) + 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_setup() { + 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 + + 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 + + mkdir -p "${ED}/usr/$(get_libdir)/pkgconfig" || die + emake DESTDIR="${ED}" 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="${ED}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs + for conffile in "${ED}/etc/asterisk/"* + do + fowners root:root "${conffile#${ED}}" + fperms 0644 "${conffile#${ED}}" + done + + # 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.tmpfiles.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 + if use doc; then + dodoc doc/*.txt + dodoc doc/*.pdf + fi + + # 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. + for d in $(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-13.38.1.ebuild b/net-misc/asterisk/asterisk-13.38.1.ebuild new file mode 100644 index 000000000000..847f1d498afe --- /dev/null +++ b/net-misc/asterisk/asterisk-13.38.1.ebuild @@ -0,0 +1,299 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools linux-info systemd + +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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +IUSE_VOICEMAIL_STORAGE=" + +voicemail_storage_file + voicemail_storage_odbc + voicemail_storage_imap +" +IUSE="${IUSE_VOICEMAIL_STORAGE} alsa 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" +IUSE_EXPAND="VOICEMAIL_STORAGE" +REQUIRED_USE="gtalk? ( xmpp ) + ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) + voicemail_storage_odbc? ( odbc ) +" + +PATCHES=( + "${FILESDIR}/${PN}-historic-no-var-run-install.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 ) + 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? ( dev-lang/lua:0= ) + 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_setup() { + 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 +} + +src_prepare() { + default + AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" eautoreconf +} + +src_configure() { + local vmst + + econf \ + --libdir="/usr/$(get_libdir)" \ + --localstatedir="/var" \ + --with-crypto \ + --with-gsm=internal \ + --with-popt \ + --with-z \ + --with-libedit \ + $(use_with caps cap) \ + $(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 + + mkdir -p "${ED}/usr/$(get_libdir)/pkgconfig" || die + emake DESTDIR="${ED}" 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="${ED}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs + for conffile in "${ED}/etc/asterisk/"* + do + fowners root:root "${conffile#${ED}}" + fperms 0644 "${conffile#${ED}}" + done + + # 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.tmpfiles.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 + if use doc; then + dodoc doc/*.txt + dodoc doc/*.pdf + fi + + # 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. + for d in $(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-r1.ebuild b/net-misc/asterisk/asterisk-16.15.1-r1.ebuild new file mode 100644 index 000000000000..7259961c65f9 --- /dev/null +++ b/net-misc/asterisk/asterisk-16.15.1-r1.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 + +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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +IUSE_VOICEMAIL_STORAGE=" + +voicemail_storage_file + voicemail_storage_odbc + voicemail_storage_imap +" +IUSE="${IUSE_VOICEMAIL_STORAGE} alsa 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 unbound vorbis xmpp" +IUSE_EXPAND="VOICEMAIL_STORAGE" +REQUIRED_USE="gtalk? ( xmpp ) + lua? ( ${LUA_REQUIRED_USE} ) + ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) + voicemail_storage_odbc? ( odbc ) +" + +PATCHES=( + "${FILESDIR}/${PN}-historic-no-var-run-install.patch" + "${FILESDIR}/${PN}-13.38.1-r1-autoconf-lua-version.patch" + "${FILESDIR}/${PN}-13.38.1-r1-func_lock-fix-races.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 ) + 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-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_setup() { + 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 + + 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 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 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 + + mkdir -p "${ED}/usr/$(get_libdir)/pkgconfig" || die + emake DESTDIR="${ED}" 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="${ED}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs + for conffile in "${ED}/etc/asterisk/"* + do + fowners root:root "${conffile#${ED}}" + fperms 0644 "${conffile#${ED}}" + done + + # 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.tmpfiles.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 + if use doc; then + dodoc doc/*.txt + dodoc doc/*.pdf + fi + + # 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. + for d in $(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.ebuild b/net-misc/asterisk/asterisk-16.15.1.ebuild new file mode 100644 index 000000000000..da613c5156fa --- /dev/null +++ b/net-misc/asterisk/asterisk-16.15.1.ebuild @@ -0,0 +1,304 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools linux-info systemd + +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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +IUSE_VOICEMAIL_STORAGE=" + +voicemail_storage_file + voicemail_storage_odbc + voicemail_storage_imap +" +IUSE="${IUSE_VOICEMAIL_STORAGE} alsa 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 unbound vorbis xmpp" +IUSE_EXPAND="VOICEMAIL_STORAGE" +REQUIRED_USE="gtalk? ( xmpp ) + ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) + voicemail_storage_odbc? ( odbc ) +" + +PATCHES=( + "${FILESDIR}/${PN}-historic-no-var-run-install.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 ) + 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? ( dev-lang/lua:0= ) + 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_setup() { + 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 +} + +src_prepare() { + default + AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" eautoreconf +} + +src_configure() { + local vmst + + econf \ + --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 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 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 + + mkdir -p "${ED}/usr/$(get_libdir)/pkgconfig" || die + emake DESTDIR="${ED}" 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="${ED}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs + for conffile in "${ED}/etc/asterisk/"* + do + fowners root:root "${conffile#${ED}}" + fperms 0644 "${conffile#${ED}}" + done + + # 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.tmpfiles.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 + if use doc; then + dodoc doc/*.txt + dodoc doc/*.pdf + fi + + # 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. + for d in $(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.38.1-r1-autoconf-lua-version.patch b/net-misc/asterisk/files/asterisk-13.38.1-r1-autoconf-lua-version.patch new file mode 100644 index 000000000000..00a922ce0738 --- /dev/null +++ b/net-misc/asterisk/files/asterisk-13.38.1-r1-autoconf-lua-version.patch @@ -0,0 +1,56 @@ +From 61ef1a71e312f846b08ec4307c449f03907610a6 Mon Sep 17 00:00:00 2001 +From: Jaco Kroon <jaco@uls.co.za> +Date: Wed, 23 Dec 2020 19:41:10 +0200 +Subject: [PATCH] pbx_lua: Add LUA_VERSION environment variable to + ./configure. + +On Gentoo it's possible to have multiple lua versions installed, all +with a path of /usr, so it's not possible to use the current --with-lua +option to determisticly pin to a specific version as is required by the +Gentoo PMS standards. + +This environment variable allows to lock to specific versions, +unversioned check will be skipped if this variable is supplied. + +Change-Id: I8c403eda05df25ee0193960262ce849c7d2fd088 +Signed-off-by: Jaco Kroon <jaco@uls.co.za> +--- + configure | 7 ++++++- + configure.ac | 7 +++++-- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 64a0a5ace5..b380759b2b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -511,6 +511,7 @@ AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2]) + AST_EXT_LIB_SETUP([LIBXSLT], [LibXSLT], [libxslt]) + AST_EXT_LIB_SETUP_OPTIONAL([LIBXSLT_CLEANUP], [LibXSLT Library Cleanup Function], [LIBXSLT], [libxslt]) + AST_EXT_LIB_SETUP([LUA], [Lua], [lua]) ++AC_ARG_VAR([LUA_VERSION],[A space separated list of target lua versions to test.]) + AST_EXT_LIB_SETUP([MISDN], [mISDN user], [misdn]) + AST_EXT_LIB_SETUP([MYSQLCLIENT], [MySQL client], [mysqlclient]) + AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs]) +@@ -2559,7 +2560,7 @@ if test -z "$__opus_include" -o x"$__opus_include" = x" " ; then + fi + AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include]) + +-for ver in 5.4 5.3 5.2 5.1; do ++for ver in ${LUA_VERSION:-5.4 5.3 5.2 5.1}; do + AST_EXT_LIB_CHECK([LUA], lua${ver}, [luaL_newstate], lua${ver}/lua.h, [-lm]) + if test "x${PBX_LUA}" = "x1" ; then + if test x"${LUA_DIR}" = x; then +@@ -2572,7 +2573,9 @@ for ver in 5.4 5.3 5.2 5.1; do + done + + # Some distributions (like openSUSE and NetBSD) remove the 5.x suffix. +-AST_EXT_LIB_CHECK([LUA], [lua], [luaL_newstate], [lua.h], [-lm]) ++if test "x${LUA_VERSION}" = "x"; then ++ AST_EXT_LIB_CHECK([LUA], [lua], [luaL_newstate], [lua.h], [-lm]) ++fi + + # Accept either RADIUS client library, their APIs are fully compatible, + # just different header filenames and different SONAMEs +-- +2.26.2 + diff --git a/net-misc/asterisk/files/asterisk-13.38.1-r1-func_lock-fix-races.patch b/net-misc/asterisk/files/asterisk-13.38.1-r1-func_lock-fix-races.patch new file mode 100644 index 000000000000..b8b98e4929b2 --- /dev/null +++ b/net-misc/asterisk/files/asterisk-13.38.1-r1-func_lock-fix-races.patch @@ -0,0 +1,291 @@ +From 8ec686ebb4fa68512ca2dfe40b117523074aed0f Mon Sep 17 00:00:00 2001 +From: Jaco Kroon <jaco@uls.co.za> +Date: Fri, 18 Dec 2020 21:06:20 +0200 +Subject: [PATCH] func_lock: fix multiple-channel-grant problems. + +Under contention it becomes possible that multiple channels will be told +they successfully obtained the lock, which is a bug. Please refer + +ASTERISK-29217 + +This introduces a couple of changes. + +1. Replaces requesters ao2 container with simple counter (we don't + really care who is waiting for the lock, only how many). This is + updated undex ->mutex to prevent memory access races. +2. Correct semantics for ast_cond_timedwait() as described in + pthread_cond_broadcast(3P) is used (multiple threads can be released + on a single _signal()). +3. Module unload races are taken care of and memory properly cleaned + up. + +Change-Id: I6f68b5ec82ff25b2909daf6e4d19ca864a463e29 +Signed-off-by: Jaco Kroon <jaco@uls.co.za> +--- + funcs/func_lock.c | 163 ++++++++++++++++------------------------------ + 1 file changed, 56 insertions(+), 107 deletions(-) + +diff --git a/funcs/func_lock.c b/funcs/func_lock.c +index acb5fc935c..072640751e 100644 +--- a/funcs/func_lock.c ++++ b/funcs/func_lock.c +@@ -110,7 +110,6 @@ static AST_LIST_HEAD_STATIC(locklist, lock_frame); + static void lock_free(void *data); + static void lock_fixup(void *data, struct ast_channel *oldchan, struct ast_channel *newchan); + static int unloading = 0; +-static pthread_t broker_tid = AST_PTHREADT_NULL; + + static const struct ast_datastore_info lock_info = { + .type = "MUTEX", +@@ -124,8 +123,8 @@ struct lock_frame { + ast_cond_t cond; + /*! count is needed so if a recursive mutex exits early, we know how many times to unlock it. */ + unsigned int count; +- /*! Container of requesters for the named lock */ +- struct ao2_container *requesters; ++ /*! Count of waiting of requesters for the named lock */ ++ unsigned int requesters; + /*! who owns us */ + struct ast_channel *owner; + /*! name of the lock */ +@@ -147,8 +146,11 @@ static void lock_free(void *data) + while ((clframe = AST_LIST_REMOVE_HEAD(oldlist, list))) { + /* Only unlock if we own the lock */ + if (clframe->channel == clframe->lock_frame->owner) { ++ ast_mutex_lock(&clframe->lock_frame->mutex); + clframe->lock_frame->count = 0; + clframe->lock_frame->owner = NULL; ++ ast_cond_signal(&clframe->lock_frame->cond); ++ ast_mutex_unlock(&clframe->lock_frame->mutex); + } + ast_free(clframe); + } +@@ -173,54 +175,11 @@ static void lock_fixup(void *data, struct ast_channel *oldchan, struct ast_chann + if (clframe->lock_frame->owner == oldchan) { + clframe->lock_frame->owner = newchan; + } +- /* We don't move requesters, because the thread stack is different */ + clframe->channel = newchan; + } + AST_LIST_UNLOCK(list); + } + +-static void *lock_broker(void *unused) +-{ +- struct lock_frame *frame; +- struct timespec forever = { 1000000, 0 }; +- for (;;) { +- int found_requester = 0; +- +- /* Test for cancel outside of the lock */ +- pthread_testcancel(); +- AST_LIST_LOCK(&locklist); +- +- AST_LIST_TRAVERSE(&locklist, frame, entries) { +- if (ao2_container_count(frame->requesters)) { +- found_requester++; +- ast_mutex_lock(&frame->mutex); +- if (!frame->owner) { +- ast_cond_signal(&frame->cond); +- } +- ast_mutex_unlock(&frame->mutex); +- } +- } +- +- AST_LIST_UNLOCK(&locklist); +- pthread_testcancel(); +- +- /* If there are no requesters, then wait for a signal */ +- if (!found_requester) { +- nanosleep(&forever, NULL); +- } else { +- sched_yield(); +- } +- } +- /* Not reached */ +- return NULL; +-} +- +-static int ast_channel_cmp_cb(void *obj, void *arg, int flags) +-{ +- struct ast_channel *chan = obj, *cmp_args = arg; +- return strcasecmp(ast_channel_name(chan), ast_channel_name(cmp_args)) ? 0 : CMP_MATCH; +-} +- + static int get_lock(struct ast_channel *chan, char *lockname, int trylock) + { + struct ast_datastore *lock_store = ast_channel_datastore_find(chan, &lock_info, NULL); +@@ -290,17 +249,13 @@ static int get_lock(struct ast_channel *chan, char *lockname, int trylock) + AST_LIST_UNLOCK(&locklist); + return -1; + } +- current->requesters = ao2_container_alloc_list(AO2_ALLOC_OPT_LOCK_MUTEX, 0, +- NULL, ast_channel_cmp_cb); +- if (!current->requesters) { +- ast_mutex_destroy(¤t->mutex); +- ast_cond_destroy(¤t->cond); +- ast_free(current); +- AST_LIST_UNLOCK(&locklist); +- return -1; +- } ++ current->requesters = 0; + AST_LIST_INSERT_TAIL(&locklist, current, entries); + } ++ /* Add to requester list */ ++ ast_mutex_lock(¤t->mutex); ++ current->requesters++; ++ ast_mutex_unlock(¤t->mutex); + AST_LIST_UNLOCK(&locklist); + + /* Found lock or created one - now find or create the corresponding link in the channel */ +@@ -337,44 +292,42 @@ static int get_lock(struct ast_channel *chan, char *lockname, int trylock) + * the same amount, before we'll release this one. + */ + if (current->owner == chan) { ++ /* We're not a requester, we already have it */ ++ ast_mutex_lock(¤t->mutex); ++ current->requesters--; ++ ast_mutex_unlock(¤t->mutex); + current->count++; + return 0; + } + +- /* Okay, we have both frames, so now we need to try to lock. +- * +- * Locking order: always lock locklist first. We need the +- * locklist lock because the broker thread counts whether +- * there are requesters with the locklist lock held, and we +- * need to hold it, so that when we send our signal, below, +- * to wake up the broker thread, it definitely will see that +- * a requester exists at that point in time. Otherwise, we +- * could add to the requesters after it has already seen that +- * that lock is unoccupied and wait forever for another signal. +- */ +- AST_LIST_LOCK(&locklist); +- ast_mutex_lock(¤t->mutex); +- /* Add to requester list */ +- ao2_link(current->requesters, chan); +- pthread_kill(broker_tid, SIGURG); +- AST_LIST_UNLOCK(&locklist); +- + /* Wait up to three seconds from now for LOCK. */ + now = ast_tvnow(); + timeout.tv_sec = now.tv_sec + 3; + timeout.tv_nsec = now.tv_usec * 1000; + +- if (!current->owner +- || (!trylock +- && !(res = ast_cond_timedwait(¤t->cond, ¤t->mutex, &timeout)))) { +- res = 0; ++ ast_mutex_lock(¤t->mutex); ++ ++ res = 0; ++ while (!trylock && !res && current->owner) { ++ res = ast_cond_timedwait(¤t->cond, ¤t->mutex, &timeout); ++ } ++ if (current->owner) { ++ /* timeout; ++ * trylock; or ++ * cond_timedwait failed. ++ * ++ * either way, we fail to obtain the lock. ++ */ ++ res = -1; ++ } else { + current->owner = chan; + current->count++; +- } else { +- res = -1; ++ res = 0; + } + /* Remove from requester list */ +- ao2_unlink(current->requesters, chan); ++ current->requesters--; ++ if (res && unloading) ++ ast_cond_signal(¤t->cond); + ast_mutex_unlock(¤t->mutex); + + return res; +@@ -422,7 +375,10 @@ static int unlock_read(struct ast_channel *chan, const char *cmd, char *data, ch + } + + if (--clframe->lock_frame->count == 0) { ++ ast_mutex_lock(&clframe->lock_frame->mutex); + clframe->lock_frame->owner = NULL; ++ ast_cond_signal(&clframe->lock_frame->cond); ++ ast_mutex_unlock(&clframe->lock_frame->mutex); + } + + ast_copy_string(buf, "1", len); +@@ -478,34 +434,34 @@ static int unload_module(void) + /* Module flag */ + unloading = 1; + ++ /* Make it impossible for new requesters to be added ++ * NOTE: channels could already be in get_lock() */ ++ ast_custom_function_unregister(&lock_function); ++ ast_custom_function_unregister(&trylock_function); ++ + AST_LIST_LOCK(&locklist); +- while ((current = AST_LIST_REMOVE_HEAD(&locklist, entries))) { +- /* If any locks are currently in use, then we cannot unload this module */ +- if (current->owner || ao2_container_count(current->requesters)) { +- /* Put it back */ +- AST_LIST_INSERT_HEAD(&locklist, current, entries); +- AST_LIST_UNLOCK(&locklist); +- unloading = 0; +- return -1; ++ AST_LIST_TRAVERSE(&locklist, current, entries) { ++ ast_mutex_lock(¤t->mutex); ++ while (current->owner || current->requesters) { ++ /* either the mutex is locked, or other parties are currently in get_lock, ++ * we need to wait for all of those to clear first */ ++ ast_cond_wait(¤t->cond, ¤t->mutex); + } ++ ast_mutex_unlock(¤t->mutex); ++ /* At this point we know: ++ * 1. the lock has been released, ++ * 2. there are no requesters (nor should any be able to sneak in). ++ */ + ast_mutex_destroy(¤t->mutex); +- ao2_ref(current->requesters, -1); ++ ast_cond_destroy(¤t->cond); + ast_free(current); + } ++ AST_LIST_UNLOCK(&locklist); ++ AST_LIST_HEAD_DESTROY(&locklist); + +- /* No locks left, unregister functions */ +- ast_custom_function_unregister(&lock_function); +- ast_custom_function_unregister(&trylock_function); ++ /* At this point we can safely stop access to UNLOCK */ + ast_custom_function_unregister(&unlock_function); + +- if (broker_tid != AST_PTHREADT_NULL) { +- pthread_cancel(broker_tid); +- pthread_kill(broker_tid, SIGURG); +- pthread_join(broker_tid, NULL); +- } +- +- AST_LIST_UNLOCK(&locklist); +- + return 0; + } + +@@ -515,13 +471,6 @@ static int load_module(void) + res |= ast_custom_function_register_escalating(&trylock_function, AST_CFE_READ); + res |= ast_custom_function_register_escalating(&unlock_function, AST_CFE_READ); + +- if (ast_pthread_create_background(&broker_tid, NULL, lock_broker, NULL)) { +- ast_log(LOG_ERROR, "Failed to start lock broker thread. Unloading func_lock module.\n"); +- broker_tid = AST_PTHREADT_NULL; +- unload_module(); +- return AST_MODULE_LOAD_DECLINE; +- } +- + return res; + } + +-- +2.26.2 + diff --git a/net-misc/asterisk/metadata.xml b/net-misc/asterisk/metadata.xml index d19226fb19d0..d3ea21bdff55 100644 --- a/net-misc/asterisk/metadata.xml +++ b/net-misc/asterisk/metadata.xml @@ -17,7 +17,6 @@ <flag name="ilbc">Enable the Internet Low Bitrate Codec (iLBC)</flag> <flag name="newt">Include additional tools that require redhats windowing toolkit</flag> <flag name="pjproject">Enable support for pjproject (pjsip)</flag> - <flag name="samples">Install sample sound and configuration files (default: on)</flag> <flag name="span">Enable support for the spandsp codec</flag> <flag name="srtp">Enable support for encrypted voice transmission (secure RTP)</flag> <flag name="statsd">Enable statsd integration</flag> |