Diff lighttpd-1.4.58-r1 with a lighttpd-1.4.59-r1

/usr/portage/www-servers/lighttpd/lighttpd-1.4.59-r1.ebuild 2021-10-13 09:09:00.000000000 +0300
14 14
LICENSE="BSD GPL-2"
15 15
SLOT="0"
16 16
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
17
IUSE="brotli bzip2 dbi doc gdbm gnutls ipv6 kerberos ldap libev lua maxminddb minimal mbedtls mmap memcached mysql nss pcre php postgres rrdtool sasl selinux ssl sqlite test webdav xattr zlib"
17
IUSE="brotli bzip2 dbi doc gdbm gnutls ipv6 kerberos ldap libev lua maxminddb mbedtls mmap memcached mysql nss pcre php postgres rrdtool sasl selinux ssl sqlite test webdav xattr zlib zstd"
18 18
RESTRICT="!test? ( test )"
19 19

  
20 20
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
......
27 27
BDEPEND="virtual/pkgconfig"
28 28

  
29 29
COMMON_DEPEND="
30
	acct-group/lighttpd
31
	acct-user/lighttpd
30 32
	virtual/libcrypt:=
31 33
	brotli? ( app-arch/brotli )
32 34
	bzip2? ( app-arch/bzip2 )
......
37 39
		sqlite? ( dev-db/libdbi-drivers[sqlite] )
38 40
	)
39 41
	gdbm? ( sys-libs/gdbm:= )
40
	gnutls? ( net-libs/gnutls:= )
42
	gnutls? ( net-libs/gnutls )
41 43
	kerberos? ( virtual/krb5 )
42 44
	ldap? ( >=net-nds/openldap-2.1.26 )
43 45
	libev? ( >=dev-libs/libev-4.01 )
44 46
	lua? ( ${LUA_DEPS} )
45
	maxminddb? ( dev-libs/libmaxminddb:= )
46
	mbedtls? ( net-libs/mbedtls:= )
47
	maxminddb? ( dev-libs/libmaxminddb )
48
	mbedtls? ( net-libs/mbedtls )
47 49
	memcached? ( dev-libs/libmemcached )
48 50
	nss? ( dev-libs/nss )
49
	pcre? ( >=dev-libs/libpcre-3.1:= )
51
	pcre? ( >=dev-libs/libpcre-3.1 )
50 52
	php? ( dev-lang/php:*[cgi] )
51 53
	rrdtool? ( net-analyzer/rrdtool )
52 54
	sasl? ( dev-libs/cyrus-sasl )
......
57 59
	)
58 60
	xattr? ( kernel_linux? ( sys-apps/attr ) )
59 61
	zlib? ( >=sys-libs/zlib-1.1 )
60
	acct-group/lighttpd
61
	acct-user/lighttpd"
62
	zstd? ( app-arch/zstd )"
62 63

  
63 64
DEPEND="${COMMON_DEPEND}
64 65
	doc?  ( dev-python/docutils )
......
71 72
	selinux? ( sec-policy/selinux-apache )
72 73
"
73 74

  
75
PATCHES=( "${FILESDIR}"/${P}-nspr-header.patch )
76

  
74 77
# update certain parts of lighttpd.conf based on conditionals
75 78
update_config() {
76 79
	local config="${D}/etc/lighttpd/lighttpd.conf"
77 80

  
78 81
	# enable php/mod_fastcgi settings
79
	use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; }
82
	if use php; then sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; fi
80 83

  
81 84
	# automatically listen on IPv6 if built with USE=ipv6. Bug #234987
82
	use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; }
83
}
84

  
85
# remove non-essential stuff (for USE=minimal)
86
remove_non_essential() {
87
	local libdir="${D}/usr/$(get_libdir)/${PN}"
88

  
89
	# text docs
90
	use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt
91

  
92
	# non-essential modules
93
	rm -f \
94
		${libdir}/mod_{evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.* || die
95

  
96
	# allow users to keep some based on USE flags
97
	use pcre    || rm -f ${libdir}/mod_{ssi,re{direct,write}}.*
98
	use webdav  || rm -f ${libdir}/mod_webdav.*
99
	use lua     || rm -f ${libdir}/mod_{cml,magnet}.*
100
	use rrdtool || rm -f ${libdir}/mod_rrdtool.*
101
	use zlib || use bzip2 || use brotli || rm -f ${libdir}/mod_deflate.*
85
	if use ipv6; then sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; fi
102 86
}
103 87

  
104 88
pkg_setup() {
......
120 104

  
121 105
src_prepare() {
122 106
	default
123
	use memcached && append-ldflags -pthread
107
	if use memcached; then append-ldflags -pthread; fi
124 108
	# dev-python/docutils installs rst2html.py not rst2html
125 109
	sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \
126 110
		die "sed doc/Makefile.am failed"
......
161 145
		$(use_with webdav webdav-props) \
162 146
		$(use_with webdav webdav-locks) \
163 147
		$(use_with xattr attr) \
164
		$(use_with zlib)
148
		$(use_with zlib) \
149
		$(use_with zstd)
165 150
}
166 151

  
167 152
src_compile() {
......
204 189
	# docs
205 190
	dodoc AUTHORS README NEWS doc/scripts/*.sh
206 191
	newdoc doc/config//lighttpd.conf lighttpd.conf.distrib
207
	use ipv6 && readme.gentoo_create_doc
192
	if use ipv6; then readme.gentoo_create_doc; fi
208 193

  
209
	use doc && dodoc -r doc
194
	if use doc; then dodoc -r doc; fi
210 195

  
211 196
	docinto txt
212 197
	dodoc doc/outdated/*.txt
......
219 204
	fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd
220 205
	fperms 0750 /var/l{ib,og}/lighttpd
221 206

  
222
	# spawn-fcgi may optionally be installed via www-servers/spawn-fcgi
223
	rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* || die
224

  
225
	use minimal && remove_non_essential
226

  
227 207
	systemd_dounit "${FILESDIR}/${PN}.service"
228 208
	newtmpfiles "${FILESDIR}/${PN}.tmpfiles.conf" "${PN}.conf"
229 209
}
......
231 211
pkg_postinst() {
232 212
	tmpfiles_process ${PN}.conf
233 213

  
234
	use ipv6 && readme.gentoo_print_elog
235

  
236
	if [[ -f ${ROOT}/etc/conf.d/spawn-fcgi.conf ]] ; then
237
		einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi."
238
		einfo "spawn-fcgi's init script configuration is now located"
239
		einfo "at /etc/conf.d/spawn-fcgi."
240
	fi
214
	if use ipv6; then readme.gentoo_print_elog; fi
241 215

  
242 216
	if [[ -f ${ROOT}/etc/lighttpd.conf ]] ; then
243 217
		elog
......
264 238
	elog "Upstream has deprecated a number of features. They are not missing"
265 239
	elog "but have been migrated to other mechanisms. Please see upstream"
266 240
	elog "changelog for details."
267
	elog "https://www.lighttpd.net/2020/12/17/1.4.57/"
241
	elog "https://www.lighttpd.net/2021/2/2/1.4.59/"
268 242
}
Thank you!