diff options
author | Simon Barner <barner@FreeBSD.org> | 2005-11-10 10:29:33 +0000 |
---|---|---|
committer | Simon Barner <barner@FreeBSD.org> | 2005-11-10 10:29:33 +0000 |
commit | 265245fa11437da42fb3fee7a7f96d3303212a5f (patch) | |
tree | 68c60a6dd51b16acb95fa723c505be3c41386711 /mail/fetchmail/files | |
parent | 4be02dbe27b8aad8fb274a78ac05f069c3bf20e4 (diff) |
Notes
Diffstat (limited to 'mail/fetchmail/files')
-rw-r--r-- | mail/fetchmail/files/fetchmailconf | 27 | ||||
-rw-r--r-- | mail/fetchmail/files/patch-imap.c | 18 |
2 files changed, 33 insertions, 12 deletions
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; + /* |