summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2023-04-11 15:52:23 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2023-04-11 15:53:24 +0000
commitac453ec468ecc9ad9a7f271c535dd485a6e412a4 (patch)
tree0386c003b2c8ba48ff9b1c5774ae39e992c4d03f
parent24e24a19568e8038e3926d7050e1a6052a8b0df5 (diff)
downloadfreebsd-ports-ac453ec468ecc9ad9a7f271c535dd485a6e412a4.zip
mail/neomutt: fix build with tcl85 + shebang files
PR: 270693 Reported by: John Hein <jcfyecrayz@liamekaens.com>
-rw-r--r--mail/neomutt/Makefile9
-rw-r--r--mail/neomutt/files/patch-lmap58
2 files changed, 65 insertions, 2 deletions
diff --git a/mail/neomutt/Makefile b/mail/neomutt/Makefile
index 7758a1fe5579..46b603a052eb 100644
--- a/mail/neomutt/Makefile
+++ b/mail/neomutt/Makefile
@@ -1,5 +1,6 @@
PORTNAME= neomutt
PORTVERSION= 20230322
+PORTREVISION= 1
CATEGORIES= mail
MAINTAINER= bapt@FreeBSD.org
@@ -13,7 +14,7 @@ RUN_DEPENDS= ${LOCALBASE}/etc/mime.types:misc/mime-support \
urlview:textproc/urlview
LIB_DEPENDS= libpcre2-posix.so:devel/pcre2
-USES= cpe iconv:translit localbase ncurses perl5 pkgconfig shebangfix ssl
+USES= cpe iconv:translit localbase ncurses perl5 pkgconfig python:env shebangfix ssl
USE_GITHUB= yes
USE_PERL5= build
@@ -22,7 +23,9 @@ MAKE_JOBS_UNSAFE= yes
HAS_CONFIGURE= yes
OPTIONS_SUB= yes
-SHEBANG_FILES= contrib/smime_keys
+SHEBANG_FILES= contrib/smime_keys \
+ contrib/oauth2/mutt_oauth2.py \
+ data/account-command/macos-keychain/keychain.py
OPTIONS_DEFINE= NLS DOCS SASL IDN FLOCK GPGME NOTMUCH
OPTIONS_DEFAULT=SASL TOKYOCABINET NOTMUCH GPGME LMDB NCURSES GSSAPI_BASE
@@ -46,6 +49,7 @@ CONFIGURE_ARGS= --with-ssl="${OPENSSLBASE}" \
--fmemopen \
--pcre2 \
--disable-idn \
+ --prefix=${PREFIX} \
--mandir=${PREFIX}/man \
${ICONV_CONFIGURE_ARGS}
CONFIGURE_ENV= CC_FOR_BUILD="${CC}"
@@ -90,6 +94,7 @@ GSSAPI_HEIMDAL_USES= gssapi:heimdal
GSSAPI_HEIMDAL_CONFIGURE_ON= --with-gss=${LOCALBASE}
GSSAPI_MIT_USES= gssapi:mit
GSSAPI_MIT_CONFIGURE_ON= --with-gss=${LOCALBASE}
+GSSAPI_NONE_CONFIGURE_ON= --disable-gss
DOCS_CONFIGURE_OFF= --disable-doc
DOCS_BUILD_DEPENDS= xsltproc:textproc/libxslt \
diff --git a/mail/neomutt/files/patch-lmap b/mail/neomutt/files/patch-lmap
new file mode 100644
index 000000000000..728a338f54f0
--- /dev/null
+++ b/mail/neomutt/files/patch-lmap
@@ -0,0 +1,58 @@
+commit 90871d3963ee739c7d52425c77ea4e619b94732c
+Author: Pietro Cerutti (@gahr) <gahr@gahr.ch>
+Date: Tue Apr 11 06:25:27 2023 +0000
+
+ Remove use of lmap in auto.def, provide lkill alternative
+
+diff --git auto.def.orig auto.def
+index 00d8839c9..27419a5d8 100644
+--- auto.def.orig
++++ auto.def
+@@ -288,6 +288,17 @@ if {1} {
+ return 0
+ }
+ }
++
++ # lkill l p is the list of the elements in l that don't match p
++ proc lkill {l p} {
++ set res [list]
++ foreach elem $l {
++ if {![apply $p $elem]} {
++ lappend res $elem
++ }
++ }
++ set res
++ }
+ }
+ ###############################################################################
+
+@@ -1138,9 +1149,7 @@ set conststrings "\
+ unsigned char cc_cflags\[\] = {[text2c [expr {
+ [get-define want-include-path-in-cflags]
+ ? [get-define CFLAGS]
+- : [lmap x [get-define CFLAGS] {
+- expr {[string equal -length 2 $x {-I}] ? [continue] : $x}
+- }]
++ : [lkill [get-define CFLAGS] {{x} {string equal -length 2 $x {-I}}}]
+ }]]};\n\
+ unsigned char configure_options\[\] = {[text2c $conf_options]};\n"
+ if {[catch {set fd [open conststrings.c w]
+@@ -1225,16 +1234,8 @@ make-config-header config.h -auto $auto_rep -bare $bare_rep -str $str_rep
+
+ ###############################################################################
+ # Generate .clang_complete
+-proc cflags-for-clang-complete {} {
+- lmap x [get-define CFLAGS] {
+- if {[string match "-MJ*" $x]} {
+- continue
+- } else {
+- set x
+- }
+- }
+-}
+-define cflags-one-per-line [string map {" " "\n"} [cflags-for-clang-complete]]
++define cflags-one-per-line [string map {" " "\n"} \
++ [lkill [get-define CFLAGS] {{x} {string equal -length 3 $x "-MJ"}}]]
+ make-template .clang_complete.in
+
+ ###############################################################################