1 |
commit: 1cd358908fbef1fba93671435c3477e5fab7c934 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 25 00:59:40 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 25 01:01:03 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cd35890 |
7 |
|
8 |
net-misc/yt-dlp: add 2021.12.25 |
9 |
|
10 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
11 |
|
12 |
net-misc/yt-dlp/Manifest | 1 + |
13 |
net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild | 74 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 75 insertions(+) |
15 |
|
16 |
diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest |
17 |
index 4ec3c0e3076d..9c7bf287e6d1 100644 |
18 |
--- a/net-misc/yt-dlp/Manifest |
19 |
+++ b/net-misc/yt-dlp/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST yt-dlp-2021.12.1.tar.gz 2064958 BLAKE2B d97bf6bc5d6a97aec05be73dcc00aac6b1aff011c307abcbf604a3bfab06dadfd28401eab8ad26d42b7ec3db778c66e9fa2de09d3e6c28304fd28791532509d9 SHA512 d04e9e5ae36e73923ac79bb98af6e402ba0b4403430cbcc0517e7f446d42b6c637846b11489c0159faf667ab798b937abb9597fb5fba76b6f7b6e2b379bae328 |
22 |
+DIST yt-dlp-2021.12.25.tar.gz 2096136 BLAKE2B b40e35f8e7f644051ca80d7d6eeb5d7963e5d0b0c5ffbbc10ed2e4d1f7133a43ec19a715e2ca131fb95ce31c322b952cb13b40adcfe1d8f655e1bd2162ec8329 SHA512 826abb5654527e37454424a949607d2c9934328228566ab0baa89df23ea081c3feb01584a25d0154d30d389d4c10cc7203ad530ddf8472ae70d6e782e3ded490 |
23 |
|
24 |
diff --git a/net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild b/net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..449b50847e09 |
27 |
--- /dev/null |
28 |
+++ b/net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild |
29 |
@@ -0,0 +1,74 @@ |
30 |
+# Copyright 1999-2021 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python3_{8..10} ) |
36 |
+inherit bash-completion-r1 distutils-r1 optfeature |
37 |
+ |
38 |
+DESCRIPTION="youtube-dl fork with additional features and fixes" |
39 |
+HOMEPAGE="https://github.com/yt-dlp/yt-dlp" |
40 |
+SRC_URI="mirror://pypi/${P::1}/${PN}/${P}.tar.gz" |
41 |
+ |
42 |
+LICENSE="Unlicense" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ dev-python/pycryptodome[${PYTHON_USEDEP}] |
48 |
+ !net-misc/youtube-dl" |
49 |
+ |
50 |
+distutils_enable_tests pytest |
51 |
+ |
52 |
+python_prepare_all() { |
53 |
+ distutils-r1_python_prepare_all |
54 |
+ |
55 |
+ # adjust requires for pycryptodome and optional dependencies (bug #828466) |
56 |
+ sed -ri setup.py \ |
57 |
+ -e "s/'(pycryptodome)x'/'\1'/" \ |
58 |
+ -e "s/'(mutagen|websockets)',?//g" || die |
59 |
+} |
60 |
+ |
61 |
+python_test() { |
62 |
+ epytest -m 'not download' -p no:markdown |
63 |
+} |
64 |
+ |
65 |
+python_install() { |
66 |
+ distutils-r1_python_install |
67 |
+ |
68 |
+ local sitedir=$(python_get_sitedir) |
69 |
+ dosym yt_dlp "${sitedir#${EPREFIX}}"/youtube_dl |
70 |
+} |
71 |
+ |
72 |
+python_install_all() { |
73 |
+ dodoc README.md Changelog.md supportedsites.md |
74 |
+ doman yt-dlp.1 |
75 |
+ |
76 |
+ dobashcomp completions/bash/yt-dlp |
77 |
+ |
78 |
+ insinto /usr/share/fish/vendor_completions.d |
79 |
+ doins completions/fish/yt-dlp.fish |
80 |
+ |
81 |
+ insinto /usr/share/zsh/site-functions |
82 |
+ doins completions/zsh/_yt-dlp |
83 |
+ |
84 |
+ rm -r "${ED}"/usr/share/doc/yt_dlp || die |
85 |
+ |
86 |
+ newbin - youtube-dl <<-EOF |
87 |
+ #!/usr/bin/env sh |
88 |
+ exec yt-dlp --compat-options youtube-dl "\${@}" |
89 |
+ EOF |
90 |
+} |
91 |
+ |
92 |
+pkg_postinst() { |
93 |
+ optfeature "various features (merging tracks, streamed content)" media-video/ffmpeg |
94 |
+ has_version media-video/atomicparsley || # allow fallback but don't advertise |
95 |
+ optfeature "embedding metadata thumbnails in MP4/M4A files" media-libs/mutagen |
96 |
+ |
97 |
+ if [[ ! ${REPLACING_VERSIONS} ]] || |
98 |
+ ver_test ${REPLACING_VERSIONS} -lt 2021.10.22-r2; then |
99 |
+ elog 'A wrapper using "yt-dlp --compat-options youtube-dl" was installed' |
100 |
+ elog 'as "youtube-dl". This is strictly for compatibility and it is' |
101 |
+ elog 'recommended to use "yt-dlp" directly, it may be removed in the future.' |
102 |
+ fi |
103 |
+} |