aboutsummaryrefslogtreecommitdiff
path: root/deskutils
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2019-06-23 22:32:33 +0000
committerKai Knoblich <kai@FreeBSD.org>2019-06-23 22:32:33 +0000
commitb9cf5c131fbc330c8f1caa4eb1856411ad05ef47 (patch)
tree33cf49bf8562e7d68eb4feb2cba3dcfaf048378b /deskutils
parent82a687f6d199f426ba93c54cfee7638d63abe275 (diff)
downloadports-b9cf5c131fbc330c8f1caa4eb1856411ad05ef47.tar.gz
ports-b9cf5c131fbc330c8f1caa4eb1856411ad05ef47.zip
deskutils/conkyemail: Fix invocation of Python script at runtime
Since the default version of Python has been switched to 3.6 in r498529 the script "conkyEmail.py" that is invoked by the shell script "conkyEmail" fails at runtime due incompatible code. This occurs only if the Python meta port is also installed otherwise it won't start at all due a hardcoded reference (= /usr/bin/env python) in the shell script, thus: * Update and simplify the patch for "conkyEmail" by using placeholders for the Python interpreter and ${DATADIR} that will be replaced by the post-patch target. [1] Also while I'm here: * Silence all commands of the post-patch target to reduce cluttering of logfiles * Add license information * Pet portlint PR: 238487 Submitted by: Katsuyuki Miyoshi <katsubsd@gmail.com> (initial patch) MFH: 2019Q2 (blanket, runtime fix and framework compliance)
Notes
Notes: svn path=/head/; revision=504995
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/conkyemail/Makefile11
-rw-r--r--deskutils/conkyemail/files/patch-conkyEmail9
2 files changed, 14 insertions, 6 deletions
diff --git a/deskutils/conkyemail/Makefile b/deskutils/conkyemail/Makefile
index 2657107a4202..ffc3d801a980 100644
--- a/deskutils/conkyemail/Makefile
+++ b/deskutils/conkyemail/Makefile
@@ -3,6 +3,7 @@
PORTNAME= conkyemail
PORTVERSION= 2.07
+PORTREVISION= 1
CATEGORIES= deskutils
MASTER_SITES= http://launchpadlibrarian.net/28462213/ \
LOCAL/vg
@@ -11,18 +12,24 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Email script for conky
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/COPYING
+
RUN_DEPENDS= conky:sysutils/conky
USES= python:2.7
USE_PYTHON= distutils
+
NO_BUILD= yes
NO_ARCH= yes
WRKSRC= ${WRKDIR}/src
post-patch:
- cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,/usr/share/${PORTNAME},${DATADIR},g' \
+ @cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,/usr/share/${PORTNAME},${DATADIR},g; \
+ s,%%DATADIR%%,${DATADIR},; \
+ s,%%PYTHON_CMD%%,${PYTHON_CMD},' \
conkyEmail conkyEmail.py setup.py example/conkyrc
- cd ${WRKSRC} && ${RM} -r example/conkyrc.bak
+ @cd ${WRKSRC} && ${RM} -r example/conkyrc.bak
.include <bsd.port.mk>
diff --git a/deskutils/conkyemail/files/patch-conkyEmail b/deskutils/conkyemail/files/patch-conkyEmail
index 981f89d7f1cd..0771ca05b240 100644
--- a/deskutils/conkyemail/files/patch-conkyEmail
+++ b/deskutils/conkyemail/files/patch-conkyEmail
@@ -1,7 +1,8 @@
---- conkyEmail.orig 2008-09-09 06:12:46.000000000 +0800
-+++ conkyEmail 2010-05-08 02:28:45.000000000 +0800
+--- conkyEmail.orig 2008-09-08 22:12:46 UTC
++++ conkyEmail
@@ -1,3 +1,3 @@
#! /bin/sh
- cd /usr/share/conkyemail/
+-cd /usr/share/conkyemail/
-$PYTHONPATH /usr/bin/python /usr/share/conkyemail/conkyEmail.py "$@"
-+$PYTHONPATH /usr/bin/env python /usr/share/conkyemail/conkyEmail.py "$@"
++cd %%DATADIR%%
++%%PYTHON_CMD%% %%DATADIR%%/conkyEmail.py "$@"