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)
This commit is contained in:
parent
82a687f6d1
commit
b9cf5c131f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=504995
@ -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>
|
||||
|
@ -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 "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user