git: 59de7e9e3cea - 2025Q2 - mail/fetchmail: update to 6.5.3

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Wed, 11 Jun 2025 17:59:35 UTC
The branch 2025Q2 has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=59de7e9e3cea14dac0fc336a2c112bff39349ae4

commit 59de7e9e3cea14dac0fc336a2c112bff39349ae4
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2025-06-10 20:21:13 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2025-06-11 17:59:10 +0000

    mail/fetchmail: update to 6.5.3
    
    = BUGFIXES:
    * IMAP: Reinstate workaround for missing IDLE support if --idle is requested.
      This had been a long-standing feature but got broken in fetchmail 6.4.22
      (commit 616e8c70).  Thanks to Lukáš Tesař for the detailed report including
      a Git bisect that identified this faulty commit.  Fixes Gitlab issue #69.
    * IMAP: Only print 'will idle after poll' if --idle is enabled
      and either offered by the server, or forced through --forceidle.
      This fixes a regression introduced in fetchmail 6.4.22 (commit 616e8c70).
    
    = TRANSLATIONS: fetchmail's translation was updated, courtesy of:
    * es:    Cristian Othón Martínez Vera [Spanish]
    
    PR:             287435
    MFH:            2025Q2
    Approved by:    Corey Halpin (maintainer)
    
    (cherry picked from commit fd5d3db1d45fee8a8683ff5bedf12e461d0cb16a)
---
 mail/fetchmail/Makefile                |  2 +-
 mail/fetchmail/distinfo                |  6 +++---
 mail/fetchmail/files/patch-fetchmail.c | 35 ++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index d753b00e7fbc..36ea6a81d133 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -1,5 +1,5 @@
 PORTNAME?=	fetchmail
-DISTVERSION=	6.5.2
+DISTVERSION=	6.5.3
 PORTREVISION?=	0
 CATEGORIES=	mail
 # The next line is inherited by the fetchmailconf dependent port,
diff --git a/mail/fetchmail/distinfo b/mail/fetchmail/distinfo
index fdb02fb9ba75..708675042e97 100644
--- a/mail/fetchmail/distinfo
+++ b/mail/fetchmail/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1735559390
-SHA256 (fetchmail-6.5.2.tar.xz) = 8fd0477408620ae382c1d0ef83d8946a95e5be0c2e582dd4ebe55cba513a45fe
-SIZE (fetchmail-6.5.2.tar.xz) = 1110968
+TIMESTAMP = 1749515671
+SHA256 (fetchmail-6.5.3.tar.xz) = d74e893b78ef29ebef375ab7e726d2977140f8f1208f5905569395cbdae4c23d
+SIZE (fetchmail-6.5.3.tar.xz) = 1114612
diff --git a/mail/fetchmail/files/patch-fetchmail.c b/mail/fetchmail/files/patch-fetchmail.c
new file mode 100644
index 000000000000..9940217f8330
--- /dev/null
+++ b/mail/fetchmail/files/patch-fetchmail.c
@@ -0,0 +1,35 @@
+commit c598c50ffda0dcac38b8bd01350dc6894a8efce4
+Author: Matthias Andree <matthias.andree@gmx.de>
+Date:   Wed Jun 11 01:46:07 2025 +0200
+
+    Fix wolfSSL compilation failure around OPENSSL_DIR.
+    
+    Depending on wolfSSL version and configuration, it exposes a
+    newer OpenSSL 1.1.x API of OpenSSL_version(), which passes its
+    argument -- but that OpenSSL_version() function is documented
+    as having been added in OpenSSL 3.0.  So let's not try using
+    it with OPENSSL_DIR or OPENSSL_ENGINES_DIR arguments unless
+    both OpenSSL >= 3.0 is found and both macros are defined,
+    just in case...
+    
+    Reported by Corey Halpin,
+    see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287435
+
+diff --git a/fetchmail.c b/fetchmail.c
+index 97419f64..3c8e571d 100644
+--- ./fetchmail.c
++++ b/fetchmail.c
+@@ -343,9 +343,13 @@ int main(int argc, char **argv)
+ 		   "Run-time uses SSL library %#lx \"%s\"\n"),
+ 			OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT,
+ 			OpenSSL_version_num(), OpenSSL_version(OPENSSL_VERSION));
++#if OPENSSL_VERSION_NUMBER >= 0x30000000L // OpenSSL_version API in this form added in OpenSSL 3.0 according to manpage
++# if defined(OPENSSL_DIR) && defined(OPENSSL_ENGINES_DIR) // in-depth fix in case some OpenSSL freerider claims 3.x compat without delivering it
+ 	printf(GT_("OpenSSL: %s\nEngines: %s\n"),
+ 			OpenSSL_version(OPENSSL_DIR),
+ 			OpenSSL_version(OPENSSL_ENGINES_DIR));
++# endif
++#endif
+ # if !HAVE_DECL_TLS1_3_VERSION || defined(OPENSSL_NO_TLS1_3)
+ # error Your SSL/TLS library does not support TLS v1.3.
+ # endif