diff options
author | barner <barner@FreeBSD.org> | 2005-11-10 18:29:33 +0800 |
---|---|---|
committer | barner <barner@FreeBSD.org> | 2005-11-10 18:29:33 +0800 |
commit | da78298e98e321e9a1b3f081befb2cf42bea5f3f (patch) | |
tree | e232a738d9f19c1dd827387211d46e2b0f3cb7cc /mail/fetchmail | |
parent | 600cc48ba86cbaad982202dd21ef010abcdeafa0 (diff) | |
download | freebsd-ports-gnome-da78298e98e321e9a1b3f081befb2cf42bea5f3f.tar.gz freebsd-ports-gnome-da78298e98e321e9a1b3f081befb2cf42bea5f3f.tar.zst freebsd-ports-gnome-da78298e98e321e9a1b3f081befb2cf42bea5f3f.zip |
- fix IMAP client timeout bug with upstream servers that do not send updated
EXISTS counts after acknowledging EXPUNGE see <http://bugs.debian.org/314509>
- add fetchmailconf wrapper check for _tkinter.so (if python was installed but
not Tkinter, the wrapper would still try to run fetchmailconf.bin, which
gives a less clear error message to the user than was intended)
- let fetchmailconf wrapper pass command line arguments to fetchmailconf.bin
(it supports -d and -f FILE)
- replace PREFIX with LOCALBASE where appropriate
- bump PORTREVISION
Submitted by: Matthias Andree <matthias.andree@gmx.de>
PR: ports/88444
Diffstat (limited to 'mail/fetchmail')
-rw-r--r-- | mail/fetchmail/Makefile | 6 | ||||
-rw-r--r-- | mail/fetchmail/files/fetchmailconf | 27 | ||||
-rw-r--r-- | mail/fetchmail/files/patch-imap.c | 18 |
3 files changed, 36 insertions, 15 deletions
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile index 7a9c70556f36..3c1461a32e1e 100644 --- a/mail/fetchmail/Makefile +++ b/mail/fetchmail/Makefile @@ -11,7 +11,7 @@ PORTNAME= fetchmail PORTVERSION= 6.2.5.2 -PORTREVISION= 1 +PORTREVISION= 3 CATEGORIES= mail ipv6 MASTER_SITES= http://download.berlios.de/%SUBDIR%/:fetchmail_site,fetchmailconf_site \ http://www.catb.org/~esr/%SUBDIR%/:fetchmail_site \ @@ -112,10 +112,10 @@ pre-patch: # Use fetchmailconf-1.43.2 to avoid a password exposure # caused by insecure file creation @${GZCAT} ${DISTDIR}/fetchmailconf-${FETCHMAILCONF_VER}.gz | \ - ${SED} -e "s,^#!/.*/python,#!${PREFIX}/bin/python,g" \ + ${SED} -e "s,^#!/.*/python,#!${LOCALBASE}/bin/python,g" \ > ${WRKDIR}/fetchmailconf.temp @${MV} -f ${WRKDIR}/fetchmailconf.temp ${WRKSRC}/fetchmailconf - @${SED} -e "s,@PREFIX@,${PREFIX},g" \ + @${SED} -e "s,@LOCALBASE@,${LOCALBASE},g" \ ${FILESDIR}/fetchmailconf > ${WRKDIR}/fetchmailconf @${REINPLACE_CMD} -e "s,@l@,,;s,@GT_NO@,," \ ${WRKSRC}/intl/Makefile.in diff --git a/mail/fetchmail/files/fetchmailconf b/mail/fetchmail/files/fetchmailconf index 48312bbb5f4e..70e8f79e1e4c 100644 --- a/mail/fetchmail/files/fetchmailconf +++ b/mail/fetchmail/files/fetchmailconf @@ -1,19 +1,22 @@ #!/bin/sh # -# Wrapper for the real fetchmailconf. Checks whether Python is installed, -# and runs the real fetchmailconf or alerts the user, as appropriate. +# Wrapper for the real fetchmailconf. Checks whether Python and Tkinter are +# installed, and runs the real fetchmailconf or alerts the user, as appropriate. # # $FreeBSD$ -PREFIX=@PREFIX@ +LOCALBASE=@LOCALBASE@ -if [ -e $PREFIX/bin/python ]; then - exec $PREFIX/libexec/fetchmailconf.bin -else - cat <<EOF -The fetchmailconf program requires Python with Tkinter, which does not -appear to be installed on this system. Python/Tkinter can be found in -the FreeBSD Ports Collection under x11-toolkits/py-tkinter. -EOF - exit 1 +if [ -x $LOCALBASE/bin/python ] ; then + PYTHON_VERSION=python$(${LOCALBASE}/bin/python -c 'import sys; print sys.version[:3]' 2>/dev/null) + if [ -e ${LOCALBASE}/lib/${PYTHON_VERSION}/site-packages/_tkinter.so ]; then + exec ${LOCALBASE}/libexec/fetchmailconf.bin "$@" + fi fi +cat <<EOF +The fetchmailconf program requires Python with Tkinter, which does +not appear to be installed on this system. Python can be found in +the FreeBSD Ports Collection in lang/python, and Tkinter for Python +can be found in x11-toolkits/py-tkinter. +EOF +exit 1 diff --git a/mail/fetchmail/files/patch-imap.c b/mail/fetchmail/files/patch-imap.c new file mode 100644 index 000000000000..55347c15c2fe --- /dev/null +++ b/mail/fetchmail/files/patch-imap.c @@ -0,0 +1,18 @@ +--- ./imap.c.orig 2003-10-15 21:17:41.000000000 +0200 ++++ ./imap.c 2005-10-29 15:19:58.000000000 +0200 +@@ -105,6 +105,15 @@ + { + recentcount = atoi(buf+2); + } ++ /* servers are not required to update the EXISTS counts, ++ * so count down by ourselves */ ++ else if (strstr(buf, " EXPUNGE")) ++ { ++ if (atoi(buf+2) > 0) { ++ if (count > 0) ++ count --; ++ } ++ } + else if (strstr(buf, "PREAUTH")) + preauth = TRUE; + /* |