0
|
1 # Copyright 1999-2007 Gentoo Foundation
|
|
2 # Distributed under the terms of the GNU General Public License v2
|
|
3 # $Header: $
|
|
4
|
|
5 inherit eutils
|
|
6
|
|
7 DESCRIPTION="alternativly licensed pine with full UTF-8 support"
|
|
8 HOMEPAGE="http://www.washington.edu/alpine/
|
|
9 http://staff.washington.edu/chappa/alpine/"
|
|
10 SRC_URI="ftp://ftp.cac.washington.edu/alpine/${P}.tar.bz2
|
|
11 chappa? ( http://staff.washington.edu/chappa/alpine/patches/${P}/all.patch.gz )"
|
|
12
|
|
13 LICENSE="Apache-2.0"
|
|
14 SLOT="0"
|
|
15 KEYWORDS="~x86 ~amd64 ~x86-fbsd"
|
|
16 IUSE="chappa doc kerberos ldap nls spell ssl threads userland_BSD onlyalpine passfile"
|
|
17
|
|
18 DEPEND="virtual/pam
|
|
19 >=sys-libs/ncurses-5.1
|
|
20 ssl? ( dev-libs/openssl )
|
|
21 ldap? ( net-nds/openldap )
|
|
22 kerberos? ( app-crypt/mit-krb5 )
|
|
23 spell? ( app-text/aspell )"
|
|
24 RDEPEND="${DEPEND}
|
|
25 app-misc/mime-types
|
|
26 !onlyalpine? ( !app-editors/pico )
|
|
27 !onlyalpine? ( !mail-client/pine )
|
|
28 !<=net-mail/uw-imap-2004g"
|
|
29
|
|
30 maildir_warn() {
|
|
31 einfo
|
|
32 einfo "This build of alpine has Maildir support built in as"
|
|
33 einfo "part of the chappa-all patch."
|
|
34 einfo
|
|
35 einfo "If you have a maildir at ~/Maildir it will be your"
|
|
36 einfo "default INBOX. The path may be changed with the"
|
|
37 einfo "\"maildir-location\" setting in alpine."
|
|
38 einfo
|
|
39 einfo "To use /var/spool/mail INBOX again, set"
|
|
40 einfo "\"disable-these-drivers=md\" in your .pinerc file."
|
|
41 einfo
|
|
42 einfo "Alternately, you might want to read following webpage, which explains how to"
|
|
43 einfo "use multiple mailboxes simultaneously:"
|
|
44 einfo
|
|
45 einfo "http://www.math.washington.edu/~chappa/pine/pine-info/collections/incoming-folders/"
|
|
46 einfo
|
|
47 }
|
|
48
|
|
49 pkg_setup() {
|
|
50 if use chappa; then
|
|
51 maildir_warn
|
|
52 fi
|
|
53 }
|
|
54
|
|
55 src_unpack() {
|
|
56 unpack ${A}
|
|
57 if use chappa; then
|
|
58 epatch ${WORKDIR}/all.patch
|
|
59 fi
|
|
60 }
|
|
61
|
|
62 src_compile() {
|
|
63 local myconf="--without-tcl --with-system-pinerc=/etc/pine.conf --with-system-fixed-pinerc=/etc/pine.conf.fixed"
|
|
64 if use ssl; then
|
|
65 myconf="${myconf} --with-ssl-certs-dir=/etc/ssl/certs"
|
|
66 else
|
|
67 myconf="${myconf} --without-ssl"
|
|
68 fi
|
|
69 if use ldap; then
|
|
70 myconf="${myconf}"
|
|
71 else
|
|
72 myconf="${myconf} --without-ldap"
|
|
73 fi
|
|
74 if user passfile; then
|
|
75 myconf="${myconf} --with-passfile=.pinepwd"
|
|
76 fi
|
|
77 if use kerberos; then
|
|
78 myconf="${myconf}"
|
|
79 else
|
|
80 myconf="${myconf} --without-krb5"
|
|
81 fi
|
|
82 if use threads; then
|
|
83 myconf="${myconf}"
|
|
84 else
|
|
85 myconf="${myconf} --without-pthread"
|
|
86 fi
|
|
87 if use spell; then
|
|
88 myconf="${myconf} --with-interactive-spellcheck=/usr/bin/aspell"
|
|
89 fi
|
|
90 if ! use nls; then
|
|
91 myconf="${myconf} --disable-nls"
|
|
92 fi
|
|
93 econf ${myconf} || die "configure problem"
|
|
94 if use userland_BSD; then
|
|
95 make
|
|
96 else
|
|
97 emake
|
|
98 fi
|
|
99 }
|
|
100
|
|
101 src_install() {
|
|
102 if use onlyalpine; then
|
|
103 dobin alpine/alpine
|
|
104 doman doc/alpine.1
|
|
105 else
|
|
106 if use userland_BSD; then
|
|
107 make DESTDIR=${D} install
|
|
108 else
|
|
109 emake DESTDIR=${D} install
|
|
110 fi
|
|
111
|
|
112 doman doc/rpdump.1 doc/rpload.1
|
|
113 fi
|
|
114
|
|
115 dodoc NOTICE
|
|
116 if use chappa; then
|
|
117 dodoc README.maildir
|
|
118 fi
|
|
119
|
|
120 if use doc; then
|
|
121 dodoc README doc/brochure.txt doc/tech-notes.txt
|
|
122 docinto imap
|
|
123 dodoc imap/docs/*.txt imap/docs/CONFIG imap/docs/RELNOTES
|
|
124
|
|
125 docinto imap/rfc
|
|
126 dodoc imap/docs/rfc/*.txt
|
|
127
|
|
128 docinto html/tech-notes
|
|
129 dohtml -r doc/tech-notes/
|
|
130 fi
|
|
131 }
|
|
132
|
|
133 pkg_postinst() {
|
|
134 elog
|
|
135 if use spell; then
|
|
136 elog "In order to use spell checking"
|
|
137 elog " emerge app-dicts/aspell-\<your_langs\>"
|
|
138 elog "and setup alpine with:"
|
|
139 elog " Speller = /usr/bin/aspell -c"
|
|
140 elog
|
|
141 fi
|
|
142 }
|