commit:     2c2d278a5408cc22fcd3eb6ac241077c445b05f0
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  4 06:58:33 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Feb  4 06:59:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c2d278a

net-misc/yt-dlp: add 2022.2.4

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 net-misc/yt-dlp/Manifest               |  1 +
 net-misc/yt-dlp/yt-dlp-2022.2.4.ebuild | 74 ++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest
index 6353b9b184ba..dd7099ee2596 100644
--- a/net-misc/yt-dlp/Manifest
+++ b/net-misc/yt-dlp/Manifest
@@ -1,2 +1,3 @@
 DIST yt-dlp-2022.1.21.tar.gz 2160713 BLAKE2B 
30ed1c7a317318ca6a6ee183ba8e4396420eb090ddacc64ddde2bb4077c7c45b01c00caca90d1b8be501f90c71407e27d6ef847fdbfea8bed488771f9b59bbe1
 SHA512 
5844d49dbf50842d4d51dbb00c16efea816322888d16a8dbce16f976f0dd1625ec8243fcdc07e721180a2f02cf14ebaa0d83a1437e331b4aa68c404db3f1e9f4
 DIST yt-dlp-2022.2.3.tar.gz 2177760 BLAKE2B 
164197ee339d6a9cce24986781f160cd572c863f50cc1ccabfd820785280788b02287103c1e5f0fc2d7318e556b209ae860b2afb9f7f754965e7146edf14bd19
 SHA512 
8a7267c896aa879baf0c7b31276a933150869f40c6a3482754de1a616caee89c0d320bd4e7490d8c6a7eab55d6343db91698b994a07b94760528de639fd6a56b
+DIST yt-dlp-2022.2.4.tar.gz 2178642 BLAKE2B 
2e6c11bb9fbc30b725dc26db727500c33af944d16fbc46be8fb35a75ab4f5c09ca0c8754f075b9739ca9d47e9b409f8d533c03b417217344f8cac1ec45968b51
 SHA512 
6bb6bee6f748147a566394bbe0b69781ab415398582cb8e88a49b61a5dd106e666b0429c8f4f6483bc4af0363e88eb95c5159457b7049cc11a2c99a6495c6895

diff --git a/net-misc/yt-dlp/yt-dlp-2022.2.4.ebuild 
b/net-misc/yt-dlp/yt-dlp-2022.2.4.ebuild
new file mode 100644
index 000000000000..57cb468d48c6
--- /dev/null
+++ b/net-misc/yt-dlp/yt-dlp-2022.2.4.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit bash-completion-r1 distutils-r1 optfeature
+
+DESCRIPTION="youtube-dl fork with additional features and fixes"
+HOMEPAGE="https://github.com/yt-dlp/yt-dlp";
+SRC_URI="mirror://pypi/${P::1}/${PN}/${P}.tar.gz"
+
+LICENSE="Unlicense"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
+
+RDEPEND="
+       dev-python/pycryptodome[${PYTHON_USEDEP}]
+       !net-misc/youtube-dl"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+       distutils-r1_python_prepare_all
+
+       # adjust requires for pycryptodome and optional dependencies (bug 
#828466)
+       sed -ri setup.py \
+               -e "s/'(pycryptodome)x'/'\1'/" \
+               -e "s/'(mutagen|websockets)',?//g" || die
+}
+
+python_test() {
+       epytest -m 'not download' -p no:markdown
+}
+
+python_install() {
+       distutils-r1_python_install
+
+       local sitedir=$(python_get_sitedir)
+       dosym yt_dlp "${sitedir#${EPREFIX}}"/youtube_dl
+}
+
+python_install_all() {
+       dodoc README.md Changelog.md supportedsites.md
+       doman yt-dlp.1
+
+       dobashcomp completions/bash/yt-dlp
+
+       insinto /usr/share/fish/vendor_completions.d
+       doins completions/fish/yt-dlp.fish
+
+       insinto /usr/share/zsh/site-functions
+       doins completions/zsh/_yt-dlp
+
+       rm -r "${ED}"/usr/share/doc/yt_dlp || die
+
+       newbin - youtube-dl <<-EOF
+               #!/usr/bin/env sh
+               exec yt-dlp --compat-options youtube-dl "\${@}"
+       EOF
+}
+
+pkg_postinst() {
+       optfeature "various features (merging tracks, streamed content)" 
media-video/ffmpeg
+       has_version media-video/atomicparsley || # allow fallback but don't 
advertise
+               optfeature "embedding metadata thumbnails in MP4/M4A files" 
media-libs/mutagen
+
+       if [[ ! ${REPLACING_VERSIONS} ]] ||
+               ver_test ${REPLACING_VERSIONS} -lt 2021.10.22-r2; then
+               elog 'A wrapper using "yt-dlp --compat-options youtube-dl" was 
installed'
+               elog 'as "youtube-dl". This is strictly for compatibility and 
it is'
+               elog 'recommended to use "yt-dlp" directly, it may be removed 
in the future.'
+       fi
+}

Reply via email to