svn commit: r445400 - in head/deskutils/calibre: . files
Guido Falsi
madpilot at FreeBSD.org
Sun Jul 9 10:13:50 UTC 2017
Author: madpilot
Date: Sun Jul 9 10:13:49 2017
New Revision: 445400
URL: https://svnweb.freebsd.org/changeset/ports/445400
Log:
- 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 at gmail.com>
Modified:
head/deskutils/calibre/Makefile
head/deskutils/calibre/files/calibre.in
Modified: head/deskutils/calibre/Makefile
==============================================================================
--- head/deskutils/calibre/Makefile Sun Jul 9 10:07:37 2017 (r445399)
+++ head/deskutils/calibre/Makefile Sun Jul 9 10:13:49 2017 (r445400)
@@ -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>
Modified: head/deskutils/calibre/files/calibre.in
==============================================================================
--- head/deskutils/calibre/files/calibre.in Sun Jul 9 10:07:37 2017 (r445399)
+++ head/deskutils/calibre/files/calibre.in Sun Jul 9 10:13:49 2017 (r445400)
@@ -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
More information about the svn-ports-all
mailing list