commit:     258dbdb17516d131034f9fe621cfdb48e00a6653
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  9 12:18:07 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Mar  9 12:52:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=258dbdb1

net-misc/yt-dlp: add 2022.3.8.1

Version adds brotli content-encoding support, but like some other less
needed features it does not seem worth having optfeature nag for it.

Also migrated to PEP517.

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

 net-misc/yt-dlp/Manifest                 |  1 +
 net-misc/yt-dlp/yt-dlp-2022.3.8.1.ebuild | 66 ++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest
index 8c615148fb10..ff8af23f6048 100644
--- a/net-misc/yt-dlp/Manifest
+++ b/net-misc/yt-dlp/Manifest
@@ -1 +1,2 @@
 DIST yt-dlp-2022.2.4.tar.gz 2178642 BLAKE2B 
2e6c11bb9fbc30b725dc26db727500c33af944d16fbc46be8fb35a75ab4f5c09ca0c8754f075b9739ca9d47e9b409f8d533c03b417217344f8cac1ec45968b51
 SHA512 
6bb6bee6f748147a566394bbe0b69781ab415398582cb8e88a49b61a5dd106e666b0429c8f4f6483bc4af0363e88eb95c5159457b7049cc11a2c99a6495c6895
+DIST yt-dlp-2022.3.8.1.tar.gz 2220785 BLAKE2B 
787fbd29bf5330deb8d731f38501aeeb393149591f926c314b9a0b38c72c03548c29bdb98209b982eebf2e11d2d4ca45dfb146e2bec3ca553a82d68b10ea5735
 SHA512 
1d3728cdac1eb9f46de8c80ca364f5f4fd026b9d2e13db375682e0b7f755dd80b6f55f88e62232d243ee1584dcd10ac65e71244aa4c17e731c9a9576d825130f

diff --git a/net-misc/yt-dlp/yt-dlp-2022.3.8.1.ebuild 
b/net-misc/yt-dlp/yt-dlp-2022.3.8.1.ebuild
new file mode 100644
index 000000000000..d6565fe8b148
--- /dev/null
+++ b/net-misc/yt-dlp/yt-dlp-2022.3.8.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+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[-yt-dlp(-)]"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+       distutils-r1_python_prepare_all
+
+       # setup.py reads requirements.txt but file is currently from
+       # pypi tarball, only keep pycryptodome either way for bug #828466
+       echo pycryptodome > requirements.txt || die
+}
+
+python_test() {
+       epytest -m 'not download' -p no:markdown
+}
+
+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} ]]; 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