Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/yt-dlp/
Date: Fri, 08 Apr 2022 13:55:58
Message-Id: 1649426128.dcd4d862785caa75c22b9c9afe7ba60fbe7f1358.ionen@gentoo
1 commit: dcd4d862785caa75c22b9c9afe7ba60fbe7f1358
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 8 13:40:29 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 8 13:55:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcd4d862
7
8 net-misc/yt-dlp: add 2022.4.8
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-2022.4.8.ebuild | 67 ++++++++++++++++++++++++++++++++++
14 2 files changed, 68 insertions(+)
15
16 diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest
17 index a28083f4571a..e0b0c2eecde3 100644
18 --- a/net-misc/yt-dlp/Manifest
19 +++ b/net-misc/yt-dlp/Manifest
20 @@ -1,2 +1,3 @@
21 DIST yt-dlp-2022.2.4.tar.gz 2178642 BLAKE2B 2e6c11bb9fbc30b725dc26db727500c33af944d16fbc46be8fb35a75ab4f5c09ca0c8754f075b9739ca9d47e9b409f8d533c03b417217344f8cac1ec45968b51 SHA512 6bb6bee6f748147a566394bbe0b69781ab415398582cb8e88a49b61a5dd106e666b0429c8f4f6483bc4af0363e88eb95c5159457b7049cc11a2c99a6495c6895
22 DIST yt-dlp-2022.3.8.2.tar.gz 2454754 BLAKE2B f07c1eb8d0e1f936298d6516e518f366558107ba9ae65f7c0b52bdcd185b27e501d0d0ffb20e923a94ce5f42c88ae335069876946c411232b9dfc1309ae796ca SHA512 bd6c105f65415e2229781bb1e859167686a5f5f6886e98f9693acc127d4f9124aa2d55f32835f82509f6ab5a82601a5d612ac608063ef9041769fa91e3539c44
23 +DIST yt-dlp-2022.4.8.tar.gz 2257195 BLAKE2B 1d83ef14900789d0af0fc80bafcd6d80ca3162ede818d74382598161014c1a4c4450c0cdf57cdc79f3c5e2970a46004619eeffa9dfdb0d7af128bbe2a023ebf8 SHA512 b2d865682ba44dbd168cd76089105fc1d7ff2d79ba884c9626b3a4009c05f07eccaed2b8801318e89e3e197affc70aad68c1813590eef2a5148ded9c037bf0ce
24
25 diff --git a/net-misc/yt-dlp/yt-dlp-2022.4.8.ebuild b/net-misc/yt-dlp/yt-dlp-2022.4.8.ebuild
26 new file mode 100644
27 index 000000000000..38a65a783586
28 --- /dev/null
29 +++ b/net-misc/yt-dlp/yt-dlp-2022.4.8.ebuild
30 @@ -0,0 +1,67 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +inherit bash-completion-r1 distutils-r1 optfeature
39 +
40 +DESCRIPTION="youtube-dl fork with additional features and fixes"
41 +HOMEPAGE="https://github.com/yt-dlp/yt-dlp"
42 +SRC_URI="mirror://pypi/${P::1}/${PN}/${P}.tar.gz"
43 +
44 +LICENSE="Unlicense"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 ~x64-macos"
47 +
48 +RDEPEND="
49 + dev-python/pycryptodome[${PYTHON_USEDEP}]
50 + !net-misc/youtube-dl[-yt-dlp(-)]"
51 +
52 +distutils_enable_tests pytest
53 +
54 +python_prepare_all() {
55 + distutils-r1_python_prepare_all
56 +
57 + # adjust requires for pycryptodome and optional dependencies (bug #828466)
58 + sed -ri requirements.txt \
59 + -e "s/^(pycryptodome)x/\1/" \
60 + -e "/^(brotli.*|mutagen|websockets)/d" || die
61 +}
62 +
63 +python_test() {
64 + epytest -m 'not download' -p no:markdown
65 +}
66 +
67 +python_install_all() {
68 + dodoc README.md Changelog.md supportedsites.md
69 + doman yt-dlp.1
70 +
71 + dobashcomp completions/bash/yt-dlp
72 +
73 + insinto /usr/share/fish/vendor_completions.d
74 + doins completions/fish/yt-dlp.fish
75 +
76 + insinto /usr/share/zsh/site-functions
77 + doins completions/zsh/_yt-dlp
78 +
79 + rm -r "${ED}"/usr/share/doc/yt_dlp || die
80 +
81 + newbin - youtube-dl <<-EOF
82 + #!/usr/bin/env sh
83 + exec yt-dlp --compat-options youtube-dl "\${@}"
84 + EOF
85 +}
86 +
87 +pkg_postinst() {
88 + optfeature "various features (merging tracks, streamed content)" media-video/ffmpeg
89 + has_version media-video/atomicparsley || # allow fallback but don't advertise
90 + optfeature "embedding metadata thumbnails in MP4/M4A files" media-libs/mutagen
91 +
92 + if [[ ! ${REPLACING_VERSIONS} ]]; then
93 + elog 'A wrapper using "yt-dlp --compat-options youtube-dl" was installed'
94 + elog 'as "youtube-dl". This is strictly for compatibility and it is'
95 + elog 'recommended to use "yt-dlp" directly, it may be removed in the future.'
96 + fi
97 +}