commit:     0f18b7d670a542d989ed2b9c1a48ea509067d2e1
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 19 20:37:26 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Wed Mar 19 20:57:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f18b7d6

net-libs/gnutls: fix linkage (the lack of) for USE="zlib zstd brotli"

gnutls upstream supports these --with-* flags using the values
"yes/link/dlopen/no", and defaults to dlopen. This means that we
technically do not need the deps at runtime, like a kind of horrifying
"advertisement" for IUSE_RUNTIME in combination with build-only
dependencies. The actual goal here, I suppose, is that on Debian you can
unmerge zlib if you don't need gnutls support for it, and it's only a
"suggested" dependency, so a single binary build is useful for all
possible users. Gentoo has USE flags for this, and would have a hard
runtime dependency on the compression library either way, depending on
how it's built -- rebuilding without that USE is trivial.

So, for our use cases, it's much better to specify that we want to link
directly to the compression libs, as it makes iwdevtools happier, plays
nicely with preserved-libs, and avoids the frankly horrifying
possibility that some other library *uses* gnutls, and also uses zlib /
zstd / brotli, maybe via dlopen too, maybe dlclosing it multiple times.
If a plugin system was desirable, it would use gnutls plugins tbh (and
dlopen those, which in turn have genuine shlib linkage to the external
libs they provide a wrapper for).

So, using =link is all around safer with no downsides, let's do it.

Per Sam's advice: bumping via git mv.

Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 net-libs/gnutls/{gnutls-3.8.9.ebuild => gnutls-3.8.9-r1.ebuild} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net-libs/gnutls/gnutls-3.8.9.ebuild 
b/net-libs/gnutls/gnutls-3.8.9-r1.ebuild
similarity index 98%
rename from net-libs/gnutls/gnutls-3.8.9.ebuild
rename to net-libs/gnutls/gnutls-3.8.9-r1.ebuild
index 36375421e583..9aff6cdc0997 100644
--- a/net-libs/gnutls/gnutls-3.8.9.ebuild
+++ b/net-libs/gnutls/gnutls-3.8.9-r1.ebuild
@@ -129,11 +129,11 @@ multilib_src_configure() {
                $(use_enable sslv3 ssl3-support)
                $(use_enable static-libs static)
                $(use_enable tls-heartbeat heartbeat-support)
-               $(use_with brotli)
+               $(use_with brotli '' link)
                $(use_with idn)
                $(use_with pkcs11 p11-kit)
-               $(use_with zlib)
-               $(use_with zstd)
+               $(use_with zlib '' link)
+               $(use_with zstd '' link)
                --disable-rpath
                
--with-default-trust-store-file="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
                
--with-unbound-root-key-file="${EPREFIX}"/etc/dnssec/root-anchors.txt

Reply via email to