diff options
author | Torsten Veller <tove@gentoo.org> | 2007-05-13 10:15:24 +0000 |
---|---|---|
committer | Torsten Veller <tove@gentoo.org> | 2007-05-13 10:15:24 +0000 |
commit | 540229069ab0af7d0810ccbe592990feba14a2e5 (patch) | |
tree | dae2106c0d10931c231f37c43bb91ad44e738801 /net-mail/archivemail | |
parent | Stable on ppc64; bug #177804 (diff) | |
download | gentoo-2-540229069ab0af7d0810ccbe592990feba14a2e5.tar.gz gentoo-2-540229069ab0af7d0810ccbe592990feba14a2e5.tar.bz2 gentoo-2-540229069ab0af7d0810ccbe592990feba14a2e5.zip |
Added support for python-2.5. Patch by Ali Polatel in bug #160811.
(Portage version: 2.1.2.7)
Diffstat (limited to 'net-mail/archivemail')
-rw-r--r-- | net-mail/archivemail/ChangeLog | 10 | ||||
-rw-r--r-- | net-mail/archivemail/archivemail-0.7.0-r1.ebuild | 32 | ||||
-rw-r--r-- | net-mail/archivemail/files/archivemail-0.7.0-fpname.patch | 94 | ||||
-rw-r--r-- | net-mail/archivemail/files/digest-archivemail-0.7.0-r1 | 3 |
4 files changed, 137 insertions, 2 deletions
diff --git a/net-mail/archivemail/ChangeLog b/net-mail/archivemail/ChangeLog index a8e05b1ae7f1..1193265d3c4d 100644 --- a/net-mail/archivemail/ChangeLog +++ b/net-mail/archivemail/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-mail/archivemail -# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/archivemail/ChangeLog,v 1.7 2006/12/11 06:22:06 tove Exp $ +# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/archivemail/ChangeLog,v 1.8 2007/05/13 10:15:24 tove Exp $ + +*archivemail-0.7.0-r1 (13 May 2007) + + 13 May 2007; Torsten Veller <tove@gentoo.org> + +files/archivemail-0.7.0-fpname.patch, +archivemail-0.7.0-r1.ebuild: + Added support for python-2.5. Patch by Ali Polatel in bug #160811. *archivemail-0.7.0 (11 Dec 2006) diff --git a/net-mail/archivemail/archivemail-0.7.0-r1.ebuild b/net-mail/archivemail/archivemail-0.7.0-r1.ebuild new file mode 100644 index 000000000000..86ba2ddd3d0f --- /dev/null +++ b/net-mail/archivemail/archivemail-0.7.0-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/archivemail/archivemail-0.7.0-r1.ebuild,v 1.1 2007/05/13 10:15:24 tove Exp $ + +inherit eutils distutils + +DESCRIPTION="Tool written in Python for archiving and compressing old email in mailboxes." +HOMEPAGE="http://archivemail.sourceforge.net/" +SRC_URI="mirror://sourceforge/archivemail/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~sparc ~amd64" +IUSE="" +DEPEND=">=dev-lang/python-2.3" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-fpname.patch" +} + +src_test() { + echo ">>> Test phase: ${CATEGORY}/${PF}" + ln -sf "${S}"/archivemail "${S}"/archivemail.py + "${S}"/test_archivemail.py || die "test_archivemail.py failed" +} + +src_install() { + distutils_src_install --install-data=/usr/share + dodoc examples/* CHANGELOG FAQ README TODO || die "dodoc failed" +} diff --git a/net-mail/archivemail/files/archivemail-0.7.0-fpname.patch b/net-mail/archivemail/files/archivemail-0.7.0-fpname.patch new file mode 100644 index 000000000000..41e2f76a2ee0 --- /dev/null +++ b/net-mail/archivemail/files/archivemail-0.7.0-fpname.patch @@ -0,0 +1,94 @@ +--- archivemail-0.7.0/archivemail.orig 2006-11-03 01:21:22.000000000 +0200 ++++ archivemail-0.7.0/archivemail 2007-05-10 12:04:16.000000000 +0300 +@@ -779,7 +779,10 @@ + # the headers have no valid dates -- last resort, try the file timestamp + # this will not work for mbox mailboxes + try: +- file_name = message.fp.name ++ if sys.hexversion >= 0x020500F0: ++ file_name = message.fp._file.name ++ else: ++ file_name = message.fp.name + except AttributeError: + # we are looking at a 'mbox' mailbox - argh! + # Just return the current time - this will never get archived :( +@@ -788,7 +791,7 @@ + if not os.path.isfile(file_name): + unexpected_error("mailbox file name '%s' has gone missing" % \ + file_name) +- time_message = os.path.getmtime(message.fp.name) ++ time_message = os.path.getmtime(file_name) + vprint("using valid time found from '%s' last-modification time" % \ + file_name) + return time_message +@@ -806,7 +809,11 @@ + """ + status = "" + x_status = "" +- match = re.search(":2,(.+)$", message.fp.name) ++ if sys.hexversion >= 0x020500F0: ++ fpname = message.fp._file.name ++ else: ++ fpname = message.fp.name ++ match = re.search(":2,(.+)$", fpname) + if match: + flags = match.group(1) + for flag in flags: +@@ -825,7 +832,7 @@ + + # files in the maildir 'cur' directory are no longer new, + # they are the same as messages with 'Status: O' headers in mbox +- last_dir = os.path.basename(os.path.dirname(message.fp.name)) ++ last_dir = os.path.basename(os.path.dirname(fpname)) + if last_dir == "cur": + status = status + "O" + +@@ -881,7 +888,10 @@ + return 1 + file_name = None + try: +- file_name = message.fp.name ++ if sys.hexversion >= 0x020500F0: ++ file_name = message.fp._file.name ++ else: ++ file_name = message.fp.name + except AttributeError: + pass + # maildir mailboxes use the filename suffix to indicate flagged status +@@ -901,7 +911,10 @@ + return 0 + file_name = None + try: +- file_name = message.fp.name ++ if sys.hexversion >= 0x020500F0: ++ file_name = message.fp._file.name ++ else: ++ file_name = message.fp.name + except AttributeError: + pass + # maildir mailboxes use the filename suffix to indicate read status +@@ -918,7 +931,10 @@ + file_name = None + message_size = None + try: +- file_name = message.fp.name ++ if sys.hexversion >= 0x020500F0: ++ file_name = message.fp._file.name ++ else: ++ file_name = message.fp.name + except AttributeError: + pass + if file_name: +@@ -1269,7 +1285,11 @@ + if type == "maildir": + add_status_headers(msg) + archive.write(msg) +- if not options.dry_run: delete_queue.append(msg.fp.name) ++ if sys.hexversion >= 0x020500F0: ++ fpname = msg.fp._file.name ++ else: ++ fpname = msg.fp.name ++ if not options.dry_run: delete_queue.append(fpname) + else: + vprint("decision: retain message") + msg = original.next() diff --git a/net-mail/archivemail/files/digest-archivemail-0.7.0-r1 b/net-mail/archivemail/files/digest-archivemail-0.7.0-r1 new file mode 100644 index 000000000000..c620a1f9d8d0 --- /dev/null +++ b/net-mail/archivemail/files/digest-archivemail-0.7.0-r1 @@ -0,0 +1,3 @@ +MD5 087c9707daa6bb5c44cd052b6d71ce88 archivemail-0.7.0.tar.gz 39820 +RMD160 1c8d688a8cf06d30ff4b1d380d8a9cc1576e28dd archivemail-0.7.0.tar.gz 39820 +SHA256 955af1b36e5b20a1e2e3026c6aff088e9a0d646bcb2e9a52dd6696a6f78f6790 archivemail-0.7.0.tar.gz 39820 |