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, 19 Aug 2022 08:12:06
Message-Id: 1660896666.0bbc3b7edbb3c1604544336feee15e9071657f0d.ionen@gentoo
1 commit: 0bbc3b7edbb3c1604544336feee15e9071657f0d
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 19 07:58:41 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 19 08:11:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bbc3b7e
7
8 net-misc/yt-dlp: add 2022.8.19, straight-to-stable
9
10 Not too different from 8.14 and fixes new youtube throttling
11 issues due to youtube-side changes, so let's propagate the
12 fix to stable right away.
13
14 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
15
16 net-misc/yt-dlp/Manifest | 1 +
17 net-misc/yt-dlp/yt-dlp-2022.8.19.ebuild | 64 +++++++++++++++++++++++++++++++++
18 2 files changed, 65 insertions(+)
19
20 diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest
21 index c79e93d01374..377a335e50e8 100644
22 --- a/net-misc/yt-dlp/Manifest
23 +++ b/net-misc/yt-dlp/Manifest
24 @@ -1 +1,2 @@
25 DIST yt-dlp-2022.8.14.tar.gz 2368444 BLAKE2B 77994eabc7832ee75b397fbd3d7a37b4fc3cfda2e092e3410656bf303618b2bc6f65eeffe1c99b21e80233f7ddf4ade72debbf5151eb68a0e0e87c512917626f SHA512 5a2219d55fb4f02c2f22eb6bf11d9986c75613401c3b8f7f8d39e6a5a534cb91f5c27fbf735919c414c3d7f193024315eb3eee02a1743828bdcf9b102a748cee
26 +DIST yt-dlp-2022.8.19.tar.gz 2373949 BLAKE2B c95aabee39ebf4a9285f05e17f85c6fcdb2d7ddc07bc9866e59f55cbbc10bbbb048d22d6dda434eae8383834308e29c959e47ed40d07d20296ead8ad09efb999 SHA512 277a91f4790d7bc34f913e420d3c8b1c563a6a88e6175077cdbf53c60d05afaae56b4103acfc3725015e5075fc1346194e06a81d1d68de743d7173265cb39d25
27
28 diff --git a/net-misc/yt-dlp/yt-dlp-2022.8.19.ebuild b/net-misc/yt-dlp/yt-dlp-2022.8.19.ebuild
29 new file mode 100644
30 index 000000000000..705a62db9da4
31 --- /dev/null
32 +++ b/net-misc/yt-dlp/yt-dlp-2022.8.19.ebuild
33 @@ -0,0 +1,64 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +DISTUTILS_USE_PEP517=setuptools
40 +PYTHON_COMPAT=( python3_{8..11} )
41 +inherit bash-completion-r1 distutils-r1 optfeature wrapper
42 +
43 +DESCRIPTION="youtube-dl fork with additional features and fixes"
44 +HOMEPAGE="https://github.com/yt-dlp/yt-dlp/"
45 +SRC_URI="mirror://pypi/${P::1}/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="Unlicense"
48 +SLOT="0"
49 +KEYWORDS="amd64 arm ~arm64 ~hppa ppc ppc64 ~riscv x86 ~x64-macos"
50 +
51 +RDEPEND="
52 + dev-python/pycryptodome[${PYTHON_USEDEP}]
53 + !net-misc/youtube-dl[-yt-dlp(-)]"
54 +
55 +distutils_enable_tests pytest
56 +
57 +src_prepare() {
58 + distutils-r1_src_prepare
59 +
60 + # adjust requires for pycryptodome and optional dependencies (bug #828466)
61 + sed -ri requirements.txt \
62 + -e "s/^(pycryptodome)x/\1/" \
63 + -e "/^(brotli.*|certifi|mutagen|websockets)/d" || die
64 +}
65 +
66 +python_test() {
67 + epytest -m 'not download'
68 +}
69 +
70 +python_install_all() {
71 + dodoc README.md Changelog.md supportedsites.md
72 + doman yt-dlp.1
73 +
74 + dobashcomp completions/bash/yt-dlp
75 +
76 + insinto /usr/share/fish/vendor_completions.d
77 + doins completions/fish/yt-dlp.fish
78 +
79 + insinto /usr/share/zsh/site-functions
80 + doins completions/zsh/_yt-dlp
81 +
82 + rm -r "${ED}"/usr/share/doc/yt_dlp || die
83 +
84 + make_wrapper youtube-dl "yt-dlp --compat-options youtube-dl"
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 +}