summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-03-04 04:25:51 -0500
committerIonen Wolkens <ionen@gentoo.org>2023-03-04 04:40:41 -0500
commit62dd5087051cb26f2450097577e26fa2d521ea73 (patch)
tree3ba379a200754c9eebcdc76538ec356d86834e4e /net-misc/yt-dlp
parentapp-forensics/aflplusplus: Stabilize 4.05c amd64, #899518 (diff)
downloadgentoo-62dd5087051cb26f2450097577e26fa2d521ea73.tar.gz
gentoo-62dd5087051cb26f2450097577e26fa2d521ea73.tar.bz2
gentoo-62dd5087051cb26f2450097577e26fa2d521ea73.zip
net-misc/yt-dlp: add 2023.03.03, switch to github release tarball
Current PyPI's is missing the man page and, while it may come back in future versions, this let us switch to the same versioning upstream uses with padding 0 in dates for readability (note this actual releases, not automated git archives). Also straight-to-stable given it fixes youtube throttling issues again. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'net-misc/yt-dlp')
-rw-r--r--net-misc/yt-dlp/Manifest1
-rw-r--r--net-misc/yt-dlp/yt-dlp-2023.03.03.ebuild66
2 files changed, 67 insertions, 0 deletions
diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest
index c48aab5f3ee5..3c65e3404ae3 100644
--- a/net-misc/yt-dlp/Manifest
+++ b/net-misc/yt-dlp/Manifest
@@ -1 +1,2 @@
+DIST yt-dlp-2023.03.03.tar.gz 5113424 BLAKE2B f20e255e32de15c3d25be2b2d73b526281f84dc2cc92667fa2d8887002559873c74aab98ce6f102705391e6621c8423d0e13f8fe2d01f47cbffa061b2fa74aa2 SHA512 179b96697d44d6bde6ca4f99ef90c70ce4b45d25c919e93355bc479765ee9ccaf37d19768b273b05d8018e1d19cd795acd735de8f62e5f160c446fd0feb4e7de
DIST yt-dlp-2023.2.17.tar.gz 2571278 BLAKE2B 74d077f5798e3371c42b5eb76e676619e7650a4003875d08995302c55120af7aa966a1e422cba6b0655cad4dedeed1874c2eb2348242fba9b0df12544d4dcfb3 SHA512 2458358410acb49ffc8fd4c49abddc78a5015ccf48979350fc5f9d4805c2dd8f7b728837ad30d55119cf8fc6842cba36a995ef9291da22af3135ae4a9077a5ba
diff --git a/net-misc/yt-dlp/yt-dlp-2023.03.03.ebuild b/net-misc/yt-dlp/yt-dlp-2023.03.03.ebuild
new file mode 100644
index 000000000000..59b22a558dd2
--- /dev/null
+++ b/net-misc/yt-dlp/yt-dlp-2023.03.03.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{9..11} )
+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 ~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 requires for pycryptodome and optional dependencies (bug #828466)
+ sed -ri requirements.txt \
+ -e "s/^(pycryptodome)x/\1/" \
+ -e "/^(brotli.*|certifi|mutagen|websockets)/d" || die
+}
+
+python_test() {
+ 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
+
+ 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
+}