diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/youtube_dl/Makefile | 31 | ||||
-rw-r--r-- | www/youtube_dl/files/conv2avi.patch | 40 | ||||
-rw-r--r-- | www/youtube_dl/files/patch-youtube-dl | 8 |
3 files changed, 3 insertions, 76 deletions
diff --git a/www/youtube_dl/Makefile b/www/youtube_dl/Makefile index bb15f1812735..8bafd7e8ad65 100644 --- a/www/youtube_dl/Makefile +++ b/www/youtube_dl/Makefile @@ -7,6 +7,7 @@ PORTNAME= youtube_dl PORTVERSION= 2009.04.25 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://bitbucket.org/rg3/youtube-dl/raw/c42582904adf/ DISTNAME= youtube-dl @@ -19,40 +20,14 @@ COMMENT= A program for downloading videos from YouTube.com NO_WRKSUBDIR= yes NO_BUILD= yes -USE_PYTHON= 2.4+ +USE_PYTHON= 2.5+ PLIST_FILES= bin/youtube-dl -OPTIONS= FFMPEG "Use ffmpeg for avi output" off \ - FLV2MPEG4 "Use flv2mpeg4 for avi output" off - -.include <bsd.port.pre.mk> - -.if defined(WITH_FFMPEG) || defined(WITH_FLV2MPEG4) -EXTRA_PATCHES+= ${PATCHDIR}/conv2avi.patch -.endif - -.if defined(WITH_FFMPEG) -.if defined (WITH_FLV2MPEG4) -IGNORE= cannot use WITH_FFMPEG and WITH_FLV2MPEG4 simultaneously -.endif -CONV2AVI_CMD= ${PREFIX}/bin/ffmpeg -y -i -RUN_DEPENDS+= ffmpeg:${PORTSDIR}/multimedia/ffmpeg -.elif defined (WITH_FLV2MPEG4) -CONV2AVI_CMD= ${PREFIX}/bin/flv2mpeg4 -RUN_DEPENDS+= flv2mpeg4:${PORTSDIR}/multimedia/flv2mpeg4 -.endif - post-extract: @${CP} ${DISTDIR}/youtube-dl ${WRKSRC}/youtube-dl -post-patch: - @${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' ${WRKSRC}/youtube-dl -.if defined(WITH_FFMPEG) || defined(WITH_FLV2MPEG4) - @${REINPLACE_CMD} -e 's|%%CONV2AVI_CMD%%|${CONV2AVI_CMD}|' ${WRKSRC}/youtube-dl -.endif - do-install: @${INSTALL_SCRIPT} ${WRKSRC}/youtube-dl ${PREFIX}/bin/youtube-dl -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/www/youtube_dl/files/conv2avi.patch b/www/youtube_dl/files/conv2avi.patch deleted file mode 100644 index 63313a76605d..000000000000 --- a/www/youtube_dl/files/conv2avi.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- youtube-dl.orig 2009-02-18 15:18:40.981138312 +0800 -+++ youtube-dl 2009-02-18 15:20:30.904521591 +0800 -@@ -315,6 +315,20 @@ - retcode = self.trouble('ERROR: postprocessing: %s' % str(err)) - continue - -+ # Convert to avi if needed -+ if self._params['useavi']: -+ avi_filename = '%s.avi' % filename -+ -+ try: -+ os.system('%%CONV2AVI_CMD%% "%s" "%s" > %s 2> %s' % (filename, avi_filename, os.path.devnull, os.path.devnull)) -+ self.to_stdout('Video file converted to %s' % avi_filename) -+ except OSError, e: -+ retcode = self.trouble('ERROR: unable to convert file: %s' % e.strerror) -+ -+ try: -+ os.unlink(filename) -+ except OSError, e: -+ retcode = self.trouble('ERROR: unable to remove downloaded file: %s' % e.strerror) - break - if not suitable_found: - retcode = self.trouble('ERROR: no suitable InfoExtractor: %s' % url) -@@ -964,6 +978,8 @@ - action='store_true', dest='useliteral', help='use literal title in file name', default=False) - parser.add_option('-n', '--netrc', - action='store_true', dest='usenetrc', help='use .netrc authentication data', default=False) -+ parser.add_option('-a', '--avi', -+ action='store_true', dest='useavi', help='convert file to MPEG4 format', default=False) - parser.add_option('-g', '--get-url', - action='store_true', dest='geturl', help='simulate, quiet but print URL', default=False) - parser.add_option('-e', '--get-title', -@@ -1037,6 +1053,7 @@ - or u'%(id)s.%(ext)s'), - 'ignoreerrors': opts.ignoreerrors, - 'ratelimit': opts.ratelimit, -+ 'useavi': opts.useavi, - 'nooverwrites': opts.nooverwrites, - }) - fd.add_info_extractor(youtube_search_ie) diff --git a/www/youtube_dl/files/patch-youtube-dl b/www/youtube_dl/files/patch-youtube-dl deleted file mode 100644 index 18946bb2de40..000000000000 --- a/www/youtube_dl/files/patch-youtube-dl +++ /dev/null @@ -1,8 +0,0 @@ ---- youtube-dl.orig 2009-02-18 15:17:26.576520965 +0800 -+++ youtube-dl 2009-02-18 15:17:42.870252710 +0800 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!%%PYTHON_CMD%% - # -*- coding: utf-8 -*- - # Author: Ricardo Garcia Gonzalez - # Author: Danny Colligan |