summaryrefslogtreecommitdiff
path: root/package/libesmtp/patches/patch-meson_build
diff options
context:
space:
mode:
Diffstat (limited to 'package/libesmtp/patches/patch-meson_build')
-rw-r--r--package/libesmtp/patches/patch-meson_build42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/libesmtp/patches/patch-meson_build b/package/libesmtp/patches/patch-meson_build
new file mode 100644
index 000000000..461311751
--- /dev/null
+++ b/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()})
++