Diff unrealircd-5.2.4-r1 with a unrealircd-6.0.4.2

/usr/portage/net-irc/unrealircd/unrealircd-6.0.4.2.ebuild 2023-10-09 14:52:34.468368476 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6 6
SSL_CERT_MANDATORY=1
7 7
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/unrealircd.asc
8
inherit autotools ssl-cert systemd verify-sig
8
inherit autotools ssl-cert systemd tmpfiles verify-sig
9 9

  
10 10
DESCRIPTION="An advanced Internet Relay Chat daemon"
11 11
HOMEPAGE="https://www.unrealircd.org/"
......
14 14

  
15 15
LICENSE="GPL-2+"
16 16
SLOT="0"
17
KEYWORDS="amd64 arm arm64 ppc ~ppc64 x86 ~amd64-linux"
18
IUSE="class-nofakelag curl +operoverride operoverride-verify +prefixaq showlistmodes"
17
KEYWORDS="amd64 arm arm64 ppc ~ppc64 ~riscv x86 ~amd64-linux"
18
IUSE="class-nofakelag curl geoip +operoverride operoverride-verify"
19 19

  
20
RDEPEND="acct-group/unrealircd
20
RDEPEND="
21
	acct-group/unrealircd
21 22
	acct-user/unrealircd
22 23
	>=app-crypt/argon2-20171227-r1:=
23 24
	dev-libs/libpcre2
24 25
	dev-libs/libsodium:=
25
	dev-libs/openssl:0=
26
	dev-libs/openssl:=
27
	dev-libs/jansson:=
26 28
	>=net-dns/c-ares-1.7:=
27 29
	virtual/libcrypt:=
28
	curl? ( net-misc/curl[adns] )"
30
	curl? ( net-misc/curl[adns] )
31
	geoip? ( dev-libs/libmaxminddb )
32
"
29 33
DEPEND="${RDEPEND}"
30
BDEPEND="virtual/pkgconfig
31
	verify-sig? ( sec-keys/openpgp-keys-unrealircd )"
34
BDEPEND="
35
	virtual/pkgconfig
36
	verify-sig? ( sec-keys/openpgp-keys-unrealircd )
37
"
32 38

  
33 39
DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} )
34 40

  
41
PATCHES=(
42
	"${FILESDIR}"/${PN}-6.0.4.2-configure-clang16.patch
43
)
44

  
35 45
src_prepare() {
36 46
	# QA check against bundled pkgs
37 47
	rm -r extras || die
......
72 82
		--with-system-argon2 \
73 83
		--with-system-cares \
74 84
		--with-system-pcre2 \
85
		--with-system-sodium \
86
		--with-system-jansson \
75 87
		--enable-dynamic-linking \
88
		--with-controlfile="${EPREFIX}"/run/${PN}/unrealircd.ctl \
76 89
		--enable-ssl="${EPREFIX}"/usr \
77 90
		$(use_enable curl libcurl "${EPREFIX}"/usr) \
78
		$(use_enable prefixaq) \
79
		$(use_with showlistmodes) \
80 91
		$(use_with !operoverride no-operoverride) \
81
		$(use_with operoverride-verify)
92
		$(use_with operoverride-verify) \
93
		$(use_enable geoip libmaxminddb)
82 94
}
83 95

  
84 96
src_install() {
......
86 98
	keepdir /var/lib/${PN}/tmp
87 99

  
88 100
	newbin src/ircd ${PN}
101
	dobin src/unrealircdctl
102

  
103
	newtmpfiles "${FILESDIR}"/unrealircd.tmpfiles unrealircd.conf
89 104

  
90 105
	(
91 106
		cd src/modules || die
......
129 144
}
130 145

  
131 146
pkg_postinst() {
147
	tmpfiles_process unrealircd.conf
148

  
132 149
	# Move docert call from src_install() to install_cert in pkg_postinst for
133 150
	# bug #201682
134 151
	if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then
......
148 165

  
149 166
	local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf
150 167
	# Fix up the default cloak keys.
151
	if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then
168
	if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"Oozahho1raezoh0iMee4ohvegaifahv5xaepeitaich9tahdiquaid0geecipahdauVaij3zieph4ahi";$' "${unrealircd_conf}"; then
152 169
		ebegin "Generating cloak-keys"
153 170
		local keys=(
154
			$(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 3")
171
			$(su ${PN} -s "${EPREFIX}"/bin/sh -c "${PN} -k 2>&1 | tail -n 6 | head -n 3")
155 172
		)
156 173
		[[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]]
157 174
		eend $?
......
160 177
		sed -i \
161 178
			-e '/cloak-keys/ {
162 179
n
163
s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/
180
s/"Oozahho1raezoh0iMee4ohvegaifahv5xaepeitaich9tahdiquaid0geecipahdauVaij3zieph4ahi";/'${keys[0]}'/
164 181
n
165
s/"and another one";/"'"${keys[1]}"'";/
182
s/"and another one";/'${keys[1]}'/
166 183
n
167
s/"and another one";/"'"${keys[2]}"'";/
184
s/"and another one";/'${keys[2]}'/
168 185
}' \
169 186
			"${unrealircd_conf}"
170 187
		eend $?
Thank you!