git: b63c215e5780 - main - mail/libesmtp: Update to 1.1.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 07 May 2023 16:13:04 UTC
The branch main has been updated by sunpoet:

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

commit b63c215e57802cb23ea8b5f3a691946dd83bc1a2
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-05-07 16:03:14 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-05-07 16:03:14 +0000

    mail/libesmtp: Update to 1.1.0
    
    - Update pkg-descr
    - Take maintainership
    
    Changes:        https://github.com/libesmtp/libESMTP/releases
                    https://libesmtp.github.io/reference/changes-since-v1.0.6.html
---
 mail/libesmtp/Makefile                   | 44 ++++++++------------------------
 mail/libesmtp/distinfo                   |  8 +++---
 mail/libesmtp/files/patch-meson.build    | 18 +++++++++++++
 mail/libesmtp/files/patch-ntlm_ntlmdes.c | 34 ------------------------
 mail/libesmtp/pkg-descr                  | 18 ++++---------
 mail/libesmtp/pkg-plist                  | 27 +++++---------------
 6 files changed, 43 insertions(+), 106 deletions(-)

diff --git a/mail/libesmtp/Makefile b/mail/libesmtp/Makefile
index 6672ee640ca5..73293d117ba1 100644
--- a/mail/libesmtp/Makefile
+++ b/mail/libesmtp/Makefile
@@ -1,47 +1,25 @@
 PORTNAME=	libesmtp
-PORTVERSION=	1.0.6
-PORTREVISION=	2
+PORTVERSION=	1.1.0
+DISTVERSIONPREFIX=	v
 PORTEPOCH=	1
 CATEGORIES=	mail
-MASTER_SITES=	http://www.stafford.uklinux.net/libesmtp/ \
-		http://ftp.osuosl.org/pub/blfs/svn/l/ \
-		GENTOO
 
-PATCH_SITES=	https://gitweb.gentoo.org/repo/gentoo.git/plain/net-libs/libesmtp/files/ \
-		https://raw.githubusercontent.com/gentoo/gentoo/master/net-libs/libesmtp/files/
-PATCHFILES=	libesmtp-1.0.6-openssl-1.1-api-compatibility.patch:-p1
-
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Library for posting electronic mail
 WWW=		http://www.stafford.uklinux.net/libesmtp/
 
 LICENSE=	LGPL21+
-LICENSE_FILE=	${WRKSRC}/COPYING.LIB
-
-USES=		autoreconf cpe gmake libtool tar:bzip2
-GNU_CONFIGURE=	yes
-# require-all-recipients (implied by enable-all) is required for Balsa
-CONFIGURE_ARGS=	--enable-all --disable-isoc
-INSTALL_TARGET=	install-strip
-USE_LDCONFIG=	yes
-CPE_VENDOR=	libesmtp_project
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-OPTIONS_DEFINE=	OPENSSL DEBUG DOCS EXAMPLES
-OPTIONS_DEFAULT=OPENSSL
-OPTIONS_SUB=	yes
+USES=		cpe meson pkgconfig ssl
 
-DEBUG_CONFIGURE_ENABLE=	debug
-OPENSSL_CONFIGURE_WITH=	openssl=${OPENSSLBASE}
-OPENSSL_USES=		ssl
+CFLAGS+=	-D__BSD_VISIBLE
+MESON_ARGS=	--default-library=both -Dbdat=true -Detrn=true -Dlwres=disabled -Dpthreads=enabled -Dtls=enabled -Dxdg=true -Dxusr=true
+USE_LDCONFIG=	yes
 
-post-install-DOCS-on:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-.for f in AUTHORS ChangeLog NEWS Notes README TODO
-	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
-.endfor
+CPE_VENDOR=	libesmtp_project
 
-post-install-EXAMPLES-on:
-	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}
+USE_GITHUB=	yes
+GH_PROJECT=	libESMTP
 
 .include <bsd.port.mk>
diff --git a/mail/libesmtp/distinfo b/mail/libesmtp/distinfo
index 84b139364e8e..3d8d53658700 100644
--- a/mail/libesmtp/distinfo
+++ b/mail/libesmtp/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1281387021
-SHA256 (libesmtp-1.0.6.tar.bz2) = d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b
-SIZE (libesmtp-1.0.6.tar.bz2) = 365506
-SHA256 (libesmtp-1.0.6-openssl-1.1-api-compatibility.patch) = d10161f8b01c7865dcb948f8e65e61b8596752856953a605632d2c09dd41494c
-SIZE (libesmtp-1.0.6-openssl-1.1-api-compatibility.patch) = 2243
+TIMESTAMP = 1683227585
+SHA256 (libesmtp-libESMTP-v1.1.0_GH0.tar.gz) = 32bc3614ca12d21c7d933f32d43410e8744b6f91fdca7732da9877a385e4e6c3
+SIZE (libesmtp-libESMTP-v1.1.0_GH0.tar.gz) = 169134
diff --git a/mail/libesmtp/files/patch-meson.build b/mail/libesmtp/files/patch-meson.build
new file mode 100644
index 000000000000..1b9692e5271f
--- /dev/null
+++ b/mail/libesmtp/files/patch-meson.build
@@ -0,0 +1,18 @@
+--- meson.build.orig	2021-06-04 16:18:50 UTC
++++ meson.build
+@@ -61,7 +61,6 @@ add_project_arguments(cc.get_supported_arguments(cflag
+ ################################################################################
+ # dependencies
+ ################################################################################
+-dldep = cc.find_library('dl')
+ ssldep = dependency('openssl', version : '>=1.1.0', required : get_option('tls'))
+ threaddep = dependency('threads', required : get_option('pthreads'))
+ 
+@@ -69,7 +68,6 @@ threaddep = dependency('threads', required : get_optio
+ lwresdep = cc.find_library('lwres', required : get_option('lwres'))
+ 
+ deps = [
+-  dldep,
+   ssldep,
+   threaddep,
+   lwresdep,
diff --git a/mail/libesmtp/files/patch-ntlm_ntlmdes.c b/mail/libesmtp/files/patch-ntlm_ntlmdes.c
deleted file mode 100644
index 064ce30dff04..000000000000
--- a/mail/libesmtp/files/patch-ntlm_ntlmdes.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- ntlm/ntlmdes.c.orig	2010-08-08 15:45:56 UTC
-+++ ntlm/ntlmdes.c
-@@ -30,10 +30,10 @@
- #include "ntlm.h"
- 
- static void
--lm_deshash (void *result, const_des_cblock *iv, const void *secret)
-+lm_deshash (void *result, const_DES_cblock *iv, const void *secret)
- {
--  des_cblock key;
--  des_key_schedule ks;
-+  DES_cblock key;
-+  DES_key_schedule ks;
-   unsigned char key_56[8];
-   size_t len;
- 
-@@ -85,7 +85,7 @@ lm_uccpy (char *dst, size_t dstlen, cons
- void
- lm_hash_password (unsigned char *hash, const char *pass)
- {
--  static const_des_cblock iv = { 0x4B, 0x47, 0x53, 0x21,
-+  static const_DES_cblock iv = { 0x4B, 0x47, 0x53, 0x21,
-                                  0x40, 0x23, 0x24, 0x25 };
-   char lmpass[14];
- 
-@@ -137,7 +137,7 @@ ntlm_responses (unsigned char *lm_resp, 
- 		const unsigned char *challenge, const char *secret)
- {
-   unsigned char hash[21];
--  des_cblock nonce;
-+  DES_cblock nonce;
- 
-   memcpy (&nonce, challenge, sizeof nonce);
- 
diff --git a/mail/libesmtp/pkg-descr b/mail/libesmtp/pkg-descr
index 1d1305058fc0..8bf8b77261eb 100644
--- a/mail/libesmtp/pkg-descr
+++ b/mail/libesmtp/pkg-descr
@@ -1,14 +1,6 @@
-libESMTP is a library to manage posting (or submission of) electronic
-mail using SMTP to a preconfigured Mail Transport Agent (MTA) such as
-Exim. It may be used as part of a Mail User Agent (MUA) or another
-program that must be able to post electronic mail but where mail
-functionality is not the program's primary purpose. libESMTP is not
-intended to be used as part of a program that implements a Mail
-Transport Agent.
+libESMTP is an SMTP client which manages submission of electronic mail via a
+preconfigured Mail Transport Agent (MTA) such as Exim or Postfix.
 
-libESMTP is an attempt to provide a robust implementation of the SMTP
-protocol for use with mail clients. It is being developed as a reaction
-to the experience of incomplete or buggy implementations of SMTP and
-also to help remove the need for the installation of MTAs on
-workstations which only need them to provide a sendmail command for a
-mail client to post its mail.
+libESMTP relieves the developer of the need to handle the complexity of
+negotiating the SMTP protocol by providing a simple API. Additionally libESMTP
+transparently handles many SMTP extensions including authentication.
diff --git a/mail/libesmtp/pkg-plist b/mail/libesmtp/pkg-plist
index b8530a7e0563..1bb284196aff 100644
--- a/mail/libesmtp/pkg-plist
+++ b/mail/libesmtp/pkg-plist
@@ -1,25 +1,10 @@
-bin/libesmtp-config
 include/auth-client.h
-include/auth-plugin.h
 include/libesmtp.h
-lib/esmtp-plugins/sasl-cram-md5.a
-lib/esmtp-plugins/sasl-cram-md5.so
-lib/esmtp-plugins/sasl-login.a
-lib/esmtp-plugins/sasl-login.so
-%%OPENSSL%%lib/esmtp-plugins/sasl-ntlm.a
-%%OPENSSL%%lib/esmtp-plugins/sasl-ntlm.so
-lib/esmtp-plugins/sasl-plain.a
-lib/esmtp-plugins/sasl-plain.so
+lib/esmtp-plugins-6.2.0/sasl-crammd5.so
+lib/esmtp-plugins-6.2.0/sasl-login.so
+lib/esmtp-plugins-6.2.0/sasl-ntlm.so
+lib/esmtp-plugins-6.2.0/sasl-plain.so
 lib/libesmtp.a
 lib/libesmtp.so
-lib/libesmtp.so.6
-lib/libesmtp.so.6.1.6
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/NEWS
-%%PORTDOCS%%%%DOCSDIR%%/Notes
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/TODO
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mail-file.c
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-mail
+lib/libesmtp.so.6.2.0
+libdata/pkgconfig/libesmtp-1.0.pc