From 393f4c53329476bc112e0956497a4bf83b24535f Mon Sep 17 00:00:00 2001 From: sunpoet Date: Tue, 9 Jun 2015 18:30:34 +0000 Subject: - Update to 2015.06.04.1 - Use OPTIONS_SUB - Simplify Makefile - Update and regenerate patch files PR: 199994 Submitted by: sunpoet (myself) Approved by: maintainer (timeout, 34 days) --- www/youtube_dl/Makefile | 39 ++++++---------------- www/youtube_dl/distinfo | 4 +-- www/youtube_dl/files/patch-Makefile | 37 +++++++++++++++++--- www/youtube_dl/files/patch-youtube_dl____init__.py | 8 ++--- www/youtube_dl/files/patch-youtube_dl__options.py | 12 +++---- 5 files changed, 54 insertions(+), 46 deletions(-) diff --git a/www/youtube_dl/Makefile b/www/youtube_dl/Makefile index c7cab6c54b68..be88f0af4c23 100644 --- a/www/youtube_dl/Makefile +++ b/www/youtube_dl/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= youtube_dl -PORTVERSION= 2015.03.03.1 +PORTVERSION= 2015.06.04.1 CATEGORIES= www MASTER_SITES= https://yt-dl.org/downloads/${PORTVERSION}/ DISTNAME= youtube-dl-${PORTVERSION} @@ -18,49 +18,30 @@ BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip ALL_TARGET= youtube-dl MAKE_ARGS= PYTHON=${PYTHON_CMD} -USES= python:run +USES= python NO_ARCH= yes +WRKSRC= ${WRKDIR}/youtube-dl OPTIONS_DEFINE= BASH FISH RTMPDUMP FFMPEG ZSH OPTIONS_DEFAULT=RTMPDUMP - +OPTIONS_SUB= yes FISH_DESC= Install programmable completions for Fish RTMPDUMP_DESC= Use RTMPDUMP to download rtmp video streams PLIST_FILES= bin/youtube-dl \ - man/man1/youtube-dl.1.gz + man/man1/youtube-dl.1.gz \ + %%BASH%%etc/bash_completion.d/youtube-dl.sh \ + %%FISH%%share/fish/completions/youtube-dl.fish \ + %%ZSH%%share/zsh/site-functions/_youtube-dl -WRKSRC= ${WRKDIR}/youtube-dl - -BASH_PLIST_FILES= etc/bash_completion.d/youtube-dl.sh -FISH_PLIST_FILES= share/fish/completions/youtube-dl.fish -ZSH_PLIST_FILES= share/zsh/site-functions/_youtube-dl FFMPEG_RUN_DEPENDS= ${LOCALBASE}/bin/ffprobe:${PORTSDIR}/multimedia/ffmpeg RTMPDUMP_RUN_DEPENDS= ${LOCALBASE}/bin/rtmpdump:${PORTSDIR}/multimedia/rtmpdump -.include - post-extract: @# remove tarball provided version, build our own @${RM} -f ${WRKSRC}/youtube-dl -do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/youtube-dl ${STAGEDIR}${PREFIX}/bin/youtube-dl - ${INSTALL_DATA} ${WRKSRC}/youtube-dl.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 -.if ${PORT_OPTIONS:MBASH} - ${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d - ${INSTALL_DATA} ${WRKSRC}/youtube-dl.bash-completion \ - ${STAGEDIR}${PREFIX}/etc/bash_completion.d/youtube-dl.sh -.endif -.if ${PORT_OPTIONS:MFISH} - ${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions - ${INSTALL_DATA} ${WRKSRC}/youtube-dl.fish \ - ${STAGEDIR}${PREFIX}/share/fish/completions/ -.endif -.if ${PORT_OPTIONS:MZSH} - ${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions - ${INSTALL_DATA} ${WRKSRC}/youtube-dl.zsh \ - ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_youtube-dl -.endif +post-patch: + @${REINPLACE_CMD} -e 's|python devscripts/|${PYTHON_CMD} devscripts/|' ${WRKSRC}/Makefile .include diff --git a/www/youtube_dl/distinfo b/www/youtube_dl/distinfo index 7e18f1eabcdd..e8770847c621 100644 --- a/www/youtube_dl/distinfo +++ b/www/youtube_dl/distinfo @@ -1,2 +1,2 @@ -SHA256 (youtube-dl-2015.03.03.1.tar.gz) = 31e4dd019c1564f9a2b9ad187b461d2fd0c9d1fa3f636ea36d5dd970fb77f539 -SIZE (youtube-dl-2015.03.03.1.tar.gz) = 1407072 +SHA256 (youtube-dl-2015.06.04.1.tar.gz) = cffb1edb9637962e6a2ea1d26284f52aa53c7f5cd2a3e1e94a21f414aa606566 +SIZE (youtube-dl-2015.06.04.1.tar.gz) = 1562426 diff --git a/www/youtube_dl/files/patch-Makefile b/www/youtube_dl/files/patch-Makefile index f62e13876cb4..009584a20653 100644 --- a/www/youtube_dl/files/patch-Makefile +++ b/www/youtube_dl/files/patch-Makefile @@ -1,8 +1,8 @@ ---- Makefile.orig 2014-09-14 14:48:07 UTC +--- Makefile.orig 2015-04-26 20:44:31 UTC +++ Makefile -@@ -10,17 +10,7 @@ - BINDIR ?= $(PREFIX)/bin +@@ -9,17 +9,7 @@ BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/man + SHAREDIR ?= $(PREFIX)/share PYTHON ?= /usr/bin/env python - -# set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local @@ -15,7 +15,34 @@ - SYSCONFDIR=$(PREFIX)/etc - endif -endif -+SYSCONFDIR ?= /etc ++SYSCONFDIR ?= $(PREFIX)/etc - install: youtube-dl youtube-dl.1 youtube-dl.bash-completion + install: youtube-dl youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish install -d $(DESTDIR)$(BINDIR) +@@ -27,11 +17,11 @@ install: youtube-dl youtube-dl.1 youtube + 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/completions ++ install -m 644 youtube-dl.fish $(DESTDIR)$(SHAREDIR)/fish/completions/youtube-dl.fish + + codetest: + flake8 . +@@ -72,11 +62,6 @@ supportedsites: + README.txt: README.md + pandoc -f markdown -t plain README.md -o README.txt + +-youtube-dl.1: README.md +- python devscripts/prepare_manpage.py >youtube-dl.1.temp.md +- pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1 +- rm -f youtube-dl.1.temp.md +- + youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in + python devscripts/bash-completion.py + diff --git a/www/youtube_dl/files/patch-youtube_dl____init__.py b/www/youtube_dl/files/patch-youtube_dl____init__.py index 9301f0316130..d895712e5f5c 100644 --- a/www/youtube_dl/files/patch-youtube_dl____init__.py +++ b/www/youtube_dl/files/patch-youtube_dl____init__.py @@ -1,6 +1,6 @@ ---- youtube_dl/__init__.py.orig 2014-11-23 17:50:21.000000000 +0800 -+++ youtube_dl/__init__.py 2014-11-23 21:17:37.918929006 +0800 -@@ -34,7 +34,6 @@ +--- youtube_dl/__init__.py.orig 2015-05-15 08:01:24 UTC ++++ youtube_dl/__init__.py +@@ -36,7 +36,6 @@ from .utils import ( std_headers, write_string, ) @@ -8,7 +8,7 @@ from .downloader import ( FileDownloader, ) -@@ -347,17 +346,13 @@ def _real_main(argv=None): +@@ -370,17 +369,13 @@ def _real_main(argv=None): } with YoutubeDL(ydl_opts) as ydl: diff --git a/www/youtube_dl/files/patch-youtube_dl__options.py b/www/youtube_dl/files/patch-youtube_dl__options.py index 69419b774cea..a2136480e8b6 100644 --- a/www/youtube_dl/files/patch-youtube_dl__options.py +++ b/www/youtube_dl/files/patch-youtube_dl__options.py @@ -1,13 +1,13 @@ ---- youtube_dl/options.py.orig 2014-11-15 22:16:23.000000000 +0800 -+++ youtube_dl/options.py 2014-11-22 12:34:15.188052389 +0800 -@@ -125,10 +125,6 @@ +--- youtube_dl/options.py.orig 2015-05-29 05:52:12 UTC ++++ youtube_dl/options.py +@@ -127,10 +127,6 @@ def parseOpts(overrideArguments=None): action='version', - help='print program version and exit') + help='Print program version and exit') general.add_option( - '-U', '--update', - action='store_true', dest='update_self', -- help='update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)') +- help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)') - general.add_option( '-i', '--ignore-errors', action='store_true', dest='ignoreerrors', default=False, - help='continue on download errors, for example to skip unavailable videos in a playlist') + help='Continue on download errors, for example to skip unavailable videos in a playlist') -- cgit