# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name youtube-dl version 2015.07.07 categories net platforms darwin maintainers ryandesign openmaintainer supported_archs noarch license public-domain description command-line program to download videos from YouTube.com and other sites long_description ${name} is a small ${description}. homepage http://rg3.github.com/youtube-dl/ master_sites http://youtube-dl.org/downloads/${version} checksums rmd160 bd0422aae6b56e3f0897cfd38cbfb67cd3864d8f \ sha256 634d7a3c369a245e67317ddb4043f8167bce3e774e1246ecb7c2707d311c2b4e depends_build bin:zip:zip worksrcdir ${name} post-extract { # Force the script to be regenerated by `make`. delete ${worksrcpath}/${name} } patchfiles patch-Makefile.diff \ patch-youtube_dl-update.py.diff patch.args --backup post-patch { # Restore original mtimes of files changed by the patch so that `make` doesn't try to regenerate the documentation with `pandoc`. foreach f {youtube_dl/update.py} { file mtime ${worksrcpath}/${f} [file mtime ${worksrcpath}/${f}.orig] } } use_configure no pre-build { build.args-append PYTHON=${configure.python} } destroot.args PREFIX=${prefix} \ MANDIR=${prefix}/share/man \ SYSCONFDIR=${prefix}/etc post-destroot { set docdir ${prefix}/share/doc/${name} xinstall -d ${destroot}${docdir} xinstall -m 644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir} } variant ffmpeg description {Add ffmpeg dependency, used to extract audio} { depends_run-append path:bin/ffmpeg:ffmpeg } default_variants +ffmpeg variant python27 conflicts python34 description {Use Python 2.7} { depends_run-append port:python27 configure.python ${prefix}/bin/python2.7 } variant python33 requires python34 description {Legacy compatibility variant} {} variant python34 conflicts python27 description {Use Python 3.4} { depends_run-append port:python34 configure.python ${prefix}/bin/python3.4 } if {![variant_isset python27] && ![variant_isset python34]} { default_variants +python27 } livecheck.type regex livecheck.url http://rg3.github.com/youtube-dl/update/versions.json livecheck.regex {"latest":\s*"([0-9.]+)"}