aboutsummaryrefslogtreecommitdiffstats
path: root/mail/neomutt/Makefile
blob: cdbb67e78809ee16580df4a486f7559b92fedfea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# $FreeBSD$

PORTNAME=   neomutt
PORTVERSION=    20180223
DISTVERSIONPREFIX=  ${PORTNAME}-
CATEGORIES= mail

MAINTAINER= bapt@FreeBSD.org
COMMENT=    Bringing together all the Mutt Code

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/LICENSE.md

RUN_DEPENDS=    ${LOCALBASE}/etc/mime.types:misc/mime-support \
        urlview:textproc/urlview

USES=       iconv:translit localbase perl5 shebangfix ssl

USE_GITHUB= yes
USE_PERL5=  build

HAS_CONFIGURE=  yes

OPTIONS_SUB=    yes
SHEBANG_FILES=  contrib/smime_keys

OPTIONS_DEFINE= NLS DOCS SASL IDN FLOCK GPGME NOTMUCH
OPTIONS_DEFAULT=SASL TOKYOCABINET NOTMUCH GPGME LMDB NCURSES
OPTIONS_MULTI=  HCACHE
OPTIONS_MULTI_HCACHE=   BDB GDBM KYOTOCABINET LMDB QDBM TOKYOCABINET
OPTIONS_SINGLE= SCREEN
OPTIONS_SINGLE_SCREEN=  NCURSES SLANG

FLOCK_DESC= Use flock() to lock files
GPGME_DESC= Use gpgme to handle pgp
NOTMUCH_DESC=   Use notmuch for tagging and searching
HCACHE_DESC=    Header-cache backend
KYOTOCABINET_DESC=  Kyoto Cabinet support
LMDB_DESC=      Lightning Memory-Mapped Database support
QDBM_DESC=      Quick DataBase Manager support
TOKYOCABINET_DESC=  Tokyo Cabinet support
SCREEN_DESC=    Screen options

CONFIGURE_ARGS= --with-ssl="${OPENSSLBASE}" \
        --disable-fcntl \
        --locales-fix \
        --mandir=${PREFIX}/man \
        ${ICONV_CONFIGURE_ARGS}

# Header cache
BDB_CONFIGURE_ON=       --bdb
BDB_USES=           bdb
GDBM_CONFIGURE_ON=      --gdbm
GDBM_LIB_DEPENDS=       libgdbm.so:databases/gdbm
KYOTOCABINET_CONFIGURE_ON=  --kyotocabinet
KYOTOCABINET_LIB_DEPENDS=   libkyotocabinet.so:databases/kyotocabinet
LMDB_CONFIGURE_ON=      --lmdb
LMDB_LIB_DEPENDS=       liblmdb.so:databases/lmdb
QDBM_CONFIGURE_ON=      --qdbm
QDBM_LIB_DEPENDS=       libqdbm.so:databases/qdbm
TOKYOCABINET_CONFIGURE_ON=  --tokyocabinet
TOKYOCABINET_LIB_DEPENDS=   libtokyocabinet.so:databases/tokyocabinet

NLS_CONFIGURE_ENABLE=   nls
NLS_USES=       gettext
NLS_USES_OFF=       gettext-runtime:build gettext-tools:build

IDN_LIB_DEPENDS=    libidn.so:dns/libidn
IDN_CONFIGURE_ENABLE=   idn

FLOCK_CONFIGURE_ENABLE= flock

SASL_LIB_DEPENDS=   libsasl2.so:security/cyrus-sasl2
SASL_CONFIGURE_ON=  --sasl

GPGME_LIB_DEPENDS=  libgpgme.so:security/gpgme \
            libassuan.so:security/libassuan \
            libgpg-error.so:security/libgpg-error
GPGME_CONFIGURE_ENABLE= gpgme

NOTMUCH_LIB_DEPENDS=    libnotmuch.so:mail/notmuch
NOTMUCH_CONFIGURE_ENABLE=   notmuch

SLANG_CONFIGURE_ON= --with-slang=${LOCALBASE} --with-ui=slang
SLANG_CONFIGURE_OFF=    --with-ui=ncurses
SLANG_LIB_DEPENDS=  libslang.so:devel/libslang2
SLANG_VARS= PKGMESSAGE=${FILESDIR}/pkg-message.slang

NCURSES_USES=   ncurses

DOCS_BUILD_DEPENDS= xsltproc:textproc/libxslt \
            ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
            lynx:www/lynx

.include <bsd.port.options.mk>

# Trick neomutt into building manpages and neomuttrc
.if empty(PORT_OPTIONS:MDOCS)
BINARY_ALIAS=   xsltproc=true
.endif

post-install:
    ${RM} ${STAGEDIR}${PREFIX}/etc/mime*
    ${MV} ${STAGEDIR}${PREFIX}/etc/neomuttrc ${STAGEDIR}${PREFIX}/etc/neomuttrc.dist
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/neomutt \
        ${STAGEDIR}${PREFIX}/libexec/neomutt/pgpring \
        ${STAGEDIR}${PREFIX}/libexec/neomutt/pgpewrap

.include <bsd.port.mk>