View | Details | Raw Unified | Return to bug 254376 | Differences between
and this patch

Collapse All | Expand All

(-)b/www/yt-dlp/Makefile (-12 / +18 lines)
Lines 1-32 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	yt-dlp
3
PORTNAME=	yt-dlp
4
DISTVERSION=	2021.02.09
4
DISTVERSION=	2021.03.21
5
CATEGORIES=	www
5
CATEGORIES=	www
6
6
7
MAINTAINER=	yuri@FreeBSD.org
7
MAINTAINER=	yuri@FreeBSD.org
8
COMMENT=	Command-line program to download videos from youtube & other platforms
8
COMMENT=	Command-line program for downloading videos from various platforms
9
9
10
LICENSE=	UNLICENSE
10
LICENSE=	UNLICENSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
12
13
BUILD_DEPENDS=	zip:archivers/zip \
13
USES=		gmake python shebangfix
14
		pandoc:textproc/hs-pandoc
14
SHEBANG_GLOB=	devscripts/*.py
15
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mutagen>0:audio/py-mutagen@${PY_FLAVOR}
16
17
USES=		gmake python
18
USE_PYTHON=	distutils autoplist noflavors
19
15
20
USE_GITHUB=	yes
16
USE_GITHUB=	yes
21
GH_ACCOUNT=	pukkandan
22
17
23
MAKE_ARGS=	PYTHON=${PYTHON_CMD}
18
MAKE_ARGS=	PYTHON=${PYTHON_CMD}
24
19
25
NO_ARCH=	yes
20
NO_ARCH=	yes
26
21
27
POST_PLIST=	fix-plist
22
OPTIONS_DEFINE=		FFMPEG MUTAGEN RTMPDUMP SYMLINK
23
OPTIONS_DEFAULT=	FFMPEG RTMPDUMP
24
OPTIONS_SUB=	yes
25
26
MUTAGEN_DESC=	Thumbnail support via Mutagen
27
RTMPDUMP_DESC=	Use rtmpdump to download rtmp video streams
28
SYMLINK_DESC=	Install youtube-dl symbolic link for executable
29
30
FFMPEG_RUN_DEPENDS=	ffprobe:multimedia/ffmpeg
31
MUTAGEN_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mutagen>0:audio/py-mutagen@${PY_FLAVOR}
32
RTMPDUMP_RUN_DEPENDS=	rtmpdump:multimedia/rtmpdump
33
SYMLINK_CONFLICTS=	youtube_dl
28
34
29
pre-build:
35
post-install-SYMLINK-on:
30
	@cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET}
36
	@${RLN} ${STAGEDIR}${PREFIX}/bin/yt-dlp ${STAGEDIR}${PREFIX}/bin/youtube-dl
31
37
32
.include <bsd.port.mk>
38
.include <bsd.port.mk>
(-)b/www/yt-dlp/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1613182214
1
TIMESTAMP = 1616435138
2
SHA256 (pukkandan-yt-dlp-2021.02.09_GH0.tar.gz) = 5ed76891ba256b5554bcb7238345d53fcfbf051a1e03747574568011012a5a67
2
SHA256 (yt-dlp-yt-dlp-2021.03.21_GH0.tar.gz) = 626716166e1a2099305e0a4aa9dedc133a66c5cca040b26386a9288ecb029fcf
3
SIZE (pukkandan-yt-dlp-2021.02.09_GH0.tar.gz) = 1541519
3
SIZE (yt-dlp-yt-dlp-2021.03.21_GH0.tar.gz) = 1577437
(-)b/www/yt-dlp/files/patch-Makefile (+97 lines)
Added Link Here
1
--- Makefile.orig	2021-03-15 00:24:39 UTC
2
+++ Makefile
3
@@ -1,7 +1,8 @@
4
-all: yt-dlp doc pypi-files
5
+#all: yt-dlp doc pypi-files
6
+all: yt-dlp completions
7
 clean: clean-test clean-dist clean-cache
8
 completions: completion-bash completion-fish completion-zsh
9
-doc: README.md CONTRIBUTING.md issuetemplates supportedsites
10
+#doc: README.md CONTRIBUTING.md issuetemplates supportedsites
11
 ot: offlinetest
12
 tar: yt-dlp.tar.gz
13
 
14
@@ -32,17 +33,23 @@ SHAREDIR ?= $(PREFIX)/share
15
 PYTHON ?= /usr/bin/env python3
16
 
17
 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
18
-SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi)
19
+#SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi)
20
+SYSCONFDIR = $(PREFIX)/etc
21
 
22
 # set markdown input format to "markdown-smart" for pandoc version 2 and to "markdown" for pandoc prior to version 2
23
 MARKDOWN = $(shell if [ `pandoc -v | head -n1 | cut -d" " -f2 | head -c1` = "2" ]; then echo markdown-smart; else echo markdown; fi)
24
 
25
-install: yt-dlp yt-dlp.1 completions
26
+#install: yt-dlp yt-dlp.1 completions
27
+install: yt-dlp completions
28
 	install -Dm755 yt-dlp $(DESTDIR)$(BINDIR)
29
-	install -Dm644 yt-dlp.1 $(DESTDIR)$(MANDIR)/man1
30
-	install -Dm644 completions/bash/yt-dlp $(DESTDIR)$(SHAREDIR)/bash-completion/completions/yt-dlp
31
+	install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
32
+#	install -Dm644 completions/bash/yt-dlp $(DESTDIR)$(SHAREDIR)/bash-completion/completions/yt-dlp
33
+	install -Dm644 completions/bash/yt-dlp $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/yt-dlp
34
+	install -d $(DESTDIR)$(SHAREDIR)/zsh/site-functions
35
 	install -Dm644 completions/zsh/_yt-dlp $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_yt-dlp
36
-	install -Dm644 completions/fish/yt-dlp.fish $(DESTDIR)$(SHAREDIR)/fish/vendor_completions.d/yt-dlp.fish
37
+	install -d $(DESTDIR)$(SYSCONFDIR)/fish/completions
38
+#	install -Dm644 completions/fish/yt-dlp.fish $(DESTDIR)$(SYSCONFDIR)/fish/vendor_completions.d/yt-dlp.fish
39
+	install -Dm644 completions/fish/yt-dlp.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/yt-dlp.fish
40
 
41
 codetest:
42
 	flake8 .
43
@@ -74,36 +81,37 @@ yt-dlp: yt_dlp/*.py yt_dlp/*/*.py
44
 	done
45
 	touch -t 200001010101 zip/yt_dlp/*.py zip/yt_dlp/*/*.py
46
 	mv zip/yt_dlp/__main__.py zip/
47
-	cd zip ; zip -q ../yt-dlp yt_dlp/*.py yt_dlp/*/*.py __main__.py
48
+#	cd zip ; zip -q ../yt-dlp yt_dlp/*.py yt_dlp/*/*.py __main__.py
49
+	cd zip ; bsdtar -a -cf ../yt-dlp.zip yt_dlp/*.py yt_dlp/*/*.py __main__.py
50
 	rm -rf zip
51
 	echo '#!$(PYTHON)' > yt-dlp
52
 	cat yt-dlp.zip >> yt-dlp
53
 	rm yt-dlp.zip
54
 	chmod a+x yt-dlp
55
 
56
-README.md: yt_dlp/*.py yt_dlp/*/*.py
57
-	COLUMNS=80 $(PYTHON) yt_dlp/__main__.py --help | $(PYTHON) devscripts/make_readme.py
58
+#README.md: yt_dlp/*.py yt_dlp/*/*.py
59
+#	COLUMNS=80 $(PYTHON) yt_dlp/__main__.py --help | $(PYTHON) devscripts/make_readme.py
60
 
61
-CONTRIBUTING.md: README.md
62
-	$(PYTHON) devscripts/make_contributing.py README.md CONTRIBUTING.md
63
+#CONTRIBUTING.md: README.md
64
+#	$(PYTHON) devscripts/make_contributing.py README.md CONTRIBUTING.md
65
 
66
-issuetemplates: devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md .github/ISSUE_TEMPLATE_tmpl/5_feature_request.md yt_dlp/version.py
67
-	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md .github/ISSUE_TEMPLATE/1_broken_site.md
68
-	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md .github/ISSUE_TEMPLATE/2_site_support_request.md
69
-	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md
70
-	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md .github/ISSUE_TEMPLATE/4_bug_report.md
71
-	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/5_feature_request.md .github/ISSUE_TEMPLATE/5_feature_request.md
72
+#issuetemplates: devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md .github/ISSUE_TEMPLATE_tmpl/5_feature_request.md yt_dlp/version.py
73
+#	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/1_broken_site.md .github/ISSUE_TEMPLATE/1_broken_site.md
74
+#	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/2_site_support_request.md .github/ISSUE_TEMPLATE/2_site_support_request.md
75
+#	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/3_site_feature_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md
76
+#	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/4_bug_report.md .github/ISSUE_TEMPLATE/4_bug_report.md
77
+#	$(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl/5_feature_request.md .github/ISSUE_TEMPLATE/5_feature_request.md
78
 
79
 supportedsites:
80
 	$(PYTHON) devscripts/make_supportedsites.py supportedsites.md
81
 
82
-README.txt: README.md
83
-	pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
84
+#README.txt: README.md
85
+#	pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
86
 
87
-yt-dlp.1: README.md
88
-	$(PYTHON) devscripts/prepare_manpage.py yt-dlp.1.temp.md
89
-	pandoc -s -f $(MARKDOWN) -t man yt-dlp.1.temp.md -o yt-dlp.1
90
-	rm -f yt-dlp.1.temp.md
91
+#yt-dlp.1: README.md
92
+#	$(PYTHON) devscripts/prepare_manpage.py yt-dlp.1.temp.md
93
+#	pandoc -s -f $(MARKDOWN) -t man yt-dlp.1.temp.md -o yt-dlp.1
94
+#	rm -f yt-dlp.1.temp.md
95
 
96
 completions/bash/yt-dlp: yt_dlp/*.py yt_dlp/*/*.py devscripts/bash-completion.in
97
 	mkdir -p completions/bash
(-)b/www/yt-dlp/files/patch-yt__dlp_____init____.py (+29 lines)
Added Link Here
1
--- yt_dlp/__init__.py.orig	2021-03-18 03:08:48 UTC
2
+++ yt_dlp/__init__.py
3
@@ -38,7 +38,6 @@ from .utils import (
4
     std_headers,
5
     write_string,
6
 )
7
-from .update import update_self
8
 from .downloader import (
9
     FileDownloader,
10
 )
11
@@ -580,17 +579,9 @@ def _real_main(argv=None):
12
         if opts.rm_cachedir:
13
             ydl.cache.remove()
14
 
15
-        # Update version
16
-        if opts.update_self:
17
-            # If updater returns True, exit. Required for windows
18
-            if update_self(ydl.to_screen, opts.verbose, ydl._opener):
19
-                if actual_use:
20
-                    sys.exit('ERROR: The program must exit for the update to complete')
21
-                sys.exit()
22
-
23
         # Maybe do nothing
24
         if not actual_use:
25
-            if opts.update_self or opts.rm_cachedir:
26
+            if opts.rm_cachedir:
27
                 sys.exit()
28
 
29
             ydl.warn_if_short_id(sys.argv[1:] if argv is None else argv)
(-)b/www/yt-dlp/files/patch-yt__dlp_options.py (+13 lines)
Added Link Here
1
--- yt_dlp/options.py.orig	2021-03-18 03:13:34 UTC
2
+++ yt_dlp/options.py
3
@@ -151,10 +151,6 @@ def parseOpts(overrideArguments=None):
4
         action='version',
5
         help='Print program version and exit')
6
     general.add_option(
7
-        '-U', '--update',
8
-        action='store_true', dest='update_self',
9
-        help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)')
10
-    general.add_option(
11
         '-i', '--ignore-errors', '--no-abort-on-error',
12
         action='store_true', dest='ignoreerrors', default=True,
13
         help='Continue on download errors, for example to skip unavailable videos in a playlist (default) (Alias: --no-abort-on-error)')
(-)b/www/yt-dlp/pkg-descr (-1 / +1 lines)
Lines 3-6 platforms. Link Here
3
3
4
This is a fork of youtube-dlc which is inturn a fork of youtube-dl.
4
This is a fork of youtube-dlc which is inturn a fork of youtube-dl.
5
5
6
WWW: https://github.com/pukkandan/yt-dlp
6
WWW: https://github.com/yt-dlp/yt-dlp
(-)b/www/yt-dlp/pkg-plist (-1 / +5 lines)
Added Link Here
0
- 
1
%%SYMLINK%%bin/youtube-dl
2
bin/yt-dlp
3
etc/bash_completion.d/yt-dlp
4
etc/fish/completions/yt-dlp.fish
5
share/zsh/site-functions/_yt-dlp

Return to bug 254376