-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
129 lines (103 loc) · 4.38 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# -*- 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
PortSystem 1.0
PortGroup github 1.0
PortGroup python 1.0
name youtube-dl
if {${subport} eq ${name}} {
github.setup ytdl-org ${subport} 2021.12.17
revision 3
checksums rmd160 beca02d231a287488cecffe4c98651b4d6537b9d \
sha256 9f3b99c8b778455165b4525f21505e86c7ff565f3ac319e19733d810194135df \
size 3332299
homepage https://${github.author}.github.io/${github.project}/
python.pep517_backend setuptools
set symlinks [list \
etc/bash_completion.d/${subport}.bash-completion \
etc/fish/completions/${subport}.fish \
share/man/man1/${subport}.1 \
share/zsh/site-functions/_${subport} \
]
post-destroot {
# https://github.com/ytdl-org/youtube-dl/issues/9231
xinstall -d ${destroot}${python.prefix}/share/zsh/site-functions
xinstall -m 0644 ${worksrcpath}/youtube-dl.zsh \
${destroot}${python.prefix}/share/zsh/site-functions/_youtube-dl
}
livecheck.type regex
livecheck.url ${homepage}/latest/version
livecheck.regex {^([0-9.]+)$}
}
subport yt-dlp {
github.setup yt-dlp ${subport} 2024.08.06
revision 0
checksums rmd160 4e05093c931e543c798d0c7e566a14824746fca2 \
sha256 e08331fb9a36eba56b4efd074b5b25fbf08413e9cb47009a28ecbffe47150310 \
size 5710396
dist_subdir ${subport}/${version}
distname ${subport}
python.pep517_backend hatch
set symlinks [list \
share/bash-completion/completions/${subport} \
share/fish/vendor_completions.d/${subport}.fish \
share/man/man1/${subport}.1 \
share/zsh/site-functions/_${subport} \
]
}
categories net
maintainers {ryandesign @ryandesign}
supported_archs noarch
platforms {darwin any}
license public-domain
installs_libs no
description command-line program to download videos from YouTube.com and other sites
long_description ${name} is a small {*}${description}.
github.tarball_from releases
worksrcdir ${subport}
patchfiles-append ${subport}-config-location.patch \
${subport}-update.patch
post-patch {
if {${subport} eq ${name}} {
set optfile options.py
} else {
set optfile utils/_utils.py
}
reinplace -W ${worksrcpath} "s|@PREFIX@|${prefix}|g" \
README.md \
${subport}.1 \
[string map {- _} ${subport}]/${optfile}
}
post-destroot {
foreach f ${symlinks} {
xinstall -d ${destroot}${prefix}/[file dirname ${f}]
ln -s ${python.prefix}/${f} ${destroot}${prefix}/${f}
}
set docdir ${prefix}/share/doc/${subport}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir}
}
variant ffmpeg description {Add ffmpeg dependency, used to extract audio} {
depends_run-append path:bin/AtomicParsley:AtomicParsley \
path:bin/ffmpeg:ffmpeg
}
default_variants +ffmpeg
variant python38 conflicts python39 python310 python311 python312 description {Use Python 3.8} {}
variant python39 conflicts python38 python310 python311 python312 description {Use Python 3.9} {}
variant python310 conflicts python38 python39 python311 python312 description {Use Python 3.10} {}
variant python311 conflicts python38 python39 python310 python312 description {Use Python 3.11} {}
variant python312 conflicts python38 python39 python310 python311 description {Use Python 3.12} {}
if {![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311] && ![variant_isset python312]} {
default_variants +python312
}
if {[variant_isset python38]} {
python.default_version 38
} elseif {[variant_isset python39]} {
python.default_version 39
} elseif {[variant_isset python310]} {
python.default_version 310
} elseif {[variant_isset python311]} {
python.default_version 311
} elseif {[variant_isset python312]} {
python.default_version 312
}
# WARNING: hlsnative has detected features it does not support, extraction will be delegated to ffmpeg
depends_lib-append port:py${python.version}-pycryptodome