diff --git a/www/youtube_dl/Makefile b/www/youtube_dl/Makefile index a167bb31e173..c2e8e52e5d06 100644 --- a/www/youtube_dl/Makefile +++ b/www/youtube_dl/Makefile @@ -1,40 +1,41 @@ PORTNAME= youtube_dl PORTVERSION= 2023.03.14 +PORTREVISION= 1 CATEGORIES= www # Implicit approval to commit trivial version updates. MAINTAINER= multimedia@FreeBSD.org COMMENT= Program for downloading videos from various services WWW= https://yt-dl.org/ LICENSE= UNLICENSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= pandoc:textproc/hs-pandoc USES= gmake python USE_GITHUB= yes GH_ACCOUNT= ytdl-org GH_PROJECT= youtube-dl GH_TAGNAME= 6fece0a MAKE_ARGS= PYTHON=${PYTHON_CMD} ALL_TARGET= youtube-dl NO_ARCH= yes PLIST_FILES= bin/youtube-dl \ etc/bash_completion.d/youtube-dl.sh \ - man/man1/youtube-dl.1.gz \ + share/man/man1/youtube-dl.1.gz \ share/fish/vendor_completions.d/youtube-dl.fish \ share/zsh/site-functions/_youtube-dl OPTIONS_DEFINE= FFMPEG RTMPDUMP OPTIONS_DEFAULT= RTMPDUMP RTMPDUMP_DESC= Use rtmpdump to download rtmp video streams FFMPEG_RUN_DEPENDS= ffprobe:multimedia/ffmpeg RTMPDUMP_RUN_DEPENDS= rtmpdump:multimedia/rtmpdump .include diff --git a/www/youtube_dl/files/patch-Makefile b/www/youtube_dl/files/patch-Makefile index 8ac0bb1eed00..843d6f584858 100644 --- a/www/youtube_dl/files/patch-Makefile +++ b/www/youtube_dl/files/patch-Makefile @@ -1,35 +1,41 @@ --- Makefile.orig 2023-03-14 16:23:20 UTC +++ Makefile -@@ -12,7 +12,7 @@ SHAREDIR ?= $(PREFIX)/share +@@ -7,12 +7,12 @@ BINDIR ?= $(PREFIX)/bin + + PREFIX ?= /usr/local + BINDIR ?= $(PREFIX)/bin +-MANDIR ?= $(PREFIX)/man ++MANDIR ?= $(PREFIX)/share/man + SHAREDIR ?= $(PREFIX)/share PYTHON ?= /usr/bin/env python # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local -SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi) +SYSCONFDIR ?= $(PREFIX)/etc # set markdown input format to "markdown-smart" for pandoc version 2 and to "markdown" for pandoc prior to version 2 MARKDOWN = $(shell if [ `pandoc -v | head -n1 | cut -d" " -f2 | head -c1` = "2" ]; then echo markdown-smart; else echo markdown; fi) @@ -23,11 +23,11 @@ install: youtube-dl youtube-dl.1 youtube-dl.bash-compl install -d $(DESTDIR)$(MANDIR)/man1 install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1 install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d - install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl + install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl.sh install -d $(DESTDIR)$(SHAREDIR)/zsh/site-functions install -m 644 youtube-dl.zsh $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_youtube-dl - install -d $(DESTDIR)$(SYSCONFDIR)/fish/completions - install -m 644 youtube-dl.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/youtube-dl.fish + install -d $(DESTDIR)$(SHAREDIR)/fish/vendor_completions.d + install -m 644 youtube-dl.fish $(DESTDIR)$(SHAREDIR)/fish/vendor_completions.d/youtube-dl.fish codetest: flake8 . @@ -65,7 +65,7 @@ youtube-dl: youtube_dl/*.py youtube_dl/*/*.py done touch -t 200001010101 zip/youtube_dl/*.py zip/youtube_dl/*/*.py mv zip/youtube_dl/__main__.py zip/ - cd zip ; zip -q ../youtube-dl youtube_dl/*.py youtube_dl/*/*.py __main__.py + cd zip ; bsdtar -a -cf ../youtube-dl.zip youtube_dl/*.py youtube_dl/*/*.py __main__.py rm -rf zip echo '#!$(PYTHON)' > youtube-dl cat youtube-dl.zip >> youtube-dl diff --git a/www/youtube_dl/files/patch-youtube_dl____init__.py b/www/youtube_dl/files/patch-youtube_dl____init__.py index 3a598b7d0399..be1b2921db02 100644 --- a/www/youtube_dl/files/patch-youtube_dl____init__.py +++ b/www/youtube_dl/files/patch-youtube_dl____init__.py @@ -1,29 +1,29 @@ ---- youtube_dl/__init__.py.orig 2018-05-09 02:36:28 UTC +--- youtube_dl/__init__.py.orig 2023-03-14 16:23:20 UTC +++ youtube_dl/__init__.py @@ -36,7 +36,6 @@ from .utils import ( write_string, render_table, ) -from .update import update_self from .downloader import ( FileDownloader, ) -@@ -437,17 +436,13 @@ def _real_main(argv=None): +@@ -440,17 +439,13 @@ def _real_main(argv=None): } with YoutubeDL(ydl_opts) as ydl: - # Update version - if opts.update_self: - update_self(ydl.to_screen, opts.verbose, ydl._opener) - # Remove cache dir if opts.rm_cachedir: ydl.cache.remove() # Maybe do nothing if (len(all_urls) < 1) and (opts.load_info_filename is None): - if opts.update_self or opts.rm_cachedir: + if opts.rm_cachedir: sys.exit() ydl.warn_if_short_id(sys.argv[1:] if argv is None else argv)