diff options
author | lwhsu <lwhsu@FreeBSD.org> | 2009-07-23 15:03:15 +0800 |
---|---|---|
committer | lwhsu <lwhsu@FreeBSD.org> | 2009-07-23 15:03:15 +0800 |
commit | 6d9266010f69defea1e64b0cbbaffd75e0eb6a0a (patch) | |
tree | 25e4ab395c3fbe3ba54285321444940ce2192dbe | |
parent | b017d69b9c6009a4f4d96511d7c0affa2937be2d (diff) | |
download | freebsd-ports-gnome-6d9266010f69defea1e64b0cbbaffd75e0eb6a0a.tar.gz freebsd-ports-gnome-6d9266010f69defea1e64b0cbbaffd75e0eb6a0a.tar.zst freebsd-ports-gnome-6d9266010f69defea1e64b0cbbaffd75e0eb6a0a.zip |
- Add a patch for working with Python 2.6
PR: ports/136644 (based on)
Submitted by: Martin Dieringer <martin.dieringer AT gmx.de>
-rw-r--r-- | mail/py-spambayes/Makefile | 17 | ||||
-rw-r--r-- | mail/py-spambayes/files/extra-patch-python26 | 11 |
2 files changed, 26 insertions, 2 deletions
diff --git a/mail/py-spambayes/Makefile b/mail/py-spambayes/Makefile index 09e8a6d64c9b..d05ca7d943de 100644 --- a/mail/py-spambayes/Makefile +++ b/mail/py-spambayes/Makefile @@ -16,9 +16,11 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= ports@FreeBSD.org COMMENT= A Bayesian anti-spam filter written in Python -RUN_DEPENDS= ${PYTHON_SITELIBDIR}/_bsddb.so:${PORTSDIR}/databases/py25-bsddb +# bypass infrastructure bug +OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options + +OPTIONS= PYTHON26 "Build with Python 2.6 (with unofficial patch)" off -USE_PYTHON= 2.5 USE_PYDISTUTILS= yes USE_RC_SUBR= pyspamd LOCALSTATDIR?= /var/db/spambayes @@ -78,4 +80,15 @@ post-install: @${MKDIR} ${CACHEDIR} @${MKDIR} ${DBDIR} +.include <bsd.port.options.mk> + +.if defined(WITH_PYTHON26) +USE_PYTHON= 2.6 +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/_bsddb.so:${PORTSDIR}/databases/py-bsddb +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-python26 +.else +USE_PYTHON= 2.5 +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/_bsddb.so:${PORTSDIR}/databases/py25-bsddb +.endif + .include <bsd.port.mk> diff --git a/mail/py-spambayes/files/extra-patch-python26 b/mail/py-spambayes/files/extra-patch-python26 new file mode 100644 index 000000000000..a2ab6a17175d --- /dev/null +++ b/mail/py-spambayes/files/extra-patch-python26 @@ -0,0 +1,11 @@ +--- spambayes/Dibbler.py~ 2009-07-10 21:43:59.000000000 +0200 ++++ spambayes/Dibbler.py 2009-07-10 21:44:37.655326444 +0200 +@@ -218,7 +218,7 @@ + # self.initiate_send() raises an exception, causing self.close() + # to be called. If we didn't check, we could end up in an infinite + # loop. +- while (self.producer_fifo or self.ac_out_buffer) and not self._closed: ++ while (self.producer_fifo) and not self._closed: + self.initiate_send() + + def close(self): |