aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authormadpilot <madpilot@FreeBSD.org>2017-07-09 18:13:49 +0800
committermadpilot <madpilot@FreeBSD.org>2017-07-09 18:13:49 +0800
commita6925dc83154e59c1005d134d40a3a2db838a9f2 (patch)
tree868a8777ba05e44851acf8a5f38844814a769a58 /deskutils
parentf0d48bcda80fa4203220a5c57c69c55214bbabaa (diff)
downloadfreebsd-ports-gnome-a6925dc83154e59c1005d134d40a3a2db838a9f2.tar.gz
freebsd-ports-gnome-a6925dc83154e59c1005d134d40a3a2db838a9f2.tar.zst
freebsd-ports-gnome-a6925dc83154e59c1005d134d40a3a2db838a9f2.zip
- Fix python shebangs [1]
While here: - Remove unneeded include bsd.port.pre/post.mk - Use PREFIX and LOCALBASE substitutions in startup script PR: 220574 [1] Submitted by: Igor Pavlov <igor.arabesc.pavlov@gmail.com>
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/calibre/Makefile14
-rw-r--r--deskutils/calibre/files/calibre.in4
2 files changed, 10 insertions, 8 deletions
diff --git a/deskutils/calibre/Makefile b/deskutils/calibre/Makefile
index 9c8a62bd70ab..006f26812add 100644
--- a/deskutils/calibre/Makefile
+++ b/deskutils/calibre/Makefile
@@ -3,6 +3,7 @@
PORTNAME= calibre
PORTVERSION= 3.3.0
+PORTREVISION= 1
CATEGORIES= deskutils python
MASTER_SITES= http://download.calibre-ebook.com/${PORTVERSION}/
@@ -50,10 +51,9 @@ EXTRACT_BEFORE_ARGS= -x -s '/^calibre/~-src/' -f
USES= desktop-file-utils gettext-runtime gnome localbase:ldflags pkgconfig \
python:2 pyqt:5 shared-mime-info shebangfix ssl tar:xz
-SHEBANG_FILES= resources/calibre-portable.sh \
- src/calibre/ebooks/metadata/odt.py \
- src/calibre/utils/*.py \
- src/odf/*.py
+SHEBANG_GLOB= *.sh *.py
+python_OLD_CMD= "/usr/bin/env python" /bin/python /usr/bin/python /usr/local/bin/python \
+ "/usr/bin/env python2" /bin/python2 /usr/bin/python2 /usr/local/bin/python2
USE_PYQT= core gui network sip svg webkit widgets webkitwidgets xmlpatterns
USE_QT5= buildtools_build core dbus gui qmake_build widgets
USE_GL= egl gl
@@ -73,7 +73,9 @@ MAKE_ENV+= FC_INC_DIR="${LOCALBASE}/include/fontconfig" \
XDG_UTILS_INSTALL_MODE=system \
QMAKE=${QMAKE}
-.include <bsd.port.pre.mk>
+post-patch:
+ @${REINPLACE_CMD} -e "s|#!/usr/bin/env python2|#!${PYTHON_CMD}|" \
+ ${WRKSRC}/setup/install.py
do-build:
@${MKDIR} ${WRKDIR}/calibre-config ${WRKDIR}/xdg-config
@@ -96,4 +98,4 @@ do-install:
@${RMDIR} ${STAGEDIR}${PREFIX}/share/desktop-directories
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/calibre/calibre/plugins/*
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/deskutils/calibre/files/calibre.in b/deskutils/calibre/files/calibre.in
index 98d56310b171..62b078a1d52d 100644
--- a/deskutils/calibre/files/calibre.in
+++ b/deskutils/calibre/files/calibre.in
@@ -43,8 +43,8 @@ load_rc_config $name
: ${calibre_logsize:=10}
pidfile=/var/run/${name}/${name}.pid
-command=/usr/local/bin/calibre-server
-command_interpreter=python2
+command=%%PREFIX%%/bin/calibre-server
+command_interpreter=%%LOCALBASE%%/bin/python2.7
required_dirs=${calibre_library}
start_precmd=calibre_prestart