www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / mail-client / alpine / alpine-2.22-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools toolchain-funcs
7
8 DESCRIPTION="An easy to use text-based based mail and news client"
9 HOMEPAGE="http://alpine.x10host.com/alpine/ https://repo.or.cz/alpine.git/"
10 CHAPPA_PATCH_NAME="${P}-chappa.patch"
11 SRC_URI="http://alpine.x10host.com/alpine/release/src/${P}.tar.xz
12         chappa? ( http://alpine.x10host.com/alpine/patches/${P}/all.patch.gz -> ${CHAPPA_PATCH_NAME}.gz ) "
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
17 IUSE="+chappa doc ipv6 kerberos ldap libressl nls onlyalpine passfile smime spell ssl threads"
18
19 DEPEND=">=sys-libs/ncurses-5.1:0=
20         kerberos? ( app-crypt/mit-krb5 )
21         ldap? ( net-nds/openldap )
22         spell? ( app-text/aspell )
23         ssl? (
24                 !libressl? ( dev-libs/openssl:0= )
25                 libressl? ( dev-libs/libressl:0= )
26         )
27 "
28 RDEPEND="${DEPEND}
29         app-misc/mime-types
30 "
31
32 PATCHES=(
33         "${FILESDIR}/${P}-cc.patch"
34         "${FILESDIR}/${P}-fno-common.patch"
35 )
36
37 src_prepare() {
38         default
39         use chappa && eapply "${WORKDIR}/${CHAPPA_PATCH_NAME}"
40         eautoreconf
41         tc-export CC RANLIB AR
42         export CC_FOR_BUILD=$(tc-getBUILD_CC)
43 }
44
45 src_configure() {
46         myconf=(
47                 --without-tcl
48                 --with-system-pinerc="${EPREFIX}"/etc/pine.conf
49                 --with-system-fixed-pinerc="${EPREFIX}"/etc/pine.conf.fixed
50                 $(use_with ldap)
51                 $(use_with ssl)
52                 $(use_with passfile passfile .pinepwd)
53                 $(use_with kerberos krb5)
54                 $(use_with threads pthread)
55                 $(use_with spell interactive-spellcheck /usr/bin/aspell)
56                 $(use_enable nls)
57                 $(use_with ipv6)
58                 $(use_with smime)
59         )
60
61         if use ssl; then
62                 myconf+=(
63                         --with-ssl-include-dir="${EPREFIX}"/usr/include/openssl
64                         --with-ssl-lib-dir="${EPREFIX}"/usr/$(get_libdir)
65                         --with-ssl-certs-dir="${EPREFIX}"/etc/ssl/certs
66                 )
67         fi
68         econf "${myconf[@]}"
69 }
70
71 src_compile() {
72         emake -j1 AR=$(tc-getAR)
73 }
74
75 src_install() {
76         if use onlyalpine ; then
77                 dobin alpine/alpine
78                 doman doc/man1/alpine.1
79         else
80                 emake -j1 DESTDIR="${D}" install
81                 doman doc/man1/*.1
82         fi
83
84         dodoc NOTICE README*
85
86         if use doc ; then
87                 dodoc doc/brochure.txt
88
89                 dodoc -r doc/tech-notes/
90                 newdoc "${S}/doc/mailcap.unx" mailcap.unx.sample
91                 newdoc "${S}/doc/mime.types" mime.types.sample
92                 docompress -x /usr/share/doc/${PF}/mailcap.unx.sample /usr/share/doc/${PF}/mime.types.sample
93         fi
94 }