Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/metamail/
Date: Thu, 31 May 2018 07:48:36
Message-Id: 1527752321.2f3809ed22feddfee4d5bffd368ad9cdbe684ab6.eras@gentoo
1 commit: 2f3809ed22feddfee4d5bffd368ad9cdbe684ab6
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 31 07:38:41 2018 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Thu May 31 07:38:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f3809ed
7
8 net-mail/metamail: mailcap provides the mailcap.5 now
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 net-mail/metamail/metamail-2.7.53.3-r2.ebuild | 69 +++++++++++++++++++++++++++
13 1 file changed, 69 insertions(+)
14
15 diff --git a/net-mail/metamail/metamail-2.7.53.3-r2.ebuild b/net-mail/metamail/metamail-2.7.53.3-r2.ebuild
16 new file mode 100644
17 index 00000000000..84c02dac00b
18 --- /dev/null
19 +++ b/net-mail/metamail/metamail-2.7.53.3-r2.ebuild
20 @@ -0,0 +1,69 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +inherit autotools toolchain-funcs
27 +
28 +MY_PV=$(ver_cut 1-2)
29 +DEB_PV=${MY_PV}-$(ver_cut 3)
30 +
31 +DESCRIPTION="Metamail (with Debian patches) - Generic MIME package"
32 +HOMEPAGE="http://ftp.funet.fi/pub/unix/mail/metamail/"
33 +SRC_URI="http://ftp.funet.fi/pub/unix/mail/metamail/mm${MY_PV}.tar.Z
34 + mirror://debian/pool/main/m/metamail/metamail_${DEB_PV}.diff.gz"
35 +
36 +LICENSE="GPL-2"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
39 +IUSE="static-libs"
40 +
41 +DEPEND="sys-libs/ncurses
42 + app-arch/sharutils
43 + net-mail/mailbase"
44 +RDEPEND="app-misc/mime-types
45 + sys-apps/debianutils
46 + !app-misc/run-mailcap"
47 +
48 +S=${WORKDIR}/mm${MY_PV}/src
49 +
50 +src_prepare() {
51 + eapply "${WORKDIR}"/metamail_${DEB_PV}.diff
52 + eapply "${FILESDIR}"/${PN}-2.7.45.3-CVE-2006-0709.patch
53 + eapply "${FILESDIR}"/${P}-glibc-2.10.patch
54 +
55 + # respect CFLAGS
56 + sed -i -e 's/CFLAGS/LIBS/' \
57 + "${S}"/src/{metamail,richmail}/Makefile.am || die
58 +
59 + # add missing include - QA
60 + sed -i -e '/config.h/a #include <string.h>' \
61 + "${S}"/src/metamail/shared.c || die
62 +
63 + # Fix building with ncurses[tinfo]
64 + sed -i -e "s/-lncurses/$($(tc-getPKG_CONFIG) --libs ncurses)/" \
65 + src/richmail/Makefile.am \
66 + src/metamail/Makefile.am || die
67 +
68 + eapply_user
69 + eautoreconf
70 + chmod +x "${S}"/configure
71 +}
72 +
73 +src_configure() {
74 + econf $(use_enable static-libs static)
75 +}
76 +
77 +src_compile() {
78 + emake CC=$(tc-getCC) CFLAGS="${CFLAGS}"
79 +}
80 +
81 +src_install () {
82 + emake DESTDIR="${D}" install
83 + dodoc CREDITS README
84 + rm man/mmencode.1
85 + rm man/mailcap.5
86 + doman man/* debian/mimencode.1 debian/mimeit.1
87 +
88 + use static-libs || find "${D}"/usr/lib* -name '*.la' -delete
89 +}