summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2024-05-08 07:07:22 -0400
committerSam James <sam@gentoo.org>2024-06-30 09:27:48 +0100
commit3f1aad3dcf145d7d7b6a877c157db123f4de26b3 (patch)
treebd4c886222fa0ca21a069bb1dd0ae0ffb47a744e /www-servers/lighttpd
parentwww-servers/lighttpd: USE_LIBDEFLATE option (diff)
downloadgentoo-3f1aad3dcf145d7d7b6a877c157db123f4de26b3.tar.gz
gentoo-3f1aad3dcf145d7d7b6a877c157db123f4de26b3.tar.bz2
gentoo-3f1aad3dcf145d7d7b6a877c157db123f4de26b3.zip
www-servers/lighttpd: USE_CRYPTO_* flags
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'www-servers/lighttpd')
-rw-r--r--www-servers/lighttpd/lighttpd-9999.ebuild36
-rw-r--r--www-servers/lighttpd/metadata.xml6
2 files changed, 39 insertions, 3 deletions
diff --git a/www-servers/lighttpd/lighttpd-9999.ebuild b/www-servers/lighttpd/lighttpd-9999.ebuild
index ea8a10005ca7..c50a54419e5a 100644
--- a/www-servers/lighttpd/lighttpd-9999.ebuild
+++ b/www-servers/lighttpd/lighttpd-9999.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD GPL-2"
SLOT="0"
-IUSE="+brotli dbi gnutls kerberos ldap libdeflate +lua maxminddb mbedtls +nettle nss +pcre php sasl selinux ssl test unwind webdav xattr +zlib zstd"
+IUSE="+brotli crypto-gnutls crypto-mbedtls crypto-nettle crypto-openssl dbi gnutls kerberos ldap libdeflate +lua maxminddb mbedtls +nettle nss +pcre php sasl selinux ssl test unwind webdav xattr +zlib zstd"
RESTRICT="!test? ( test )"
REQUIRED_USE="
@@ -36,6 +36,10 @@ COMMON_DEPEND="
>=dev-libs/xxhash-0.8.2
virtual/libcrypt:=
brotli? ( app-arch/brotli:= )
+ crypto-gnutls? ( net-libs/gnutls )
+ crypto-mbedtls? ( net-libs/mbedtls )
+ crypto-nettle? ( dev-libs/nettle:= )
+ crypto-openssl? ( >=dev-libs/openssl-0.9.7:= )
dbi? (
dev-db/libdbi
)
@@ -107,9 +111,37 @@ pkg_setup() {
}
src_configure() {
+
+ local c_defs
+ local with_nettle
+
+ # choose crypto library
+ # (one specific library might be preferred on embedded systems via
+ # MYMESONARGS with e.g. -DFORCE_blah_CRYPTO)
+ if use crypto-nettle ; then
+ with_nettle=$(meson_use crypto-nettle with_nettle)
+ elif use nettle ; then
+ with_nettle=$(meson_use nettle with_nettle)
+ else
+ if use crypto-mbedtls ; then
+ c_defs+=-DFORCE_MBEDTLS_CRYPTO
+ elif use crypto-openssl ; then
+ c_defs+=-DFORCE_OPENSSL_CRYPTO
+ elif use crypto-gnutls ; then
+ c_defs+=-DFORCE_GNUTLS_CRYPTO
+ fi
+ fi
+
+ local c_args
+ if c_defs ; then
+ c_args=-Dc_args=\"${c_defs[0]}\"
+ fi
+
local emesonargs=(
-Dmoduledir="$(get_libdir)"/${PN}
+ ${c_args}
+
$(meson_feature brotli with_brotli)
# TODO: revisit (was off in autotools ebuild)
@@ -134,7 +166,7 @@ src_configure() {
$(meson_feature maxminddb with_maxminddb)
$(meson_use mbedtls with_mbedtls)
- $(meson_use nettle with_nettle)
+ ${with_nettle}
$(meson_use nss with_nss)
# Obsolete
diff --git a/www-servers/lighttpd/metadata.xml b/www-servers/lighttpd/metadata.xml
index e4c15c0ffdca..02655cc07024 100644
--- a/www-servers/lighttpd/metadata.xml
+++ b/www-servers/lighttpd/metadata.xml
@@ -15,11 +15,15 @@
</longdescription>
<use>
<flag name="brotli">Enable output compression via <pkg>app-arch/brotli</pkg> (recommended)</flag>
+ <flag name="crypto-gnutls">Use <pkg>net-libs/gnutls</pkg> as crypto library</flag>
+ <flag name="crypto-mbedtls">Use <pkg>net-libs/mbedtls</pkg> as crypto library</flag>
+ <flag name="crypto-nettle">Use <pkg>dev-libs/nettle</pkg> as crypto library</flag>
+ <flag name="crypto-openssl">Use <pkg>dev-libs/openssl</pkg> as crypto library</flag>
<flag name="gnutls">Build module for TLS via <pkg>net-libs/gnutls</pkg></flag>
<flag name="libdeflate">Enable output compression via <pkg>app-arch/libdeflate</pkg></flag>
<flag name="maxminddb">Add support for geolocation using <pkg>dev-libs/libmaxminddb</pkg></flag>
<flag name="mbedtls">Build module for TLS via <pkg>net-libs/mbedtls</pkg></flag>
- <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> as crypto backend</flag>
+ <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> as crypto library</flag>
<flag name="nss">Build module for TLS via Mozilla's Network Security Services</flag>
<flag name="webdav">Enable webdav properties</flag>
<flag name="zlib">Enable output compression via gzip or deflate algorithms from <pkg>sys-libs/zlib</pkg></flag>