diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2024-04-09 13:40:38 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2024-04-09 13:49:45 -0400 |
commit | d61457d93fd1ae052ff77d03dfe4ecd43c1e8927 (patch) | |
tree | b3aaa87e8d77edd03e3497164177a3695d084ea2 | |
parent | app-dicts/mecab-ipadic: Stabilize 2.7.0.20070801-r1 sparc, #925606 (diff) | |
download | gentoo-d61457d93fd1ae052ff77d03dfe4ecd43c1e8927.tar.gz gentoo-d61457d93fd1ae052ff77d03dfe4ecd43c1e8927.tar.bz2 gentoo-d61457d93fd1ae052ff77d03dfe4ecd43c1e8927.zip |
net-misc/yt-dlp: add 2024.04.09
Straight-to-stable due to notable fixes with youtube and should
be little reason to wait.
(there is also a security fix albeit it only impact Windows)
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r-- | net-misc/yt-dlp/Manifest | 1 | ||||
-rw-r--r-- | net-misc/yt-dlp/yt-dlp-2024.04.09.ebuild | 77 |
2 files changed, 78 insertions, 0 deletions
diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest index 6297e39765d8..3a5a8a641a5d 100644 --- a/net-misc/yt-dlp/Manifest +++ b/net-misc/yt-dlp/Manifest @@ -1 +1,2 @@ DIST yt-dlp-2024.03.10.tar.gz 5515436 BLAKE2B ce25d2ce78ebd107deab12a117ac9efa634052264d780c62531226c7128b1ba5ca52c952dc85dcefe137aadf08cffa417a135b996f864315866c35fd7209ec6b SHA512 6bfe1aeab98f559a2b23ffa12b63b40974312709039313695f41c7beb16d29f21953c61ab633d567e42deeec72fb0932950ddeb4b821fffb93fbae9ae0cb30a2 +DIST yt-dlp-2024.04.09.tar.gz 5589808 BLAKE2B ada1c3be28c4615a96b4fef9d39144b49548e97be6fab003596f11db905efa2607ea3d62ba529aee8391320bf4e3cd3c9367a5eab0439822fd98407fde2807fb SHA512 5eada1c6a3d656c4f70552824a59ed677ecc102e1a2c3475a12fccff78ea267d7391e778060d708bf0aca1bdf92f4bf413785e0cd65b43259535577e92755556 diff --git a/net-misc/yt-dlp/yt-dlp-2024.04.09.ebuild b/net-misc/yt-dlp/yt-dlp-2024.04.09.ebuild new file mode 100644 index 000000000000..f811e455142d --- /dev/null +++ b/net-misc/yt-dlp/yt-dlp-2024.04.09.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{10..12} ) +inherit bash-completion-r1 distutils-r1 optfeature wrapper + +DESCRIPTION="youtube-dl fork with additional features and fixes" +HOMEPAGE="https://github.com/yt-dlp/yt-dlp/" +SRC_URI=" + https://github.com/yt-dlp/yt-dlp/releases/download/${PV}/${PN}.tar.gz + -> ${P}.tar.gz +" +S="${WORKDIR}/${PN}" + +LICENSE="Unlicense" +SLOT="0" +KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~riscv x86 ~arm64-macos ~x64-macos" + +RDEPEND=" + dev-python/pycryptodome[${PYTHON_USEDEP}] + !net-misc/youtube-dl[-yt-dlp(-)] +" + +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + # adjust pycryptodome and drop optional dependencies (bug #828466) + sed -Ei pyproject.toml \ + -e 's/("pycryptodome)x/\1/' \ + -e '/"(brotli.*|certifi|mutagen|requests|urllib3|websockets)/d' || die +} + +python_test() { + local EPYTEST_DESELECT=( + # fails with FEATURES=network-sandbox + test/test_networking.py::TestHTTPRequestHandler::test_connect_timeout + # fails with FEATURES=distcc, bug #915614 + test/test_networking.py::TestYoutubeDLNetworking::test_proxy\[None-expected2\] + ) + + epytest -m 'not download' +} + +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 + + make_wrapper youtube-dl "yt-dlp --compat-options youtube-dl" +} + +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 + optfeature "decrypting cookies from Chromium-based browsers" dev-python/secretstorage + + 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 +} |