diff options
author | koobs <koobs@FreeBSD.org> | 2019-04-14 16:48:02 +0800 |
---|---|---|
committer | Koop Mast <koop@beyonit.nl> | 2019-04-23 03:00:41 +0800 |
commit | 321872cab2bb695925cc2cb20bc53871d356ca5a (patch) | |
tree | 08c87208546224502793a9b6d1cecc19e7f539da /mail/archivemail | |
parent | 3fab78633ba8516ec6a2d3a11f8e78f3989bcae5 (diff) | |
download | freebsd-ports-gnome-321872cab2bb695925cc2cb20bc53871d356ca5a.tar.gz freebsd-ports-gnome-321872cab2bb695925cc2cb20bc53871d356ca5a.tar.zst freebsd-ports-gnome-321872cab2bb695925cc2cb20bc53871d356ca5a.zip |
mail/archivemail: Limit to Python 2.7, level up port compliance
archivemail fails to build with Python 3.x [1]:
print too_old_error
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(too_old_error)?
Limit to Python 2.7 accordingly.
While I'm here, level up port compliance:
- Update COMMENT to match setup.py:description
- Use distutils/autoplist/concurrent (package uses a setup.py). Remove
NO_BUILD, do-install target, amend pkg-plist accordingly.
- Patch setup.py to install man pages in /usr/local not /usr/local/share
- Add test target to assist QA
PR: 237179 [1]
Reported by: Helge Oldach <freebsd oldach net> [1]
MFH: 2019Q2
Diffstat (limited to 'mail/archivemail')
-rw-r--r-- | mail/archivemail/Makefile | 22 | ||||
-rw-r--r-- | mail/archivemail/files/patch-setup.py | 9 | ||||
-rw-r--r-- | mail/archivemail/pkg-plist | 2 |
3 files changed, 21 insertions, 12 deletions
diff --git a/mail/archivemail/Makefile b/mail/archivemail/Makefile index a500a9bb853f..8514d696b471 100644 --- a/mail/archivemail/Makefile +++ b/mail/archivemail/Makefile @@ -3,30 +3,29 @@ PORTNAME= archivemail PORTVERSION= 0.9.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= SF/${PORTNAME}/ +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= ports@FreeBSD.org -COMMENT= Archive or delete mail older than N days +COMMENT= Archive and compress old email LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= python shebangfix -NO_BUILD= yes -NO_ARCH= yes -SHEBANG_FILES= archivemail \ - test_archivemail +USES= python:2.7 shebangfix + +USE_PYTHON= distutils concurrent autoplist + +SHEBANG_FILES= test_archivemail DOCS= CHANGELOG FAQ NEWS README TODO EXAMPLES= test_archivemail examples/archivemail_all OPTIONS_DEFINE= DOCS EXAMPLES -do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/archivemail ${STAGEDIR}${PREFIX}/bin/archivemail - ${INSTALL_MAN} ${WRKSRC}/archivemail.1 ${STAGEDIR}${MANPREFIX}/man/man1 +NO_ARCH= yes do-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} @@ -36,4 +35,7 @@ do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR} +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} test_archivemail + .include <bsd.port.mk> diff --git a/mail/archivemail/files/patch-setup.py b/mail/archivemail/files/patch-setup.py new file mode 100644 index 000000000000..af2587ae927e --- /dev/null +++ b/mail/archivemail/files/patch-setup.py @@ -0,0 +1,9 @@ +--- setup.py.orig 2019-04-14 08:03:17 UTC ++++ setup.py +@@ -29,5 +29,5 @@ setup(name="archivemail", + maintainer="Nikolaus Schulz, Peter Poeml", + maintainer_email="nikosch@users.sourceforge.net, poeml@users.sourceforge.net", + scripts=["archivemail"], +- data_files=[("share/man/man1", ["archivemail.1"])], ++ data_files=[("man/man1", ["archivemail.1"])], + ) diff --git a/mail/archivemail/pkg-plist b/mail/archivemail/pkg-plist index 0e86ce31985a..bb92d18d6aa0 100644 --- a/mail/archivemail/pkg-plist +++ b/mail/archivemail/pkg-plist @@ -1,5 +1,3 @@ -bin/archivemail -man/man1/archivemail.1.gz %%PORTDOCS%%%%DOCSDIR%%/CHANGELOG %%PORTDOCS%%%%DOCSDIR%%/FAQ %%PORTDOCS%%%%DOCSDIR%%/NEWS |