6 CATEGORIES?= mail news ipv6
7 MASTER_SITES= http://patches.freeiz.com/alpine/release/src/
8 DIST_SUBDIR= alpine-${PORTVERSION}
10 MAINTAINER= mbeis@xs4all.nl
11 COMMENT?= Mail and news client descended from Pine
15 OPTIONS_DEFINE= DOCS SSL THREADS MOUSE NLS ISPELL NOSPELL
16 OPTIONS_DEFAULT+= DOCS SSL THREADS MOUSE
17 SSL_DESC= Build with SSL (installs: security/openssl if pre 10.x)
18 MOUSE_DESC= Enable mouse support for xterm
19 ISPELL_DESC= Use ispell instead of aspell as default speller
20 NOSPELL_DESC= Use no default speller (overrides both)
22 .if !defined(PICO_ALPINE_SLAVE)
24 OPTIONS_DEFINE+= PICO IPV6 LDAP PASSFILE CONS25 MAILDIR SSL
25 OPTIONS_DEFAULT+= PICO SSL
26 PICO_DESC= Build and install pico, the default editor
27 PASSFILE_DESC= Support for a stored password file (DANGEROUS)
28 CONS25_DESC= Add a patch to support color for default console
29 MAILDIR_DESC= Add a patch for maildir support
32 USES= libtool ncurses tar:xz
38 .if !defined(PICO_ALPINE_SLAVE)
40 PORTDOCSbase= LICENSE NOTICE README
41 PORTDOCSdoc= brochure.txt
42 PORTDOCShtml= tech-notes/background.html tech-notes/cmd-line.html \
43 tech-notes/config-notes.html tech-notes/config.html \
44 tech-notes/index.html tech-notes/installation.html \
45 tech-notes/introduction.html tech-notes/low-level.html \
46 tech-notes/tech-notes.txt
47 PORTDOCS= ${PORTDOCSbase} ${PORTDOCSdoc} ${PORTDOCShtml}
49 CONFIGURE_ARGS+=--with-system-pinerc=${PREFIX}/etc/alpine.conf \
50 --with-system-fixed-pinerc=${PREFIX}/etc/alpine.conf.fixed \
51 --with-password-prog=/usr/bin/passwd \
52 --with-system-mail-directory=/var/mail
55 CONFIGURE_ARGS+=--with-debug-level=2 \
56 --enable-background-post --without-krb5 --without-tcl
58 MAKE_ARGS+= CC="${CC}" CXX="${CXX}" GCCCFLAGS="${CFLAGS}"
60 .include <bsd.port.options.mk>
62 .if ${PORT_OPTIONS:MSSL}
64 .if ${OSVERSION} < 1000000
65 # OpenSSL is pre v1.0 in FBSD9.x so the ports version needs to be used
66 WITH_OPENSSL_PORT= yes
69 CONFIGURE_ARGS+= --with-ssl-dir=${OPENSSLDIR} \
70 --with-ssl-include-dir=${OPENSSLINC} \
71 --with-ssl-lib-dir=${OPENSSLLIB} \
72 --with-ssl-certs-dir=${OPENSSLDIR}/certs
74 CONFIGURE_ARGS+= --without-ssl
78 .include <bsd.port.pre.mk>
80 THREADS_CONFIGURE_WITH= pthread
81 MOUSE_CONFIGURE_ENABLE= mouse
82 NLS_CONFIGURE_ENABLE= nls
83 IPV6_CONFIGURE_WITH= ipv6
85 .if ! ${PORT_OPTIONS:MNOSPELL}
86 .if ! ${PORT_OPTIONS:MISPELL}
87 CONFIGURE_ARGS+=--with-interactive-spellcheck=${LOCALBASE}/bin/aspell
88 BUILD_DEPENDS+= aspell:textproc/aspell
89 RUN_DEPENDS+= aspell:textproc/aspell
91 CONFIGURE_ARGS+= --with-interactive-spellcheck=${LOCALBASE}/bin/ispell
92 BUILD_DEPENDS+= ispell:textproc/aspell-ispell
93 RUN_DEPENDS+= ispell:textproc/aspell-ispell
96 CONFIGURE_ARGS+=--without-simple-spellcheck --without-interactive-spellcheck
99 .if !defined(PICO_ALPINE_SLAVE)
100 .if ${PORT_OPTIONS:MPICO}
101 RUN_DEPENDS+= pico:editors/pico-alpine
104 .if ${PORT_OPTIONS:MLDAP}
106 CONFIGURE_ARGS+= --with-ldap-dir=${LOCALBASE}
108 CONFIGURE_ARGS+= --without-ldap
111 .if ${PORT_OPTIONS:MPASSFILE}
112 ALPINE_PASSFILE?= .alpine.pwd
113 CONFIGURE_ARGS+= --with-passfile=.alpine.pwd
116 .if ${PORT_OPTIONS:MMAILDIR}
117 PATCH_SITES= http://patches.freeiz.com/alpine/patches/alpine-${PORTVERSION}/
118 PATCHFILES+= maildir.patch.gz
119 PATCH_DIST_ARGS+= -E --quiet -d ${PATCH_WRKSRC} -p1
122 .if ${PORT_OPTIONS:MCONS25}
123 EXTRA_PATCHES= ${FILESDIR}/cons25-alpine_keymenu.c
127 @${CHMOD} -R u+w ${WRKSRC}
130 @${CP} ${WRKSRC}/imap/Makefile ${WRKSRC}/imap/Makefile.presed
131 @${SED} -e "s#^\(all:.*\) bundled\$$#\1#" \
132 ${WRKSRC}/imap/Makefile.presed > ${WRKSRC}/imap/Makefile
133 @${CP} ${WRKSRC}/pico/Makefile.in ${WRKSRC}/pico/Makefile.in.presed
134 @${SED} -e "s#^bin_PROGRAMS = pico.*#bin_PROGRAMS =#" \
135 -e "s#\$$(pico_SOURCES) \$$(pilot_SOURCES)##" \
136 ${WRKSRC}/pico/Makefile.in.presed > ${WRKSRC}/pico/Makefile.in
137 @${CP} ${WRKSRC}/Makefile.in ${WRKSRC}/Makefile.in.presed
138 @${SED} -e "s#doc/pico.1 doc/pilot.1 ##" \
139 ${WRKSRC}/Makefile.in.presed > ${WRKSRC}/Makefile.in
140 @${CP} ${WRKSRC}/imap/src/osdep/unix/Makefile \
141 ${WRKSRC}/imap/src/osdep/unix/Makefile.presed
142 @${SED} -e "s#^LOCKPGM=.*#LOCKPGM= ${PREFIX}/libexec/mlock#" \
143 ${WRKSRC}/imap/src/osdep/unix/Makefile.presed \
144 > ${WRKSRC}/imap/src/osdep/unix/Makefile
145 @for i in ${WRKSRC}/README ${WRKSRC}/doc/alpine.1 \
146 ${WRKSRC}/doc/*.txt \
147 ${WRKSRC}/doc/tech-notes/*.txt \
148 ${WRKSRC}/doc/tech-notes/*.html \
149 ${WRKSRC}/pith/pine.hlp ; do \
150 ${CP} $$i $$i.presed ; \
151 ${SED} -e "s:/usr/local/lib/:${PREFIX}/etc/:g" \
152 -e "s:/usr/local/pine.conf:${PREFIX}/etc/pine.conf:g" \
153 -e "s:pine\.conf:alpine.conf:g" \
154 -e "s:/usr/local:${PREFIX}:g" \
155 -e "s:@@PREFIX@@:${PREFIX}:g" \
160 ${STAGEDIR}${PREFIX}/bin/alpine -conf > ${STAGEDIR}${PREFIX}/etc/alpine.conf.sample
161 .if ${PORT_OPTIONS:MDOCS}
162 ${INSTALL} -d ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${DOCSDIR}/tech-notes
163 .for f in ${PORTDOCSbase}
164 ${INSTALL_MAN} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}
166 .for f in ${PORTDOCSdoc}
167 ${INSTALL_MAN} ${WRKSRC}/doc/$f ${STAGEDIR}${DOCSDIR}
169 .for f in ${PORTDOCShtml}
170 ${INSTALL_MAN} ${WRKSRC}/doc/$f ${STAGEDIR}${DOCSDIR}/tech-notes
174 # PKG_PREFIX=${STAGEDIR}${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
175 # @${CAT} ${PKGMESSAGE}
177 .endif # !defined(PICO_ALPINE_SLAVE)
179 .include <bsd.port.post.mk>