1 |
# New ports collection makefile for: alpine |
2 |
# Date created: December 21, 2007 |
3 |
# Whom: Lucas Holt <luke@midnightbsd.org> |
4 |
# |
5 |
# $MidnightBSD$ |
6 |
# |
7 |
|
8 |
PORTNAME?= alpine |
9 |
PORTVERSION= 2.20 |
10 |
PORTREVISION?= 2 |
11 |
CATEGORIES?= mail news ipv6 |
12 |
MASTER_SITES= http://patches.freeiz.com/alpine/release/src/ |
13 |
DIST_SUBDIR= alpine-${PORTVERSION} |
14 |
|
15 |
MAINTAINER= ports@MidnightBSD.org |
16 |
COMMENT= Mail and news client descended from Pine |
17 |
|
18 |
LICENSE= apache2 |
19 |
|
20 |
OPTIONS_DEFINE= DOCS SSL THREADS MOUSE NLS ISPELL NOSPELL |
21 |
OPTIONS_DEFAULT+= DOCS SSL THREADS MOUSE |
22 |
SSL_DESC= Build with SSL (installs: security/openssl if pre 10.x) |
23 |
MOUSE_DESC= Enable mouse support for xterm |
24 |
ISPELL_DESC= Use ispell instead of aspell as default speller |
25 |
NOSPELL_DESC= Use no default speller (overrides both) |
26 |
|
27 |
.if !defined(PICO_ALPINE_SLAVE) |
28 |
|
29 |
OPTIONS_DEFINE+= PICO IPV6 LDAP PASSFILE CONS25 MAILDIR SSL |
30 |
OPTIONS_DEFAULT+= PICO SSL |
31 |
PICO_DESC= Build and install pico, the default editor |
32 |
PASSFILE_DESC= Support for a stored password file (DANGEROUS) |
33 |
CONS25_DESC= Add a patch to support color for default console |
34 |
MAILDIR_DESC= Add a patch for maildir support |
35 |
.endif |
36 |
|
37 |
USES= libtool ncurses tar:xz |
38 |
|
39 |
MAKE_JOBS_UNSAFE= yes |
40 |
|
41 |
GNU_CONFIGURE= yes |
42 |
|
43 |
THREADS_CONFIGURE_WITH= pthread |
44 |
MOUSE_CONFIGURE_ENABLE= mouse |
45 |
NLS_CONFIGURE_ENABLE= nls |
46 |
IPV6_CONFIGURE_WITH= ipv6 |
47 |
SSL_USES= ssl |
48 |
|
49 |
.if !defined(PICO_ALPINE_SLAVE) |
50 |
|
51 |
PORTDOCSbase= LICENSE NOTICE README |
52 |
PORTDOCSdoc= brochure.txt |
53 |
PORTDOCShtml= tech-notes/background.html tech-notes/cmd-line.html \ |
54 |
tech-notes/config-notes.html tech-notes/config.html \ |
55 |
tech-notes/index.html tech-notes/installation.html \ |
56 |
tech-notes/introduction.html tech-notes/low-level.html \ |
57 |
tech-notes/tech-notes.txt |
58 |
PORTDOCS= ${PORTDOCSbase} ${PORTDOCSdoc} ${PORTDOCShtml} |
59 |
|
60 |
CONFIGURE_ARGS+=--with-system-pinerc=${PREFIX}/etc/alpine.conf \ |
61 |
--with-system-fixed-pinerc=${PREFIX}/etc/alpine.conf.fixed \ |
62 |
--with-password-prog=/usr/bin/passwd \ |
63 |
--with-system-mail-directory=/var/mail |
64 |
|
65 |
.endif |
66 |
CONFIGURE_ARGS+=--with-debug-level=2 \ |
67 |
--enable-background-post --without-krb5 --without-tcl |
68 |
|
69 |
MAKE_ARGS+= CC="${CC}" CXX="${CXX}" GCCCFLAGS="${CFLAGS}" |
70 |
|
71 |
.include <bsd.mport.options.mk> |
72 |
|
73 |
.if ${PORT_OPTIONS:MSSL} |
74 |
CONFIGURE_ARGS+= --with-ssl-dir=${OPENSSLDIR} \ |
75 |
--with-ssl-include-dir=${OPENSSLINC} \ |
76 |
--with-ssl-lib-dir=${OPENSSLLIB} \ |
77 |
--with-ssl-certs-dir=${OPENSSLDIR}/certs |
78 |
.else |
79 |
CONFIGURE_ARGS+= --without-ssl |
80 |
.endif |
81 |
|
82 |
.include <bsd.port.pre.mk> |
83 |
|
84 |
.if ! ${PORT_OPTIONS:MNOSPELL} |
85 |
.if ! ${PORT_OPTIONS:MISPELL} |
86 |
CONFIGURE_ARGS+=--with-interactive-spellcheck=${LOCALBASE}/bin/aspell |
87 |
BUILD_DEPENDS+= aspell:textproc/aspell |
88 |
RUN_DEPENDS+= aspell:textproc/aspell |
89 |
.else |
90 |
CONFIGURE_ARGS+= --with-interactive-spellcheck=${LOCALBASE}/bin/ispell |
91 |
BUILD_DEPENDS+= ispell:textproc/aspell-ispell |
92 |
RUN_DEPENDS+= ispell:textproc/aspell-ispell |
93 |
.endif |
94 |
.else |
95 |
CONFIGURE_ARGS+=--without-simple-spellcheck --without-interactive-spellcheck |
96 |
.endif |
97 |
|
98 |
.if !defined(PICO_ALPINE_SLAVE) |
99 |
.if ${PORT_OPTIONS:MPICO} |
100 |
RUN_DEPENDS+= pico:editors/pico-alpine |
101 |
.endif |
102 |
|
103 |
.if ${PORT_OPTIONS:MLDAP} |
104 |
USE_OPENLDAP= yes |
105 |
CONFIGURE_ARGS+= --with-ldap-dir=${LOCALBASE} |
106 |
.else |
107 |
CONFIGURE_ARGS+= --without-ldap |
108 |
.endif |
109 |
|
110 |
.if ${PORT_OPTIONS:MPASSFILE} |
111 |
ALPINE_PASSFILE?= .alpine.pwd |
112 |
CONFIGURE_ARGS+= --with-passfile=.alpine.pwd |
113 |
.endif |
114 |
|
115 |
.if ${PORT_OPTIONS:MMAILDIR} |
116 |
PATCH_SITES= http://patches.freeiz.com/alpine/patches/alpine-${PORTVERSION}/ |
117 |
PATCHFILES+= maildir.patch.gz:-p1 |
118 |
.endif |
119 |
|
120 |
.if ${PORT_OPTIONS:MCONS25} |
121 |
EXTRA_PATCHES= ${FILESDIR}/cons25-alpine_keymenu.c |
122 |
.endif |
123 |
|
124 |
post-patch: |
125 |
@${CP} ${WRKSRC}/imap/Makefile ${WRKSRC}/imap/Makefile.presed |
126 |
@${SED} -e "s#^\(all:.*\) bundled\$$#\1#" \ |
127 |
${WRKSRC}/imap/Makefile.presed > ${WRKSRC}/imap/Makefile |
128 |
@${CP} ${WRKSRC}/pico/Makefile.in ${WRKSRC}/pico/Makefile.in.presed |
129 |
@${SED} -e "s#^bin_PROGRAMS = pico.*#bin_PROGRAMS =#" \ |
130 |
-e "s#\$$(pico_SOURCES) \$$(pilot_SOURCES)##" \ |
131 |
${WRKSRC}/pico/Makefile.in.presed > ${WRKSRC}/pico/Makefile.in |
132 |
@${CP} ${WRKSRC}/Makefile.in ${WRKSRC}/Makefile.in.presed |
133 |
@${SED} -e "s#doc/pico.1 doc/pilot.1 ##" \ |
134 |
${WRKSRC}/Makefile.in.presed > ${WRKSRC}/Makefile.in |
135 |
@${CP} ${WRKSRC}/imap/src/osdep/unix/Makefile \ |
136 |
${WRKSRC}/imap/src/osdep/unix/Makefile.presed |
137 |
@${SED} -e "s#^LOCKPGM=.*#LOCKPGM= ${PREFIX}/libexec/mlock#" \ |
138 |
${WRKSRC}/imap/src/osdep/unix/Makefile.presed \ |
139 |
> ${WRKSRC}/imap/src/osdep/unix/Makefile |
140 |
@for i in ${WRKSRC}/README ${WRKSRC}/doc/alpine.1 \ |
141 |
${WRKSRC}/doc/*.txt \ |
142 |
${WRKSRC}/doc/tech-notes/*.txt \ |
143 |
${WRKSRC}/doc/tech-notes/*.html \ |
144 |
${WRKSRC}/pith/pine.hlp ; do \ |
145 |
${CP} $$i $$i.presed ; \ |
146 |
${SED} -e "s:/usr/local/lib/:${PREFIX}/etc/:g" \ |
147 |
-e "s:/usr/local/pine.conf:${PREFIX}/etc/pine.conf:g" \ |
148 |
-e "s:pine\.conf:alpine.conf:g" \ |
149 |
-e "s:/usr/local:${PREFIX}:g" \ |
150 |
-e "s:@@PREFIX@@:${PREFIX}:g" \ |
151 |
$$i.presed > $$i ; \ |
152 |
done |
153 |
|
154 |
post-install: |
155 |
${STAGEDIR}${PREFIX}/bin/alpine -conf > ${STAGEDIR}${PREFIX}/etc/alpine.conf.sample |
156 |
.if ${PORT_OPTIONS:MDOCS} |
157 |
${INSTALL} -d ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${DOCSDIR}/tech-notes |
158 |
.for f in ${PORTDOCSbase} |
159 |
${INSTALL_MAN} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR} |
160 |
.endfor |
161 |
.for f in ${PORTDOCSdoc} |
162 |
${INSTALL_MAN} ${WRKSRC}/doc/$f ${STAGEDIR}${DOCSDIR} |
163 |
.endfor |
164 |
.for f in ${PORTDOCShtml} |
165 |
${INSTALL_MAN} ${WRKSRC}/doc/$f ${STAGEDIR}${DOCSDIR}/tech-notes |
166 |
.endfor |
167 |
.endif |
168 |
|
169 |
# PKG_PREFIX=${STAGEDIR}${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
170 |
# @${CAT} ${PKGMESSAGE} |
171 |
|
172 |
.endif # !defined(PICO_ALPINE_SLAVE) |
173 |
|
174 |
.include <bsd.port.post.mk> |