Index: head/multimedia/py-periscope/Makefile =================================================================== --- head/multimedia/py-periscope/Makefile (revision 498825) +++ head/multimedia/py-periscope/Makefile (revision 498826) @@ -1,37 +1,55 @@ # Created by: Mario Sergio Fujikawa Ferreira # $FreeBSD$ 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} DISTFILES= python-${PORTNAME}_${PORTVERSION}.orig${EXTRACT_SUFX} \ periscope.desktop DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= python-${PORTNAME}_${PORTVERSION}.orig${EXTRACT_SUFX} MAINTAINER= bofh@FreeBSD.org 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 +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 +.include