1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs
8 HOMEPAGE="https://www.sdaoden.eu/code.html"
9 DESCRIPTION="Enhanced mailx-compatible mail client based on Hierloom mailx (nail)"
10 LICENSE="BSD BSD-4 ISC RSA"
12 SRC_URI="https://ftp.sdaoden.eu/${P}.tar.xz"
14 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
15 IUSE="idn kerberos libressl net ssl"
20 idn? ( net-dns/libidn2 )
23 !libressl? ( dev-libs/openssl:0= )
24 libressl? ( dev-libs/libressl:0= )
26 kerberos? ( virtual/krb5 )
41 VAL_PREFIX="${EPREFIX}"/usr
42 VAL_SYSCONFDIR="${EPREFIX}"/etc
43 VAL_MTA="${EPREFIX}/usr/sbin/sendmail"
44 VAL_MAIL='/var/spool/mail'
46 $(usex idn VAL_IDNA=idn2 OPT_IDNA=no)
51 confopts+=( OPT_TLS=$(usex ssl require no)
52 OPT_GSSAPI=$(usex kerberos require no)
55 confopts+=( OPT_NET=no )
58 tc-is-cross-compiler && confopts+=( OPT_CROSS_BUILD=yes )
60 emake "${confopts[@]}" config
68 # Use /usr/sbin/sendmail by default and provide an example
69 cat <<- EOSMTP >> nail.rc
71 # Use the local sendmail (/usr/sbin/sendmail) binary by default.
72 # (Uncomment the following line to use a SMTP server)
75 # Ask for CC: list too.
79 emake DESTDIR="${D}" install
81 dodoc INSTALL NEWS README THANKS
84 dosym ../usr/bin/mailx /bin/mail
85 dosym s-nail /usr/bin/mailx
86 dosym mailx /usr/bin/mail
87 dosym mailx /usr/bin/Mail
89 dosym s-nail.1 /usr/share/man/man1/mailx.1
90 dosym mailx.1 /usr/share/man/man1/mail.1
91 dosym mailx.1 /usr/share/man/man1/Mail.1