mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-17 08:01:36 +00:00
- Update to 0.5.0
- Add www/youtube_dl to run dependencies - Add a couple of patches to support youtube_dl backend (the interna backend is faster but does not work at the moment) Changelog: https://github.com/mps-youtube/pafy/releases/tag/v0.5.0
This commit is contained in:
parent
fa563c24a9
commit
6654a4f4ff
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=410515
@ -2,8 +2,8 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pafy
|
||||
PORTVERSION= 0.3.74
|
||||
#PORTREVISION= 0
|
||||
PORTVERSION= 0.5.0
|
||||
PORTREVISION= 0
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
@ -13,9 +13,15 @@ COMMENT= Python API for YouTube
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
USES= python
|
||||
USE_PYTHON= autoplist distutils
|
||||
# At the moment the internal backend does not work
|
||||
BUILD_DEPENDS= youtube_dl>=2016.02.22:${PORTSDIR}/www/youtube_dl
|
||||
RUN_DEPENDS= youtube_dl>=2016.02.22:${PORTSDIR}/www/youtube_dl
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTFILES:R:R}
|
||||
USES= python
|
||||
USE_PYTHON= autoplist concurrent distutils
|
||||
|
||||
post-patch:
|
||||
@(cd ${WRKSRC}/${PORTNAME} && \
|
||||
${REINPLACE_CMD} "s,%%LOCALBASE%%,${LOCALBASE},1" pafy.py backend_youtube_dl.py)
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (pafy-0.3.74.tar.gz) = dcd89f9579a58f3ba1c6ac50f24e309400fe546a8ccf2ec3d115dfcf77a54b0e
|
||||
SIZE (pafy-0.3.74.tar.gz) = 22584
|
||||
SHA256 (pafy-0.5.0.tar.gz) = fc451048518e5095346c8a359ca367697e9867b915bd05ea73960c6c594bc9e0
|
||||
SIZE (pafy-0.5.0.tar.gz) = 26392
|
||||
|
12
www/py-pafy/files/patch-pafy_backend__youtube__dl.py
Normal file
12
www/py-pafy/files/patch-pafy_backend__youtube__dl.py
Normal file
@ -0,0 +1,12 @@
|
||||
--- pafy/backend_youtube_dl.py.orig 2016-03-05 21:47:16 UTC
|
||||
+++ pafy/backend_youtube_dl.py
|
||||
@@ -8,6 +8,9 @@ if sys.version_info[:2] >= (3, 0):
|
||||
else:
|
||||
uni = unicode
|
||||
|
||||
+if sys.platform.startswith('freebsd'):
|
||||
+ # FreeBSD installs youtube_dl as a zip archive
|
||||
+ sys.path.insert(1, '%%LOCALBASE%%/bin/youtube-dl')
|
||||
import youtube_dl
|
||||
|
||||
from . import g
|
12
www/py-pafy/files/patch-pafy_pafy.py
Normal file
12
www/py-pafy/files/patch-pafy_pafy.py
Normal file
@ -0,0 +1,12 @@
|
||||
--- pafy/pafy.py.orig 2016-02-28 21:11:10 UTC
|
||||
+++ pafy/pafy.py
|
||||
@@ -45,6 +45,9 @@ Pafy = None
|
||||
backend = "internal"
|
||||
if os.environ.get("PAFY_BACKEND") != "internal":
|
||||
try:
|
||||
+ if sys.platform.startswith('freebsd'):
|
||||
+ # FreeBSD installs youtube_dl as a zip archive
|
||||
+ sys.path.insert(1, '%%LOCALBASE%%/bin/youtube-dl')
|
||||
import youtube_dl
|
||||
backend = "youtube-dl"
|
||||
except ImportError:
|
Loading…
Reference in New Issue
Block a user