Date: Sat, 13 Apr 2019 19:16:49 +0000 (UTC) From: Muhammad Moinur Rahman <bofh@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r498826 - head/multimedia/py-periscope Message-ID: <201904131916.x3DJGnvC099685@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bofh Date: Sat Apr 13 19:16:49 2019 New Revision: 498826 URL: https://svnweb.freebsd.org/changeset/ports/498826 Log: multimedia/py-periscope: Make compatile with PYTHON 3 Modified: head/multimedia/py-periscope/Makefile Modified: head/multimedia/py-periscope/Makefile ============================================================================== --- head/multimedia/py-periscope/Makefile Sat Apr 13 19:11:38 2019 (r498825) +++ head/multimedia/py-periscope/Makefile Sat Apr 13 19:16:49 2019 (r498826) @@ -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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904131916.x3DJGnvC099685>