summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/metamail')
-rw-r--r--net-mail/metamail/Manifest2
-rw-r--r--net-mail/metamail/files/metamail-2.7.45.3-CVE-2006-0709.patch40
-rw-r--r--net-mail/metamail/files/metamail-2.7.53.3-glibc-2.10.patch30
-rw-r--r--net-mail/metamail/metadata.xml5
-rw-r--r--net-mail/metamail/metamail-2.7.53.3-r1.ebuild69
5 files changed, 146 insertions, 0 deletions
diff --git a/net-mail/metamail/Manifest b/net-mail/metamail/Manifest
new file mode 100644
index 000000000000..5f478531379b
--- /dev/null
+++ b/net-mail/metamail/Manifest
@@ -0,0 +1,2 @@
+DIST metamail_2.7-53.diff.gz 322363 SHA256 43c14331ded498ea0b5adb2367bb18ddd879f161dccb89e879952110a5f151b4 SHA512 cb5351308f1ad479e1560446f7f540165ff165d7306a5592a8286edd643301608ff9ace01456d4b0d03d27b9b838b61f08412b15d6b3aa99b95e2ab484e884ed WHIRLPOOL 592d37044bdbaac0a1e67243ef7f16b2ce38b3e49cab7e72673ee921ad52370bf5fbf3ebb60c03a0422933948a09767874e678ffd62b41f8254ef0fce4287b1f
+DIST mm2.7.tar.Z 262881 SHA256 9c0281bdce32a7d3e61c1e3c703a748acb5d216d082a718efa316f68b9808a96 SHA512 9cd2619ca83594ca7be94453270b6a9ef01f5a496fd361bb76f16fc575f549ab450efa1d480c3d4b0b172f245d9c3276f99ba1ae4e3ae4bb6618df9d8131f77e WHIRLPOOL fedf0b51fda7d6ab384770c7d9553fcebe4ebe6abbb8e0dfb944360727e0a725ac3ab25f4a03307f66f71958489f235121bddc625f20bd5323c3620feb387019
diff --git a/net-mail/metamail/files/metamail-2.7.45.3-CVE-2006-0709.patch b/net-mail/metamail/files/metamail-2.7.45.3-CVE-2006-0709.patch
new file mode 100644
index 000000000000..6572a514c37c
--- /dev/null
+++ b/net-mail/metamail/files/metamail-2.7.45.3-CVE-2006-0709.patch
@@ -0,0 +1,40 @@
+--- src/src/metamail/metamail.c.old 2006-03-14 10:13:35.000000000 -0800
++++ src/src/metamail/metamail.c 2006-03-14 10:11:52.000000000 -0800
+@@ -313,7 +313,7 @@
+ WroteSquirrelFile = 0;
+ }
+ LineBuf = XMALLOC(char, LINE_BUF_SIZE);
+- sprintf(LineBuf, "--%s", boundary);
++ snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary);
+ strcpy(boundary, LineBuf);
+ boundarylen = strlen(boundary);
+ if (BoundaryCt >= BoundaryAlloc) {
+@@ -1712,7 +1712,7 @@
+ if (boundary[0] == '"') {
+ boundary=UnquoteString(boundary);
+ }
+- sprintf(LineBuf, "--%s", boundary);
++ snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary);
+ strcpy(boundary, LineBuf);
+ boundarylen = strlen(boundary);
+ if (BoundaryCt >= BoundaryAlloc) {
+--- src/metamail/metamail.c.old 2006-03-14 10:12:39.000000000 -0800
++++ src/metamail/metamail.c 2006-03-14 10:14:53.000000000 -0800
+@@ -445,7 +445,7 @@
+ }
+ LineBuf = malloc(LINE_BUF_SIZE);
+ if (!LineBuf) ExitWithError(nomem);
+- sprintf(LineBuf, "--%s", boundary);
++ snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary);
+ strcpy(boundary, LineBuf);
+ boundarylen = strlen(boundary);
+ if (BoundaryCt >= BoundaryAlloc) {
+@@ -2115,7 +2115,7 @@
+ if (boundary[0] == '"') {
+ boundary=UnquoteString(boundary);
+ }
+- sprintf(LineBuf, "--%s", boundary);
++ snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary);
+ strcpy(boundary, LineBuf);
+ boundarylen = strlen(boundary);
+ if (BoundaryCt >= BoundaryAlloc) {
diff --git a/net-mail/metamail/files/metamail-2.7.53.3-glibc-2.10.patch b/net-mail/metamail/files/metamail-2.7.53.3-glibc-2.10.patch
new file mode 100644
index 000000000000..7da331adbbf8
--- /dev/null
+++ b/net-mail/metamail/files/metamail-2.7.53.3-glibc-2.10.patch
@@ -0,0 +1,30 @@
+diff -ur mm2.7.orig/src/metamail/uue.c mm2.7/src/metamail/uue.c
+--- mm2.7.orig/src/metamail/uue.c 1993-07-28 21:31:02.000000000 +0300
++++ mm2.7/src/metamail/uue.c 2009-08-07 12:09:35.000000000 +0300
+@@ -30,7 +30,7 @@
+ }
+
+
+-getline (buf, size, fp)
++get_line (buf, size, fp)
+ char *buf;
+ int size;
+ FILE *fp;
+@@ -70,7 +70,7 @@
+ char buf[63];
+
+ while (1) {
+- if (getline (buf, sizeof buf, infp) < 0) {
++ if (get_line (buf, sizeof buf, infp) < 0) {
+ fprintf (stderr, "Premature EOF!\n");
+ return;
+ }
+@@ -82,7 +82,7 @@
+ }
+ }
+ while (1) {
+- if (getline (buf, sizeof buf, infp) < 0) {
++ if (get_line (buf, sizeof buf, infp) < 0) {
+ fprintf (stderr, "Premature EOF!\n");
+ return;
+ }
diff --git a/net-mail/metamail/metadata.xml b/net-mail/metamail/metadata.xml
new file mode 100644
index 000000000000..51f94e3fbe0e
--- /dev/null
+++ b/net-mail/metamail/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-mail</herd>
+</pkgmetadata>
diff --git a/net-mail/metamail/metamail-2.7.53.3-r1.ebuild b/net-mail/metamail/metamail-2.7.53.3-r1.ebuild
new file mode 100644
index 000000000000..04379b6edb6f
--- /dev/null
+++ b/net-mail/metamail/metamail-2.7.53.3-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+WANT_AUTOCONF="2.5"
+
+inherit autotools eutils toolchain-funcs versionator
+
+MY_PV=$(get_version_component_range 1-2)
+DEB_PV=${MY_PV}-$(get_version_component_range 3)
+
+DESCRIPTION="Metamail (with Debian patches) - Generic MIME package"
+HOMEPAGE="http://ftp.funet.fi/pub/unix/mail/metamail/"
+SRC_URI="http://ftp.funet.fi/pub/unix/mail/metamail/mm${MY_PV}.tar.Z
+ mirror://debian/pool/main/m/metamail/metamail_${DEB_PV}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
+IUSE="static-libs"
+
+DEPEND="sys-libs/ncurses
+ app-arch/sharutils
+ net-mail/mailbase"
+RDEPEND="app-misc/mime-types
+ sys-apps/debianutils
+ !app-misc/run-mailcap"
+
+S=${WORKDIR}/mm${MY_PV}/src
+
+src_prepare() {
+ epatch "${WORKDIR}"/metamail_${DEB_PV}.diff
+ epatch "${FILESDIR}"/${PN}-2.7.45.3-CVE-2006-0709.patch
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+
+ # respect CFLAGS
+ sed -i -e 's/CFLAGS/LIBS/' \
+ "${S}"/src/{metamail,richmail}/Makefile.am || die
+
+ # add missing include - QA
+ sed -i -e '/config.h/a #include <string.h>' \
+ "${S}"/src/metamail/shared.c || die
+
+ # Fix building with ncurses[tinfo]
+ sed -i -e "s/-lncurses/$($(tc-getPKG_CONFIG) --libs ncurses)/" \
+ src/richmail/Makefile.am \
+ src/metamail/Makefile.am || die
+ eautoreconf
+ chmod +x "${S}"/configure
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS}"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+ dodoc CREDITS README
+ rm man/mmencode.1
+ doman man/* debian/mimencode.1 debian/mimeit.1
+
+ use static-libs || find "${D}"/usr/lib* -name '*.la' -delete
+}