pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
www/curl picks up native zstd by itself on Linux (add/fix brotli and zstd options)
I noticed on Linux that www/curl detects and builds with native zstd by
itself. (zstd isn't made an option, nor is it explicitly disabled.)
Since curl 8.9.0 "configure: fix pkg-config names (zstd, ngtcp2*)" in
pkgsrc-current, this results in packages like www/snownews or
www/libproxy unexpectedly searching for or depending on zstd when they
search for curl via pkg-config.
curl 8.8.0 in pkgsrc-2024Q2 also detects and builds with native zstd,
but packages that depend on curl and use pkg-config don't seem to be
affected.
If only pkgsrc zstd is installed, it is ignored.
If only native zstd is installed, www/curl detects and builds against
native zstd:
> # ldd /usr/pkg/bin/curl | grep zstd
> libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007a3e41736000)
If both native and pkgsrc zstd are installed, pkgsrc zstd seems to take
priority (Slackware 15.0 has zstd 1.5.2 or 1.5.5):
> # ldd /usr/pkg/bin/curl | grep zstd
> libzstd.so.1 => /usr/pkg/lib/libzstd.so.1 (0xec62e000)
> # /usr/pkg/bin/curl --version | head -n1
> curl 8.9.1 (i486-slackware-linux-gnu) libcurl/8.9.1 OpenSSL/3.3.1 zlib/1.3.1 zstd/1.5.6 libidn2/2.3.7 nghttp2/1.62.1
> # pkg_delete -f zstd
> # /usr/pkg/bin/curl --version | head -n1
> curl 8.9.1 (i486-slackware-linux-gnu) libcurl/8.9.1 OpenSSL/3.3.1 zlib/1.3.1 zstd/1.5.5 libidn2/2.3.7 nghttp2/1.62.1
I found that this also happens with brotli (detects native brotli on
its own, unexpected dependency on brotli) if I comment it out in
options.mk.
I tried adding zstd to options.mk and buildlink3.mk, and it looks like
it works, but I have not tested extensively. I also noticed brotli was
missing from buildlink3.mk and added it there.
curl 7.72.0 in August 2020 added zstd decoding support. I don't know
if other packages might do this without explicitly specifying
--without-... or --disable-..., or if this affects other platforms that
offer zstd.
--
Iris
Add missing brotli option to buildlink3.mk.
Add zstd option to options.mk and buildlink3.mk.
diff --git a/www/curl/buildlink3.mk b/www/curl/buildlink3.mk
index 84fb00f555c0..16a44daae997 100644
--- a/www/curl/buildlink3.mk
+++ b/www/curl/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.60 2024/05/16 06:15:40 wiz Exp $
+# $NetBSD$
BUILDLINK_TREE+= curl
@@ -29,6 +29,12 @@ pkgbase:= curl
.if ${PKG_BUILD_OPTIONS.curl:Mhttp2}
. include "../../www/nghttp2/buildlink3.mk"
.endif
+.if ${PKG_BUILD_OPTIONS.curl:Mbrotli}
+. include "../../archivers/brotli/buildlink3.mk"
+.endif
+.if ${PKG_BUILD_OPTIONS.curl:Mzstd}
+. include "../../archivers/zstd/buildlink3.mk"
+.endif
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
diff --git a/www/curl/options.mk b/www/curl/options.mk
index e27aca6e4f75..690d1e7f7507 100644
--- a/www/curl/options.mk
+++ b/www/curl/options.mk
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.20 2023/10/22 13:34:31 js Exp $
+# $NetBSD$
PKG_OPTIONS_VAR= PKG_OPTIONS.curl
-PKG_SUPPORTED_OPTIONS= inet6 libssh2 gssapi ldap rtmp idn http2 brotli
+PKG_SUPPORTED_OPTIONS= inet6 libssh2 gssapi ldap rtmp idn http2 brotli zstd
PKG_SUGGESTED_OPTIONS= http2 inet6 idn
PKG_OPTIONS_LEGACY_OPTS= libidn:idn
@@ -68,3 +68,10 @@ CONFIGURE_ARGS+= --with-brotli
.else
CONFIGURE_ARGS+= --without-brotli
.endif
+
+.if !empty(PKG_OPTIONS:Mzstd)
+.include "../../archivers/zstd/buildlink3.mk"
+CONFIGURE_ARGS+= --with-zstd
+.else
+CONFIGURE_ARGS+= --without-zstd
+.endif
Home |
Main Index |
Thread Index |
Old Index