1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-31 10:46:16 +00:00

- 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>
This commit is contained in:
Guido Falsi 2017-07-09 10:13:49 +00:00
parent 38ffe5f459
commit 229050e23b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=445400
2 changed files with 10 additions and 8 deletions

View File

@ -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>

View File

@ -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