aboutsummaryrefslogtreecommitdiff
path: root/mail/fetchmailconf
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2020-02-20 00:01:58 +0000
committerMatthias Andree <mandree@FreeBSD.org>2020-02-20 00:01:58 +0000
commit62f20915eb3061d2a802cedbfb0f28c1554ab8ce (patch)
tree90d1d502e32e4fa0ccaad281be63de3c432e3b40 /mail/fetchmailconf
parent9a9f11b70482e4ae163737758af2fc1a72cd14e4 (diff)
Notes
Diffstat (limited to 'mail/fetchmailconf')
-rw-r--r--mail/fetchmailconf/Makefile23
-rw-r--r--mail/fetchmailconf/files/patch-fetchmailconf.py24
2 files changed, 40 insertions, 7 deletions
diff --git a/mail/fetchmailconf/Makefile b/mail/fetchmailconf/Makefile
index f5e4287da235..7e26b6e8be22 100644
--- a/mail/fetchmailconf/Makefile
+++ b/mail/fetchmailconf/Makefile
@@ -2,22 +2,27 @@
PORTNAME= fetchmailconf
DISTNAME= fetchmail-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
+# NOTE: MASTER_SITES in ../fetchmail must NOT use the $PORTNAME variable,
+# else _this_ port (fetchmailconf) becomes unfetchable
MAINTAINER= chalpin@cs.wisc.edu
COMMENT= Python-based GUI to configure fetchmail
-# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244130 has an update to get it
-# compatible to Python 3.
-
LICENSE= GPLv2 LGPL21
LICENSE_COMB= dual
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter@${PY_FLAVOR} \
+# minimum required version 6.4.2 - not codified, on the assumption
+# that fetchmail port updated at the same time
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}future>=0:devel/py-future@${PY_FLAVOR} \
fetchmail>=${PORTVERSION}:mail/fetchmail
+RUN_DEPENDS+= ${BUILD_DEPENDS}
-USES= python:2.7 shebangfix tar:xz
+USES= python shebangfix tar:xz
+USE_PYTHON= py3kplist
FILESDIR= ${.CURDIR}/files
+PATCHDIR= ${FILESDIR}
SUB_FILES= fetchmailconf
SUB_LIST= PYTHON_CMD=${PYTHON_CMD} PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
@@ -30,8 +35,12 @@ ALL_TARGET= fetchmailconf
INSTALL_TARGET= install-data-am install-nodist_binSCRIPTS install-man
post-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${STAGEDIR}${PREFIX}/bin
- ${RM} ${STAGEDIR}${PREFIX}/man/man1/fetchmail.1*
+# first, run smoke tests - the version check makes sure we have all
+# modules listed in the *_DEPENDS variables:
+ ${PYTHON_CMD} ${WRKSRC}/fetchmailconf.py -V
+# then install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${STAGEDIR}${PREFIX}/bin
+ ${RM} ${STAGEDIR}${PREFIX}/man/man1/fetchmail.1*
MASTERDIR= ${.CURDIR}/../fetchmail
diff --git a/mail/fetchmailconf/files/patch-fetchmailconf.py b/mail/fetchmailconf/files/patch-fetchmailconf.py
new file mode 100644
index 000000000000..0e6953efb7a7
--- /dev/null
+++ b/mail/fetchmailconf/files/patch-fetchmailconf.py
@@ -0,0 +1,24 @@
+--- fetchmailconf.py.orig 2020-01-31 20:22:54 UTC
++++ fetchmailconf.py
+@@ -2132,10 +2132,6 @@ def copy_instance(toclass, fromdict):
+
+ if __name__ == '__main__':
+
+- if "DISPLAY" not in os.environ:
+- print("fetchmailconf must be run under X")
+- sys.exit(1)
+-
+ fetchmail_icon = """
+ R0lGODdhPAAoAPcAAP///wgICBAQEISEhIyMjJSUlKWlpa2trbW1tcbGxs7Ozufn5+/v7//39yEY
+ GNa9tUoxKZyEe1o5KTEQAN7OxpyMhIRjUvfn3pxSKYQ5EO/Wxv/WvWtSQrVzSmtCKWspAMatnP/e
+@@ -2202,6 +2198,10 @@ fetchmailconf comes with ABSOLUTELY NO WARRANTY. This
+ welcome to redistribute it under certain conditions. Please see the file
+ COPYING in the source or documentation directory for details.""")
+ sys.exit(0)
++
++ if "DISPLAY" not in os.environ:
++ print("fetchmailconf must be run under X")
++ sys.exit(1)
+
+ # Get client host's FQDN
+ hostname = socket.gethostname()