summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-10-10 19:55:06 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-10-10 19:55:06 -0400
commit51d6ba35065ddb6e91bf5011c6f835315d834337 (patch)
tree47bf55e3f66492a9dee0ee71bc1f2731192c4cdb /mail-client/nail
parentmail-client/mail-notification: add libressl support (diff)
downloadgentoo-51d6ba35065ddb6e91bf5011c6f835315d834337.tar.gz
gentoo-51d6ba35065ddb6e91bf5011c6f835315d834337.tar.bz2
gentoo-51d6ba35065ddb6e91bf5011c6f835315d834337.zip
mail-client/nail: add libressl support
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'mail-client/nail')
-rw-r--r--mail-client/nail/nail-12.4-r3.ebuild110
1 files changed, 110 insertions, 0 deletions
diff --git a/mail-client/nail/nail-12.4-r3.ebuild b/mail-client/nail/nail-12.4-r3.ebuild
new file mode 100644
index 000000000000..98b25cdb3d97
--- /dev/null
+++ b/mail-client/nail/nail-12.4-r3.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+HOMEPAGE="http://heirloom.sourceforge.net/"
+DESCRIPTION="an enhanced mailx-compatible mail client"
+LICENSE="BSD"
+
+MY_PN="mailx"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="mirror://sourceforge/project/heirloom/heirloom-${MY_PN}/${PV}/${MY_P}.tar.bz2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="libressl ssl net kerberos"
+
+RDEPEND="
+ net? (
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ kerberos? ( virtual/krb5 )
+ )
+ !mail-client/mailx
+ !net-mail/mailutils
+"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+undef() {
+ sed -i -e "/$1/s:#define:#undef:" config.h || die
+}
+
+droplib() {
+ sed -i -e "/$1/s:^:#:" LIBS || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-debian.patch \
+ "${FILESDIR}"/${P}-openssl-1.patch
+ # Do not strip the binary
+ sed -i -e '/STRIP/d' Makefile
+}
+
+src_configure() {
+ # Build config.h and LIBS, neccesary to tweak the config
+ # use -j1 because it will produce bogus output otherwise
+ emake -j1 config.h LIBS || die
+
+ # Logic to 'configure' the package
+
+ if ! use ssl || ! use net ; then
+ undef 'USE_\(OPEN\)\?SSL'
+ droplib -lssl
+ fi
+
+ if ! use kerberos || ! use net ; then
+ undef 'USE_GSSAPI'
+ droplib -lgssapi_krb5
+ fi
+
+ if ! use net ; then
+ undef 'HAVE_SOCKETS'
+ fi
+}
+
+src_compile() {
+ # No configure script to check for and set this
+ tc-export CC
+
+ emake \
+ CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE" \
+ PREFIX="${EPREFIX}"/usr SYSCONFDIR="${EPREFIX}"/etc \
+ SENDMAIL="${EPREFIX}/usr/sbin/sendmail" \
+ MAILSPOOL='/var/spool/mail' \
+ || die "emake failed"
+}
+
+src_install () {
+ # Use /usr/sbin/sendmail by default and provide an example
+ cat <<- EOSMTP >> nail.rc
+
+ # Use the local sendmail (/usr/sbin/sendmail) binary by default.
+ # (Uncomment the following line to use a SMTP server)
+ #set smtp=localhost
+
+ # Ask for CC: list too.
+ set askcc
+ EOSMTP
+
+ emake DESTDIR="${D}" \
+ UCBINSTALL=$(type -p install) \
+ PREFIX="${EPREFIX}"/usr SYSCONFDIR="${EPREFIX}"/etc install \
+ || die
+
+ dodoc AUTHORS README || die
+
+ dodir /bin
+ dosym ../usr/bin/mailx /bin/mail || die
+ dosym mailx /usr/bin/mail || die
+ dosym mailx /usr/bin/Mail || die
+
+ dosym mailx.1 /usr/share/man/man1/mail.1 || die
+ dosym mailx.1 /usr/share/man/man1/Mail.1 || die
+}