diff options
author | Rob Cakebread <pythonhead@gentoo.org> | 2008-07-26 02:30:31 +0000 |
---|---|---|
committer | Rob Cakebread <pythonhead@gentoo.org> | 2008-07-26 02:30:31 +0000 |
commit | bbbe3575b410a2890197008b49ee1f968e46990b (patch) | |
tree | 80edc894fa16613f248a342f982b3708d3ed6769 /mail-filter/spambayes | |
parent | fix IUSE (diff) | |
download | gentoo-2-bbbe3575b410a2890197008b49ee1f968e46990b.tar.gz gentoo-2-bbbe3575b410a2890197008b49ee1f968e46990b.tar.bz2 gentoo-2-bbbe3575b410a2890197008b49ee1f968e46990b.zip |
Fix future imports for Python 2.5. Fixes bug #232461, thanks Jesus Rivero <jesus.riveroa@gmail.com>
(Portage version: 2.2_rc3/cvs/Linux 2.6.25-gentoo-r4 i686)
Diffstat (limited to 'mail-filter/spambayes')
-rw-r--r-- | mail-filter/spambayes/ChangeLog | 9 | ||||
-rw-r--r-- | mail-filter/spambayes/files/spambayes-1.0.4_import_errors_232461.patch | 91 | ||||
-rw-r--r-- | mail-filter/spambayes/spambayes-1.0.4.ebuild | 9 |
3 files changed, 105 insertions, 4 deletions
diff --git a/mail-filter/spambayes/ChangeLog b/mail-filter/spambayes/ChangeLog index daa20c6a5f69..3cefbcab191b 100644 --- a/mail-filter/spambayes/ChangeLog +++ b/mail-filter/spambayes/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for mail-filter/spambayes -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/spambayes/ChangeLog,v 1.11 2007/07/02 15:02:31 peper Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spambayes/ChangeLog,v 1.12 2008/07/26 02:30:30 pythonhead Exp $ + + 26 Jul 2008; Rob Cakebread <pythonhead@gentoo.org> + +files/spambayes-1.0.4_import_errors_232461.patch, spambayes-1.0.4.ebuild: + Fix future imports for Python 2.5. Fixes bug #232461, thanks Jesus Rivero + <jesus.riveroa@gmail.com> 02 Jul 2007; Piotr Jaroszyński <peper@gentoo.org> spambayes-1.0.4.ebuild: (QA) RESTRICT clean up. diff --git a/mail-filter/spambayes/files/spambayes-1.0.4_import_errors_232461.patch b/mail-filter/spambayes/files/spambayes-1.0.4_import_errors_232461.patch new file mode 100644 index 000000000000..bf6db6ce69e0 --- /dev/null +++ b/mail-filter/spambayes/files/spambayes-1.0.4_import_errors_232461.patch @@ -0,0 +1,91 @@ +diff -uNtr spambayes-1.0.4.orig/scripts/sb_imapfilter.py spambayes-1.0.4/scripts/sb_imapfilter.py +--- spambayes-1.0.4.orig/scripts/sb_imapfilter.py 2005-01-13 17:42:42.000000000 -0400 ++++ spambayes-1.0.4/scripts/sb_imapfilter.py 2008-07-25 21:36:58.000000000 -0430 +@@ -1,5 +1,7 @@ + #!/usr/bin/env python + ++from __future__ import generators ++ + """An IMAP filter. An IMAP message box is scanned and all non-scored + messages are scored and (where necessary) filtered. + +@@ -90,7 +92,6 @@ + __author__ = "Tony Meyer <ta-meyer@ihug.co.nz>, Tim Stone" + __credits__ = "All the Spambayes folk." + +-from __future__ import generators + + try: + True, False +diff -uNtr spambayes-1.0.4.orig/spambayes/Corpus.py spambayes-1.0.4/spambayes/Corpus.py +--- spambayes-1.0.4.orig/spambayes/Corpus.py 2004-04-06 09:21:46.000000000 -0400 ++++ spambayes-1.0.4/spambayes/Corpus.py 2008-07-21 00:38:41.000000000 -0430 +@@ -1,5 +1,7 @@ + #! /usr/bin/env python + ++from __future__ import generators ++ + '''Corpus.py - Spambayes corpus management framework. + + Classes: +@@ -79,7 +81,6 @@ + __author__ = "Tim Stone <tim@fourstonesExpressions.com>" + __credits__ = "Richie Hindle, Tim Peters, all the spambayes contributors." + +-from __future__ import generators + + try: + True, False +diff -uNtr spambayes-1.0.4.orig/spambayes/FileCorpus.py spambayes-1.0.4/spambayes/FileCorpus.py +--- spambayes-1.0.4.orig/spambayes/FileCorpus.py 2004-04-02 14:10:52.000000000 -0400 ++++ spambayes-1.0.4/spambayes/FileCorpus.py 2008-07-21 00:41:28.000000000 -0430 +@@ -1,5 +1,6 @@ + #! /usr/bin/env python + ++ + """FileCorpus.py - Corpus composed of file system artifacts + + Classes: +@@ -75,21 +76,22 @@ + + """ + ++ + # This module is part of the spambayes project, which is Copyright 2002 + # The Python Software Foundation and is covered by the Python Software + # Foundation license. + +-__author__ = "Tim Stone <tim@fourstonesExpressions.com>" +-__credits__ = "Richie Hindle, Tim Peters, all the spambayes contributors." +- + from __future__ import generators +- + from spambayes import Corpus + from spambayes import message + from spambayes import storage + import sys, os, gzip, fnmatch, getopt, time, stat + from spambayes.Options import options + ++__author__ = "Tim Stone <tim@fourstonesExpressions.com>" ++__credits__ = "Richie Hindle, Tim Peters, all the spambayes contributors." ++ ++ + class FileCorpus(Corpus.Corpus): + + def __init__(self, factory, directory, filter='*', cacheSize=250): +diff -uNtr spambayes-1.0.4.orig/spambayes/message.py spambayes-1.0.4/spambayes/message.py +--- spambayes-1.0.4.orig/spambayes/message.py 2004-12-21 19:12:55.000000000 -0400 ++++ spambayes-1.0.4/spambayes/message.py 2008-07-21 00:41:41.000000000 -0430 +@@ -72,10 +72,11 @@ + # The Python Software Foundation and is covered by the Python Software + # Foundation license. + ++from __future__ import generators ++ + __author__ = "Tim Stone <tim@fourstonesExpressions.com>" + __credits__ = "Mark Hammond, Tony Meyer, all the spambayes contributors." + +-from __future__ import generators + + try: + True, False diff --git a/mail-filter/spambayes/spambayes-1.0.4.ebuild b/mail-filter/spambayes/spambayes-1.0.4.ebuild index 84c37fb233bc..210ce9eb309c 100644 --- a/mail-filter/spambayes/spambayes-1.0.4.ebuild +++ b/mail-filter/spambayes/spambayes-1.0.4.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/spambayes/spambayes-1.0.4.ebuild,v 1.5 2007/07/15 02:43:38 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spambayes/spambayes-1.0.4.ebuild,v 1.6 2008/07/26 02:30:30 pythonhead Exp $ inherit distutils @@ -17,6 +17,11 @@ IUSE="" DEPEND=">=dev-lang/python-2.2.2" +src_unpack() { + distutils_src_unpack + epatch "${FILESDIR}/${P}_import_errors_232461.patch" +} + src_install() { distutils_src_install dodoc *.txt |