inherit eutils DESCRIPTION="a classic mail client enhanced by Michael Elkins" HOMEPAGE="http://www.elmme-mailer.org/elm-2.4ME+.html" SRC_URI="http://www.elmme-mailer.org/elm-2.4ME+123.tar.gz ftp://ftp.funet.fi/pub/mirrors/ftp.elmme-mailer.org/elmme-mailer.org/src/elm-2.4ME+/elm-2.4ME+123.tar.gz ftp://ftp.noc.ntua.gr/pub/net/mail/elm-me/src/elm-2.4ME+/elm-2.4ME+123.tar.gz ftp://ftp.csie.nctu.edu.tw/pub/Unix/mail/elm+ME/elm-2.4ME+/elm-2.4ME+123.tar.gz" LICENSE="Elm" SLOT="0" KEYWORDS="x86 sparc ppc alpha" IUSE="spell" DEPEND="virtual/libc >=net-mail/mailbase-0.00-r5 dev-libs/openssl spell? ( app-text/ispell ) !net-mail/mailutils" S=${WORKDIR}/elm2.4.ME+.123 src_unpack() { unpack ${A} #gcc whines like a baby with no candy. Foo! epatch ${FILESDIR}/gcc4-misclib.h.patch epatch ${FILESDIR}/gcc4-mime_types.c.patch } src_compile() { sed -i -e "s:\$shlib:${D}\$shlib:g" \ lib/Makefile.SH sed -i -e "s:\$shlib:${D}\$shlib:g" \ shared_libs/iconv/Makefile.SH sed -i -e "s:\$shlib:${D}\$shlib:g" \ shared_libs/smtp/Makefile.SH sed -i -e "s:\$shlib:${D}\$shlib:g" \ shared_libs/tls/Makefile.SH sed -i -e "s:elmunidata -I :elmunidata -w ${D}usr/lib/elm.map.bin/unidata.bin :" \ -e "s:\$lib$:${D}\$lib:" \ src/Makefile.SH sed -i -e "s:\$lib$:${D}\$lib:" \ utils/Makefile.SH sed -i -e "s:\"\$lib\":\"${D}\$lib\":" \ -e "s:\$lib$:${D}\$lib:" \ doc/Makefile.SH sed -e "s:helphome\t\"\$lib:helphome\t\"${D}\$lib:" \ -e "s:\"\$lib/elmrc-info:\"${D}\$lib/elmrc-info:" \ -e "s:\$shlib:${D}\$shlib:" \ hdrs/sysdefs.SH sed -i -e "s:install_prefix/man:install_prefix/share/man:" \ -e "s:etc=\"\$lib\":etc=\"/etc/elm\":" \ -e "s:dflt=\"-O\":dflt=\"${CFLAGS}\":" \ -e "s:dflt=cc:dflt=gcc:" \ Configure local myconf use spell && myconf="ispell=\'y\'" ./Configure -P/usr -b ${myconf} || die "configure failed" make all|| die "make failed" } src_install() { dodir /usr/lib/elm.map.txt /usr/lib/elm.map.bin /etc/elm /usr/bin \ /usr/share/man/man1 /usr/share/man/cat1 cd ${S}/src cp Makefile Makefile.orig sed \ -e "s:-G -I -C:-G -w \${D}etc/elm/elm.rc -C:" \ < Makefile.orig > Makefile cd ${S} make \ DEST=${D}usr/bin \ MAN=${D}usr/share/man/man1 \ CATMAN=${D}usr/share/man/cat1 \ ETC=${D}etc/elm install || die "make install failed" insinto /usr/lib/elm.map.txt doins charset/MAPPINGS/ISO8859/* }