sysutils/py-ranger: Respect hier(7) and make concurrent safe
Documentation related files were installed into ${PREFIX}/doc instead of ${PREFIX}/share/doc. [1] Take this opportunity too to make the port concurrent safe as it installs beside documentation also scripts and a desktop entry. Introduce an appropriate workaround for the desktop entry by prefixing the filename after the corresponding Python flavor and also take care for the script executable. Add "desktop-file-utils" to USES to update the desktop database and reduce warnings in the stage QA. Remove "python_OLD_CMD" that is no longer required and place a "do-test" target with the required dependencies to easen QA related tasks in future. PR: 237775 Reported by: Ting-Wei Lan <lantw44@gmail.com> [1] Approved by: maintainer timeout (14 days)
This commit is contained in:
parent
e8d740f485
commit
49200ee418
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=507998
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= ranger
|
||||
PORTVERSION= 1.9.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils python
|
||||
MASTER_SITES= https://ranger.github.io/
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
@ -11,15 +12,29 @@ MAINTAINER= linpct@gmail.com
|
||||
COMMENT= Ranger is a file manager with VI key bindings
|
||||
|
||||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
|
||||
|
||||
USES= desktop-file-utils python shebangfix
|
||||
USE_PYTHON= autoplist concurrent distutils
|
||||
|
||||
USES= python shebangfix
|
||||
SHEBANG_FILES= doc/tools/*.py
|
||||
python_OLD_CMD= /bin/python
|
||||
USE_PYTHON= autoplist distutils
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
post-extract:
|
||||
@${MV} ${WRKSRC}/doc/ranger.desktop ${WRKSRC}/doc/${PYTHON_PKGNAMEPREFIX}ranger.desktop
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|setuptools|distutils.core|; s|share/man/man|man/man|;s|share/doc|doc|' ${WRKSRC}/${PYSETUP}
|
||||
@${REINPLACE_CMD} -e 's|setuptools|distutils.core|; \
|
||||
s|share/man/man|man/man|; \
|
||||
s|share/doc/ranger|${DOCSDIR}|; \
|
||||
s|ranger.desktop|${PYTHON_PKGNAMEPREFIX}ranger.desktop|' ${WRKSRC}/${PYSETUP}
|
||||
@${REINPLACE_CMD} -Ee 's|Exec=(ranger)|Exec=\1-${PYTHON_VER}|' ${WRKSRC}/doc/${PYTHON_PKGNAMEPREFIX}ranger.desktop
|
||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/ranger/ext/img_display.py
|
||||
|
||||
do-test:
|
||||
@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -rs -v
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user