# -*- 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
maintainers {ryandesign @ryandesign} openmaintainer
description command-line program to download videos from YouTube.com and other sites
long_description ${name} is a small ${description}.
homepage https://rg3.github.io/youtube-dl/
master_sites https://yt-dl.org/downloads/${version}
checksums rmd160 9148e28be89c65e2e51f85a0165f72b1b9f6b8a9 \
sha256 cfb0c0591fc2c23d7ad7bf4ef2ca1f8d776bbdbb915c726701c0144f8c1f2f1e \
depends_build bin:zip:zip
# Force the script to be regenerated by `make`.
delete ${worksrcpath}/${name}
patchfiles patch-config-location.diff \
patch-youtube_dl-update.py.diff
reinplace -W ${worksrcpath} "s|@PREFIX@|${prefix}|g" \
# 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 youtube_dl/options.py README.md youtube-dl.1} {
file mtime ${worksrcpath}/${f} [file mtime ${worksrcpath}/${f}.orig]
build.args-append PYTHON=${configure.python}
destroot.args PREFIX=${prefix} \
MANDIR=${prefix}/share/man \
set docdir ${prefix}/share/doc/${name}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir}