فهرست منبع

libesmtp: update to 1.1.0

Waldemar Brodkorb 1 سال پیش
والد
کامیت
a4b64eb551

+ 18 - 20
package/libesmtp/Makefile

@@ -4,40 +4,38 @@
 include $(ADK_TOPDIR)/rules.mk
 
 PKG_NAME:=		libesmtp
-PKG_VERSION:=		1.0.6
-PKG_RELEASE:=		2
-PKG_HASH:=		d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b
+PKG_VERSION:=		1.1.0
+PKG_RELEASE:=		1
+PKG_HASH:=		32bc3614ca12d21c7d933f32d43410e8744b6f91fdca7732da9877a385e4e6c3
 PKG_DESCR:=		implements the client side of the smtp protocol
 PKG_SECTION:=		libs/net
-PKG_URL:=		http://www.stafford.uklinux.net/libesmtp/
-PKG_SITES:=		http://www.stafford.uklinux.net/libesmtp/
+PKG_URL:=		https://libesmtp.github.io/index.html
+PKG_SITES:=		https://github.com/libesmtp/libESMTP/archive/refs/tags/
 PKG_OPTS:=		dev
 
-DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+DISTFILES:=             v${PKG_VERSION}.tar.gz
+WRKDIST=		$(WRKDIR)/libESMTP-$(PKG_VERSION)
 
-PKG_CHOICES_LIBESMTP:=	WITH_LIBRESSL WITHOUT_SSL
-PKGCD_WITH_LIBRESSL:=	use libressl for crypto
-PKGCB_WITH_LIBRESSL:=	libressl
-PKGCS_WITH_LIBRESSL:=	libressl
+PKG_CHOICES_LIBESMTP:=	WITH_OPENSSL WITHOUT_SSL
+PKGCD_WITH_OPENSSL:=	use openssl for crypto
+PKGCB_WITH_OPENSSL:=	openssl
+PKGCS_WITH_OPENSSL:=	libopenssl
 PKGCD_WITHOUT_SSL:=	use no ssl
 
 include $(ADK_TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,LIBESMTP,libesmtp,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-AUTOTOOL_STYLE:=	autoreconf
+WRKBUILD=               $(WRKDIR)/$(PKG_NAME)-obj
 
-ifeq (${ADK_PACKAGE_LIBESMTP_WITH_LIBRESSL},y)
-CONFIGURE_ARGS+=	--with-openssl
-endif
-ifeq (${ADK_PACKAGE_LIBESMTP_WITHOUT_SSL},y)
-CONFIGURE_ARGS+=	--without-openssl
-endif
+CONFIG_STYLE:=		meson
+BUILD_STYLE:=		meson
+INSTALL_STYLE:=		meson
 
 libesmtp-install:
-	$(INSTALL_DIR) $(IDIR_LIBESMTP)/usr/lib/esmtp-plugins
+	$(INSTALL_DIR) $(IDIR_LIBESMTP)/usr/lib/esmtp-plugins-6.2.0
 	$(CP) $(WRKINST)/usr/lib/libesmtp.so* $(IDIR_LIBESMTP)/usr/lib/
-	$(CP) $(WRKINST)/usr/lib/esmtp-plugins/*.so \
-		$(IDIR_LIBESMTP)/usr/lib/esmtp-plugins/
+	$(CP) $(WRKINST)/usr/lib/esmtp-plugins-6.2.0/*.so \
+		$(IDIR_LIBESMTP)/usr/lib/esmtp-plugins-6.2.0/
 
 include ${ADK_TOPDIR}/mk/pkg-bottom.mk

+ 0 - 12
package/libesmtp/patches/patch-Makefile_am

@@ -1,12 +0,0 @@
-	prevent doubly passing our CFLAGS
---- libesmtp-1.0.6.orig/Makefile.am	2010-08-09 22:25:24.000000000 +0200
-+++ libesmtp-1.0.6/Makefile.am	2014-06-05 22:29:30.049704289 +0200
-@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = gnu dist-bzip2
- INCLUDES = -I$(srcdir) $(VERSION_FLAGS)
- SUBDIRS = @subdirs@ @SASL_PLUGINS@
- DIST_SUBDIRS = @subdirs@ @DIST_PLUGINS@
--AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
-+AM_CFLAGS = @EXTRA_CFLAGS@
- ACLOCAL_AMFLAGS = -I m4
- 
- lib_LTLIBRARIES = libesmtp.la

+ 0 - 12
package/libesmtp/patches/patch-crammd5_Makefile_am

@@ -1,12 +0,0 @@
-	prevent doubly passing our CFLAGS
---- libesmtp-1.0.6.orig/crammd5/Makefile.am	2010-08-08 17:45:57.000000000 +0200
-+++ libesmtp-1.0.6/crammd5/Makefile.am	2014-06-05 22:29:43.615693205 +0200
-@@ -3,7 +3,7 @@
- libdir = @plugindir@
- 
- INCLUDES = -I@srcdir@
--AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
-+AM_CFLAGS = @EXTRA_CFLAGS@
- 
- lib_LTLIBRARIES = sasl-cram-md5.la
- 

+ 0 - 12
package/libesmtp/patches/patch-login_Makefile_am

@@ -1,12 +0,0 @@
-	prevent doubly passing our CFLAGS
---- libesmtp-1.0.6.orig/login/Makefile.am	2010-08-08 17:45:56.000000000 +0200
-+++ libesmtp-1.0.6/login/Makefile.am	2014-06-05 22:29:47.310690185 +0200
-@@ -5,7 +5,7 @@ libdir = @plugindir@
- INCLUDES = -I@srcdir@
- 
- lib_LTLIBRARIES = sasl-login.la
--AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
-+AM_CFLAGS = @EXTRA_CFLAGS@
- 
- sasl_login_la_SOURCES = client-login.c
- sasl_login_la_LDFLAGS = -module -avoid-version

+ 42 - 0
package/libesmtp/patches/patch-meson_build

@@ -0,0 +1,42 @@
+--- libESMTP-1.1.0.orig/meson.build	2021-06-04 18:18:50.000000000 +0200
++++ libESMTP-1.1.0/meson.build	2024-02-24 14:07:23.535476167 +0100
+@@ -63,6 +63,7 @@ add_project_arguments(cc.get_supported_a
+ ################################################################################
+ dldep = cc.find_library('dl')
+ ssldep = dependency('openssl', version : '>=1.1.0', required : get_option('tls'))
++ntlmdep = dependency('openssl', version : '>=1.1.0', required : get_option('ntlm'))
+ threaddep = dependency('threads', required : get_option('pthreads'))
+ 
+ #XXX add test for libbind9.so
+@@ -71,6 +72,7 @@ lwresdep = cc.find_library('lwres', requ
+ deps = [
+   dldep,
+   ssldep,
++  ntlmdep,
+   threaddep,
+   lwresdep,
+ ]
+@@ -220,8 +222,13 @@ include_dir = include_directories('.')
+ subdir('login')
+ subdir('plain')
+ subdir('crammd5')
+-if ssldep.found()
+-  subdir('ntlm')
++
++if ntlmdep.found()
++  if cc.has_header('openssl/md4.h') and cc.has_function('MD4_Init', dependencies : ntlmdep)
++    subdir('ntlm')
++  else
++    error('MD4 is not supported in current openssl, unable to build NTLM plugin')
++  endif
+ endif
+ 
+ ################################################################################
+@@ -247,4 +254,6 @@ summary({'current:revision:age': libesmt
+ 	 'STARTTLS': ssldep.found(),
+ 	 'CHUNKING': get_option('bdat'),
+ 	 'ETRN': get_option('etrn'),
+-	 'XUSR': get_option('xusr')})
++	 'XUSR': get_option('xusr'),
++	 'NTLM': ntlmdep.found()})
++

+ 7 - 0
package/libesmtp/patches/patch-meson_options_txt

@@ -0,0 +1,7 @@
+--- libESMTP-1.1.0.orig/meson_options.txt	2021-06-04 18:18:50.000000000 +0200
++++ libESMTP-1.1.0/meson_options.txt	2024-02-24 13:55:42.283485679 +0100
+@@ -5,3 +5,4 @@ option('lwres', type : 'feature', value
+ option('bdat', type : 'boolean', value : 'true', description : 'enable SMTP BDAT extension')
+ option('etrn', type : 'boolean', value : 'true', description : 'enable SMTP ETRN extension')
+ option('xusr', type : 'boolean', value : 'true', description : 'enable sendmail XUSR extension')
++option('ntlm', type : 'feature', value : 'disabled', description : 'build with support for NTLM authentication')

+ 0 - 12
package/libesmtp/patches/patch-ntlm_Makefile_am

@@ -1,12 +0,0 @@
-	prevent doubly passing our CFLAGS
---- libesmtp-1.0.6.orig/ntlm/Makefile.am	2010-08-08 17:45:56.000000000 +0200
-+++ libesmtp-1.0.6/ntlm/Makefile.am	2014-06-05 22:29:51.995686387 +0200
-@@ -3,7 +3,7 @@
- libdir = @plugindir@
- 
- INCLUDES = -I@srcdir@
--AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
-+AM_CFLAGS = @EXTRA_CFLAGS@
- 
- lib_LTLIBRARIES = sasl-ntlm.la
- 

+ 11 - 0
package/libesmtp/patches/patch-ntlm_meson_build

@@ -0,0 +1,11 @@
+--- libESMTP-1.1.0.orig/ntlm/meson.build	2021-06-04 18:18:50.000000000 +0200
++++ libESMTP-1.1.0/ntlm/meson.build	2024-02-24 14:03:10.243479603 +0100
+@@ -5,7 +5,7 @@ sasl_ntlm_sources = [
+   'ntlmstruct.c',
+ ]
+ 
+-ntlm_deps = [ ssldep, ]
++ntlm_deps = [ ntlmdep, ]
+ 
+ sasl_ntlm = shared_module('ntlm', sasl_ntlm_sources,
+ 			  name_prefix : 'sasl-',

+ 0 - 12
package/libesmtp/patches/patch-plain_Makefile_am

@@ -1,12 +0,0 @@
-	prevent doubly passing our CFLAGS
---- libesmtp-1.0.6.orig/plain/Makefile.am	2010-08-08 17:45:54.000000000 +0200
-+++ libesmtp-1.0.6/plain/Makefile.am	2014-06-05 22:29:56.668682572 +0200
-@@ -3,7 +3,7 @@
- libdir = @plugindir@
- 
- INCLUDES = -I@srcdir@
--AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
-+AM_CFLAGS = @EXTRA_CFLAGS@
- 
- lib_LTLIBRARIES = sasl-plain.la
-