# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ inherit eutils mailer DESCRIPTION="A useful collection of mail servers, clients, and filters." HOMEPAGE="http://savannah.gnu.org/projects/mailutils" SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" LICENSE="GPL-3 LGPL-3" SLOT="0" KEYWORDS="alpha ~amd64 ~ppc ~sparc ~x86" IUSE="berkdb bidi debug gdbm gnutls guile iodbc kerberos mailwrapper mysql nls odbc pam postgres radius readline sasl maildir mh" PROVIDE="virtual/mailx" DEPEND="sys-libs/ncurses berkdb? ( sys-libs/db ) bidi? ( dev-libs/fribidi ) gdbm? ( sys-libs/gdbm ) gnutls? ( net-libs/gnutls ) guile? ( dev-scheme/guile ) iodbc? ( dev-db/libiodbc ) !iodbc? ( odbc? ( dev-db/unixODBC ) ) kerberos? ( virtual/krb5 ) mysql? ( virtual/mysql ) nls? ( sys-devel/gettext ) postgres? ( dev-db/postgresql ) radius? ( || ( net-dialup/gnuradius net-dialup/freeradius net-dialup/cistronradius ) ) readline? ( sys-libs/readline ) sasl? ( net-libs/libgsasl ) " RDEPEND="${DEPEND} !virtual/mailx !mail-client/nmh !mail-client/elm " src_unpack() { unpack ${A} cd ${S}/mail.local # (mail_local_LDADD): Add missing libraries. Reported by Robby Villegas. epatch ${FILESDIR}/${P}-mail.local-Makefile.patch } src_compile() { local myconf="--localstatedir=/var --sharedstatedir=/var" declare myconf=" $(use_enable nls) \ $(use_enable pam) \ $(use_enable radius) \ $(use_enable debug) \ $(use_enable maildir) \ $(use_enable mh) \ $(use_with berkdb berkeley-db) \ $(use_with bidi fribidi) \ $(use_with gdbm) \ $(use_with gnutls) \ $(use_with sasl gsasl) \ $(use_with guile) \ $(use_with kerberos gssapi) \ $(use_with mysql) \ $(use_with postgres) \ $(use_with readline) \ --enable-sendmail \ --without-dbm \ --without-ndbm" if use iodbc; then myconf="${myconf} --with-odbc=iodbc" else myconf="${myconf} $(use_with odbc)" fi if use mh; then myconf="${myconf} --enable-mh-utils" else myconf="${myconf} --disable-mh-utils" fi econf ${myconf} || die "configure failed" emake || die "compile failed" } src_install() { make DESTDIR=${D} install || die # mail.rc stolen from mailx, resolve bug #37302. insinto /etc doins "${FILESDIR}/mail.rc" if use mailwrapper ; then dosym /usr/libexec/mail.remote /usr/bin/sendmail.mail.remote mailer_install_conf else dosym /usr/libexec/mail.remote /usr/lib/sendmail dosym /usr/libexec/mail.remote /usr/bin/sendmail dosym /usr/libexec/mail.remote /usr/sbin/sendmail dosym /usr/libexec/mail.remote /usr/bin/mailq dosym /usr/libexec/mail.remote /usr/bin/newaliases fi }