source: trunk/dports/net/youtube-dl/Portfile

Last change on this file was 154330, checked in by ryandesign@…, 11 months ago

youtube-dl: Update to 2016.10.26

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1# -*- 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
2# $Id: Portfile 154330 2016-10-27 23:51:39Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                youtube-dl
7version             2016.10.26
8categories          net
9platforms           darwin
10maintainers         ryandesign openmaintainer
11supported_archs     noarch
12license             public-domain
13
14description         command-line program to download videos from YouTube.com and other sites
15
16long_description    ${name} is a small ${description}.
17
18homepage            http://rg3.github.com/youtube-dl/
19master_sites        http://youtube-dl.org/downloads/${version}
20
21checksums           rmd160  d4b7a74c8bdd46d0fbbbecab0a1b2543f7f5999f \
22                    sha256  df9f9848198ef225bc351db016d54843fb93252704a786e7e34418f60617b1a5
23
24depends_build       bin:zip:zip
25
26worksrcdir          ${name}
27
28post-extract {
29    # Force the script to be regenerated by `make`.
30    delete ${worksrcpath}/${name}
31}
32
33patchfiles          patch-Makefile.diff \
34                    patch-youtube_dl-update.py.diff
35patch.args          --backup
36
37post-patch {
38    # Restore original mtimes of files changed by the patch so that `make` doesn't try to regenerate the documentation with `pandoc`.
39    foreach f {youtube_dl/update.py} {
40        file mtime ${worksrcpath}/${f} [file mtime ${worksrcpath}/${f}.orig]
41    }
42}
43
44use_configure       no
45
46pre-build {
47    build.args-append   PYTHON=${configure.python}
48}
49
50destroot.args       PREFIX=${prefix} \
51                    MANDIR=${prefix}/share/man \
52                    SYSCONFDIR=${prefix}/etc
53
54post-destroot {
55    set docdir ${prefix}/share/doc/${name}
56    xinstall -d ${destroot}${docdir}
57    xinstall -m 644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir}
58}
59
60variant ffmpeg description {Add ffmpeg dependency, used to extract audio} {
61    depends_run-append  path:bin/ffmpeg:ffmpeg
62}
63
64default_variants    +ffmpeg
65
66variant python27 conflicts python34 python35 description {Use Python 2.7} {
67    depends_run-append      port:python27
68    depends_build-append    port:python27
69    configure.python        ${prefix}/bin/python2.7
70}
71
72variant python33 requires python34 description {Legacy compatibility variant} {}
73
74variant python34 conflicts python27 python35 description {Use Python 3.4} {
75    depends_run-append      port:python34
76    depends_build-append    port:python34
77    configure.python        ${prefix}/bin/python3.4
78}
79
80variant python35 conflicts python27 python34 description {Use Python 3.5} {
81    depends_run-append      port:python35
82    depends_build-append    port:python35
83    configure.python        ${prefix}/bin/python3.5
84}
85
86if {![variant_isset python27] && ![variant_isset python34] && ![variant_isset python35]} {
87    default_variants +python27
88}
89
90livecheck.type      regex
91livecheck.url       http://rg3.github.com/youtube-dl/update/versions.json
92livecheck.regex     {"latest":\s*"([0-9.]+)"}
Note: See TracBrowser for help on using the repository browser.