pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www



Module Name:    pkgsrc
Committed By:   adam
Date:           Sun Jun  7 18:03:46 UTC 2026

Modified Files:
        pkgsrc/www/curl: distinfo
        pkgsrc/www/libcurl-gnutls: Makefile
Added Files:
        pkgsrc/www/curl/patches: patch-configure patch-lib_curl__sha512__256.c
            patch-lib_md5.c patch-lib_sha256.c patch-lib_vtls_gtls.c

Log Message:
curl/libcurl-gnutls: fix build with nettle 4.0; support Darwin


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 pkgsrc/www/curl/distinfo
cvs rdiff -u -r0 -r1.24 pkgsrc/www/curl/patches/patch-configure
cvs rdiff -u -r0 -r1.1 pkgsrc/www/curl/patches/patch-lib_curl__sha512__256.c \
    pkgsrc/www/curl/patches/patch-lib_md5.c \
    pkgsrc/www/curl/patches/patch-lib_sha256.c \
    pkgsrc/www/curl/patches/patch-lib_vtls_gtls.c
cvs rdiff -u -r1.25 -r1.26 pkgsrc/www/libcurl-gnutls/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/curl/distinfo
diff -u pkgsrc/www/curl/distinfo:1.225 pkgsrc/www/curl/distinfo:1.226
--- pkgsrc/www/curl/distinfo:1.225      Fri May 15 12:32:20 2026
+++ pkgsrc/www/curl/distinfo    Sun Jun  7 18:03:46 2026
@@ -1,6 +1,11 @@
-$NetBSD: distinfo,v 1.225 2026/05/15 12:32:20 kikadf Exp $
+$NetBSD: distinfo,v 1.226 2026/06/07 18:03:46 adam Exp $
 
 BLAKE2s (curl-8.20.0.tar.xz) = 76a07a514760771d7fbde7a8337763cfd95859d9265a0712e25b41a8826773f8
 SHA512 (curl-8.20.0.tar.xz) = edfa5882aaeefcf2226fe03b19246151c0377c3656f9c8cc385bdaf34565e1354e762005b58780917a6d98039ae34085e4a4bcb44255c77e3b0e1d94090c010b
 Size (curl-8.20.0.tar.xz) = 2834456 bytes
+SHA1 (patch-configure) = 4e396261d04e25ca26b4bf114cf872f6da57963e
+SHA1 (patch-lib_curl__sha512__256.c) = 7fdca5fc710e1a21e3ce8b6ced8c5cc8151f5ee0
+SHA1 (patch-lib_md5.c) = 07d5d7f4a74aea5625e65de49ae1345437b8a508
 SHA1 (patch-lib_multi.c) = 5e2b700175d1724c4c4fe3fbc6dc07d197df8170
+SHA1 (patch-lib_sha256.c) = 225d0cb05ae8db997eac11248f91f5a4cd90cbd7
+SHA1 (patch-lib_vtls_gtls.c) = ff2c9e48b8203e7a023245341c1d0936f20cd9db

Index: pkgsrc/www/libcurl-gnutls/Makefile
diff -u pkgsrc/www/libcurl-gnutls/Makefile:1.25 pkgsrc/www/libcurl-gnutls/Makefile:1.26
--- pkgsrc/www/libcurl-gnutls/Makefile:1.25     Fri May 15 12:37:11 2026
+++ pkgsrc/www/libcurl-gnutls/Makefile  Sun Jun  7 18:03:46 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.25 2026/05/15 12:37:11 kikadf Exp $
+# $NetBSD: Makefile,v 1.26 2026/06/07 18:03:46 adam Exp $
 
-PKGREVISION= 2
+PKGREVISION= 3
 .include "../../www/curl/Makefile.common"
 
 PKGNAME=       ${DISTNAME:S/curl/libcurl-gnutls/}
@@ -14,14 +14,23 @@ INSTALLATION_DIRS+= lib
 .include "options.mk"
 
 do-install:
-       cd ${WRKSRC} && \
-               ${PREFIX}/bin/patchelf \
+.if ${OPSYS} == "Darwin"
+       install_name_tool -id ${PREFIX}/lib/libcurl-gnutls.4.dylib \
+               ${WRKSRC}/lib/.libs/libcurl.4.dylib
+       ${INSTALL} ${WRKSRC}/lib/.libs/libcurl.4.dylib \
+               ${DESTDIR}${PREFIX}/lib/libcurl-gnutls.4.dylib
+       cd ${DESTDIR}${PREFIX}/lib && \
+               ${LN} -s libcurl-gnutls.4.dylib libcurl-gnutls.dylib
+.else
+       cd ${WRKSRC} && ${PREFIX}/bin/patchelf \
                --set-soname 'libcurl-gnutls.so.4' \
                lib/.libs/libcurl.so.4.*
-       ${INSTALL} ${WRKSRC}/lib/.libs/libcurl.so.4.8.0 ${DESTDIR}${PREFIX}/lib/libcurl-gnutls.so.4.8.0
+       ${INSTALL} ${WRKSRC}/lib/.libs/libcurl.so.4.8.0 \
+               ${DESTDIR}${PREFIX}/lib/libcurl-gnutls.so.4.8.0
        cd ${DESTDIR}${PREFIX}/lib && \
                ${LN} -s libcurl-gnutls.so.4.8.0 libcurl-gnutls.so && \
                ${LN} -s libcurl-gnutls.so.4.8.0 libcurl-gnutls.so.4
+.endif
 
 .include "../../security/gnutls/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Added files:

Index: pkgsrc/www/curl/patches/patch-configure
diff -u /dev/null pkgsrc/www/curl/patches/patch-configure:1.24
--- /dev/null   Sun Jun  7 18:03:46 2026
+++ pkgsrc/www/curl/patches/patch-configure     Sun Jun  7 18:03:46 2026
@@ -0,0 +1,101 @@
+$NetBSD: patch-configure,v 1.24 2026/06/07 18:03:46 adam Exp $
+
+Allow building with nettle 4.0
+https://github.com/curl/curl/pull/21169
+
+--- configure.orig     2026-06-07 17:51:21.890135783 +0000
++++ configure
+@@ -28492,9 +28492,9 @@ fi
+ 
+ if test "$GNUTLS_ENABLED" = "1"; then
+   USE_GNUTLS_NETTLE=
+-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lgnutls" >&5
+-printf %s "checking for nettle_MD5Init in -lgnutls... " >&6; }
+-if test ${ac_cv_lib_gnutls_nettle_MD5Init+y}
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_md5_init in -lgnutls" >&5
++printf %s "checking for nettle_md5_init in -lgnutls... " >&6; }
++if test ${ac_cv_lib_gnutls_nettle_md5_init+y}
+ then :
+   printf %s "(cached) " >&6
+ else $as_nop
+@@ -28507,26 +28507,26 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char nettle_MD5Init ();
++char nettle_md5_init ();
+ int main(void)
+ {
+-return nettle_MD5Init ();
++return nettle_md5_init ();
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"
+ then :
+-  ac_cv_lib_gnutls_nettle_MD5Init=yes
++  ac_cv_lib_gnutls_nettle_md5_init=yes
+ else $as_nop
+-  ac_cv_lib_gnutls_nettle_MD5Init=no
++  ac_cv_lib_gnutls_nettle_md5_init=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
+     conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_nettle_MD5Init" >&5
+-printf "%s\n" "$ac_cv_lib_gnutls_nettle_MD5Init" >&6; }
+-if test "x$ac_cv_lib_gnutls_nettle_MD5Init" = xyes
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_nettle_md5_init" >&5
++printf "%s\n" "$ac_cv_lib_gnutls_nettle_md5_init" >&6; }
++if test "x$ac_cv_lib_gnutls_nettle_md5_init" = xyes
+ then :
+    USE_GNUTLS_NETTLE=1
+ fi
+@@ -28792,9 +28792,9 @@ ${trc}
+           CPPFLAGS="$CPPFLAGS $addcflags"
+         fi
+ 
+-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lnettle" >&5
+-printf %s "checking for nettle_MD5Init in -lnettle... " >&6; }
+-if test ${ac_cv_lib_nettle_nettle_MD5Init+y}
++        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_md5_init in -lnettle" >&5
++printf %s "checking for nettle_md5_init in -lnettle... " >&6; }
++if test ${ac_cv_lib_nettle_nettle_md5_init+y}
+ then :
+   printf %s "(cached) " >&6
+ else $as_nop
+@@ -28807,26 +28807,26 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char nettle_MD5Init ();
++char nettle_md5_init ();
+ int main(void)
+ {
+-return nettle_MD5Init ();
++return nettle_md5_init ();
+   return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"
+ then :
+-  ac_cv_lib_nettle_nettle_MD5Init=yes
++  ac_cv_lib_nettle_nettle_md5_init=yes
+ else $as_nop
+-  ac_cv_lib_nettle_nettle_MD5Init=no
++  ac_cv_lib_nettle_nettle_md5_init=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
+     conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_MD5Init" >&5
+-printf "%s\n" "$ac_cv_lib_nettle_nettle_MD5Init" >&6; }
+-if test "x$ac_cv_lib_nettle_nettle_MD5Init" = xyes
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_md5_init" >&5
++printf "%s\n" "$ac_cv_lib_nettle_nettle_md5_init" >&6; }
++if test "x$ac_cv_lib_nettle_nettle_md5_init" = xyes
+ then :
+ 
+           USE_GNUTLS_NETTLE=1

Index: pkgsrc/www/curl/patches/patch-lib_curl__sha512__256.c
diff -u /dev/null pkgsrc/www/curl/patches/patch-lib_curl__sha512__256.c:1.1
--- /dev/null   Sun Jun  7 18:03:46 2026
+++ pkgsrc/www/curl/patches/patch-lib_curl__sha512__256.c       Sun Jun  7 18:03:46 2026
@@ -0,0 +1,30 @@
+$NetBSD: patch-lib_curl__sha512__256.c,v 1.1 2026/06/07 18:03:46 adam Exp $
+
+Allow building with nettle 4.0
+https://github.com/curl/curl/pull/21169
+
+--- lib/curl_sha512_256.c.orig 2026-04-29 05:45:57.000000000 +0000
++++ lib/curl_sha512_256.c
+@@ -75,7 +75,8 @@
+ #endif
+ 
+ #if !defined(HAS_SHA512_256_IMPLEMENTATION) && defined(USE_GNUTLS)
+-#  include <nettle/sha.h>
++#  include <nettle/sha2.h>
++#  include <nettle/version.h>
+ #  ifdef SHA512_256_DIGEST_SIZE
+ #    define USE_GNUTLS_SHA512_256           1
+ #  endif
+@@ -281,8 +282,12 @@ static CURLcode Curl_sha512_256_finish(u
+ {
+   Curl_sha512_256_ctx * const ctx = (Curl_sha512_256_ctx *)context;
+ 
++#if NETTLE_VERSION_MAJOR >= 4
++  sha512_256_digest(ctx, (uint8_t *)digest);
++#else
+   sha512_256_digest(ctx,
+                     (size_t)CURL_SHA512_256_DIGEST_SIZE, (uint8_t *)digest);
++#endif
+ 
+   return CURLE_OK;
+ }
Index: pkgsrc/www/curl/patches/patch-lib_md5.c
diff -u /dev/null pkgsrc/www/curl/patches/patch-lib_md5.c:1.1
--- /dev/null   Sun Jun  7 18:03:46 2026
+++ pkgsrc/www/curl/patches/patch-lib_md5.c     Sun Jun  7 18:03:46 2026
@@ -0,0 +1,27 @@
+$NetBSD: patch-lib_md5.c,v 1.1 2026/06/07 18:03:46 adam Exp $
+
+Allow building with nettle 4.0
+https://github.com/curl/curl/pull/21169
+
+--- lib/md5.c.orig     2026-04-29 05:45:57.000000000 +0000
++++ lib/md5.c
+@@ -47,6 +47,7 @@
+ 
+ #ifdef USE_GNUTLS
+ #include <nettle/md5.h>
++#include <nettle/version.h>
+ 
+ typedef struct md5_ctx my_md5_ctx;
+ 
+@@ -64,7 +65,11 @@ static void my_md5_update(void *ctx,
+ 
+ static void my_md5_final(unsigned char *digest, void *ctx)
+ {
++#if NETTLE_VERSION_MAJOR >= 4
++  md5_digest(ctx, digest);
++#else
+   md5_digest(ctx, 16, digest);
++#endif
+ }
+ 
+ #elif defined(USE_OPENSSL) && \
Index: pkgsrc/www/curl/patches/patch-lib_sha256.c
diff -u /dev/null pkgsrc/www/curl/patches/patch-lib_sha256.c:1.1
--- /dev/null   Sun Jun  7 18:03:46 2026
+++ pkgsrc/www/curl/patches/patch-lib_sha256.c  Sun Jun  7 18:03:46 2026
@@ -0,0 +1,29 @@
+$NetBSD: patch-lib_sha256.c,v 1.1 2026/06/07 18:03:46 adam Exp $
+
+Allow building with nettle 4.0
+https://github.com/curl/curl/pull/21169
+
+--- lib/sha256.c.orig  2026-04-29 05:45:57.000000000 +0000
++++ lib/sha256.c
+@@ -113,7 +113,8 @@ static void my_sha256_final(unsigned cha
+ }
+ 
+ #elif defined(USE_GNUTLS)
+-#include <nettle/sha.h>
++#include <nettle/sha2.h>
++#include <nettle/version.h>
+ 
+ typedef struct sha256_ctx my_sha256_ctx;
+ 
+@@ -132,7 +133,11 @@ static void my_sha256_update(void *ctx,
+ 
+ static void my_sha256_final(unsigned char *digest, void *ctx)
+ {
++#if NETTLE_VERSION_MAJOR >= 4
++  sha256_digest(ctx, digest);
++#else
+   sha256_digest(ctx, SHA256_DIGEST_SIZE, digest);
++#endif
+ }
+ 
+ #elif defined(USE_MBEDTLS) && \
Index: pkgsrc/www/curl/patches/patch-lib_vtls_gtls.c
diff -u /dev/null pkgsrc/www/curl/patches/patch-lib_vtls_gtls.c:1.1
--- /dev/null   Sun Jun  7 18:03:46 2026
+++ pkgsrc/www/curl/patches/patch-lib_vtls_gtls.c       Sun Jun  7 18:03:46 2026
@@ -0,0 +1,27 @@
+$NetBSD: patch-lib_vtls_gtls.c,v 1.1 2026/06/07 18:03:46 adam Exp $
+
+Allow building with nettle 4.0
+https://github.com/curl/curl/pull/21169
+
+--- lib/vtls/gtls.c.orig       2026-04-29 05:45:57.000000000 +0000
++++ lib/vtls/gtls.c
+@@ -37,6 +37,7 @@
+ #include <gnutls/x509.h>
+ #include <gnutls/crypto.h>
+ #include <nettle/sha2.h>
++#include <nettle/version.h>
+ 
+ #include "urldata.h"
+ #include "curl_trc.h"
+@@ -2261,7 +2262,11 @@ static CURLcode gtls_sha256sum(const uns
+   struct sha256_ctx SHA256pw;
+   sha256_init(&SHA256pw);
+   sha256_update(&SHA256pw, (unsigned int)tmplen, tmp);
++#if NETTLE_VERSION_MAJOR >= 4
++  sha256_digest(&SHA256pw, sha256sum);
++#else
+   sha256_digest(&SHA256pw, (unsigned int)sha256len, sha256sum);
++#endif
+   return CURLE_OK;
+ }
+ 



Home | Main Index | Thread Index | Old Index