Diff asterisk-16.30.1 with a asterisk-18.17.0

/usr/portage/net-misc/asterisk/asterisk-18.17.0.ebuild 2023-10-09 14:52:34.628368480 +0300
5 5

  
6 6
LUA_COMPAT=( lua5-{1..4} )
7 7

  
8
inherit autotools linux-info lua-single toolchain-funcs
8
inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles
9 9

  
10 10
DESCRIPTION="Asterisk: A Modular Open Source PBX System"
11 11
HOMEPAGE="https://www.asterisk.org/"
......
15 15
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
16 16

  
17 17
IUSE_VOICEMAIL_STORAGE=(
18
	+voicemail_storage_file
19 18
	voicemail_storage_odbc
20 19
	voicemail_storage_imap
21 20
)
......
23 22
IUSE_EXPAND="VOICEMAIL_STORAGE"
24 23
REQUIRED_USE="gtalk? ( xmpp )
25 24
	lua? ( ${LUA_REQUIRED_USE} )
26
	^^ ( ${IUSE_VOICEMAIL_STORAGE[*]//+/} )
27 25
	voicemail_storage_odbc? ( odbc )
28 26
"
29 27

  
30 28
PATCHES=(
31 29
	"${FILESDIR}/asterisk-16.16.2-no-var-run-install.patch"
32
	"${FILESDIR}/asterisk-16.29.1_18.15.1_20.0.1-noexec_stack.patch"
33 30
)
34 31

  
35 32
DEPEND="acct-user/asterisk
......
69 66
	mysql? ( dev-db/mysql-connector-c:= )
70 67
	newt? ( dev-libs/newt )
71 68
	odbc? ( dev-db/unixODBC )
72
	pjproject? ( >=net-libs/pjproject-2.9:= )
69
	pjproject? ( >=net-libs/pjproject-2.12:= )
73 70
	portaudio? ( media-libs/portaudio )
74 71
	postgres? ( dev-db/postgresql:* )
75 72
	radius? ( net-dialup/freeradius-client )
......
101 98
	net-misc/asterisk-moh-opsound
102 99
	selinux? ( sec-policy/selinux-asterisk )
103 100
	syslog? ( virtual/logger )"
104
PDEPEND="net-misc/asterisk-base"
105 101

  
106 102
BDEPEND="dev-libs/libxml2:2
107 103
	virtual/pkgconfig"
......
151 147
	local copt cstate
152 148

  
153 149
	econf \
154
		SED=sed \
155 150
		LUA_VERSION="${ELUA#lua}" \
156 151
		--libdir="/usr/$(get_libdir)" \
157 152
		--localstatedir="/var" \
......
264 259
	_use_select xmpp         res_xmpp
265 260

  
266 261
	# Voicemail storage ...
262
	_menuselect --enable app_voicemail menuselect.makeopts
267 263
	for vmst in "${IUSE_VOICEMAIL_STORAGE[@]}"; do
268 264
		if use "${vmst#+}"; then
269
			_menuselect --enable "$(echo "${vmst##*_}" | tr '[:lower:]' '[:upper:]')_STORAGE" menuselect.makeopts
265
			_menuselect --enable "app_voicemail_${vmst##*_}" menuselect.makeopts
270 266
		fi
271 267
	done
272 268

  
......
299 295
	diropts -m 0750 -o root -g asterisk
300 296
	dodir /etc/asterisk
301 297

  
302
	emake "${_make_args[@]}" install install-configs
298
	emake "${_make_args[@]}" install install-headers install-configs
303 299

  
304 300
	fowners asterisk: /var/lib/asterisk/astdb
305 301

  
......
314 310
	diropts -m 0750 -o asterisk -g asterisk
315 311
	keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
316 312

  
313
	newsbin "${FILESDIR}/asterisk_wrapper-16.26.1-18.12.1" asterisk_wrapper
314
	newinitd "${FILESDIR}"/initd-16.26.1-18.12.1 asterisk
315
	newconfd "${FILESDIR}"/confd-16.26.1-18.12.1 asterisk
316

  
317
	systemd_dounit "${FILESDIR}"/asterisk.service
318
	newtmpfiles "${FILESDIR}"/asterisk.tmpfiles-16.22.0-18.8.0.conf asterisk.conf
319
	systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
320

  
317 321
	# Reset diropts else dodoc uses it for doc installations.
318 322
	diropts -m0755
319 323

  
......
323 327
	# install extra documentation
324 328
	use doc && dodoc doc/*.{txt,pdf}
325 329

  
330
	# install logrotate snippet; bug #329281
331
	#
332
	insinto /etc/logrotate.d
333
	newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
334

  
326 335
	# Asterisk installs a few folders that's empty by design,
327 336
	# but still required.  This finds them, and marks them for
328 337
	# portage.
......
332 341
}
333 342

  
334 343
pkg_postinst() {
344
	tmpfiles_process asterisk.conf
345

  
335 346
	if [ -z "${REPLACING_VERSIONS}" ]; then
336 347
		elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/"
337 348
		elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat"
Thank you!