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