mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-02 01:20:54 +00:00
multimedia/py-periscope: Make compatile with PYTHON 3
This commit is contained in:
parent
7140fbfe32
commit
23a5bd934b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=498826
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= periscope
|
||||
PORTVERSION= 0.2.4
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= multimedia python
|
||||
MASTER_SITES= https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/periscope/
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
@ -17,21 +17,39 @@ COMMENT= Subtitles searching module
|
||||
|
||||
LICENSE= LGPL3
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/BeautifulSoup.py:www/py-beautifulsoup32@${PY_FLAVOR}
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=4:www/py-beautifulsoup@${PY_FLAVOR}
|
||||
RUN_DEPENDS:= ${BUILD_DEPENDS}
|
||||
|
||||
USE_PYTHON= distutils autoplist
|
||||
NO_WRKSUBDIR= yes
|
||||
USES= desktop-file-utils python:2.7
|
||||
USES= desktop-file-utils python
|
||||
USE_PYTHON= autoplist distutils
|
||||
|
||||
OPTIONS_DEFINE= UNRAR
|
||||
OPTIONS_DEFAULT= UNRAR
|
||||
UNRAR_RUN_DEPENDS= unrar:archivers/unrar
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
PLIST_FILES= share/applications/periscope.desktop
|
||||
NO_ARCH= yes
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|from BeautifulSoup import|from bs4 import|' \
|
||||
${WRKSRC}/periscope/plugins/Podnapisi.py \
|
||||
${WRKSRC}/periscope/plugins/Subtitulos.py \
|
||||
${WRKSRC}/periscope/plugins/SubsWiki.py \
|
||||
${WRKSRC}/periscope/plugins/Addic7ed.py \
|
||||
${WRKSRC}/periscope/plugins/SubScene.py
|
||||
${REINPLACE_CMD} -e 's|import os, re, BeautifulSoup|import os, re, bs4|' \
|
||||
${WRKSRC}/periscope/plugins/TvSubtitles.py
|
||||
|
||||
pre-build:
|
||||
.if ${PYTHON_REL} >= 3000
|
||||
@${LOCALBASE}/bin/2to3-${PYTHON_VER} --no-diffs --nobackups --verbose --write \
|
||||
${WRKSRC}/
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/periscope.desktop \
|
||||
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/periscope.desktop \
|
||||
${STAGEDIR}${DESKTOPDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user