summaryrefslogtreecommitdiff
path: root/mail/mutt/Makefile
blob: 7d34d80aa27d63e27947f45968cb5c5a4a6708dd (plain)
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
# $NetBSD: Makefile,v 1.48 2000/06/09 14:58:30 wiz Exp $

DISTNAME=	mutt-1.2i
CATEGORIES=	mail
MASTER_SITES=	ftp://ftp.mutt.org/pub/mutt/ \
		ftp://ftp.funet.fi/pub/unix/mail/mutt/ \
		ftp://ftp.uib.no/pub/mutt/ \
		ftp://uiarchive.cso.uiuc.edu/pub/packages/mail/mutt/

MAINTAINER=	tron@netbsd.org
HOMEPAGE=	http://www.mutt.org/

BUILD_DEPENDS+=	${LOCALBASE}/bin/autoconf:../../devel/autoconf
BUILD_DEPENDS+=	${LOCALBASE}/bin/automake:../../devel/automake

MIRROR_DISTFILE=no
RESTRICTED=	"Contains PGP and SSL code"

GNU_CONFIGURE=	yes
USE_GMAKE=	yes
CONFIGURE_ARGS+= --with-exec-shell=/bin/ksh \
		 --with-docdir=${PREFIX}/share/doc/mutt \
		 --enable-pop --enable-imap

ALL_TARGET=	keymap_defs.h all
LDFLAGS+=	-s
WRKSRC=		${WRKDIR}/${DISTNAME:S/i//}

.include "../../mk/bsd.prefs.mk"

MUTT_USE_SSL?=	YES

.if defined(MUTT_USE_SSL) && ${MUTT_USE_SSL} == "YES"
USE_SSL=	yes
CONFIGURE_ARGS+= --with-ssl=${SSLBASE}
.else
CONFIGURE_ARGS+= --without-ssl
.endif

BUILD_DEFS+=	MUTT_USE_SSL

.if ${OPSYS} == "SunOS"
PLIST_SUBST+=	LOCALEBASE=lib
.else
PLIST_SUBST+=	LOCALEBASE=share
.endif

.if ${OPSYS} == "NetBSD"
OSVER!=		uname -r
GOOD_CURSES=	1.4[Y-Z] 1.4Z[A-Z] 1.[5-9]*

.for PATTERN in ${GOOD_CURSES}
.if ${OSVER:M${PATTERN}} != ""
CURSES_GOOD?=	# defined
.endif
.endfor

.if defined(CURSES_GOOD)
# hack to allow compilation even if ncurses are installed
pre-configure:
.for FILE in configure configure.in
	cd ${WRKSRC}; ${SED} "s/-lncurses/-lcurses/" < ${FILE} \
		> ${FILE}.patched; ${MV} ${FILE}.patched ${FILE}
.endfor
	${CHMOD} 755 ${WRKSRC}/configure
.else
DEPENDS+=	ncurses>=4.2:../../devel/ncurses
CONFIGURE_ARGS+= --with-curses=${LOCALBASE}
.endif
.endif

.include "../../mk/bsd.pkg.mk"