summaryrefslogtreecommitdiff
path: root/net-misc/yt-dlp
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/yt-dlp')
-rw-r--r--net-misc/yt-dlp/Manifest2
-rw-r--r--net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild74
2 files changed, 76 insertions, 0 deletions
diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest
index ae96ba4ac296..97d9687accf6 100644
--- a/net-misc/yt-dlp/Manifest
+++ b/net-misc/yt-dlp/Manifest
@@ -1,3 +1,5 @@
DIST yt-dlp-2021.12.1.tar.gz 2064958 BLAKE2B d97bf6bc5d6a97aec05be73dcc00aac6b1aff011c307abcbf604a3bfab06dadfd28401eab8ad26d42b7ec3db778c66e9fa2de09d3e6c28304fd28791532509d9 SHA512 d04e9e5ae36e73923ac79bb98af6e402ba0b4403430cbcc0517e7f446d42b6c637846b11489c0159faf667ab798b937abb9597fb5fba76b6f7b6e2b379bae328
+DIST yt-dlp-2021.12.25.tar.gz 2096136 BLAKE2B b40e35f8e7f644051ca80d7d6eeb5d7963e5d0b0c5ffbbc10ed2e4d1f7133a43ec19a715e2ca131fb95ce31c322b952cb13b40adcfe1d8f655e1bd2162ec8329 SHA512 826abb5654527e37454424a949607d2c9934328228566ab0baa89df23ea081c3feb01584a25d0154d30d389d4c10cc7203ad530ddf8472ae70d6e782e3ded490
EBUILD yt-dlp-2021.12.1-r1.ebuild 2008 BLAKE2B 289ee6fd98fd60002e19aa82c706dc67f72a61c26b82fab1ec6cd9bf9d9461f8373473bfaf1c1be6931d0fcf98283c9868522c1b6fa805be3cb159e58985642c SHA512 cdd1d4390e74f2463a37db297b40ea0ba50c7676a364db00292242ea16a2488900d3f87a7db77724fd0d39cadc22c2b165766353d66f85af80d210ef61f817c9
+EBUILD yt-dlp-2021.12.25.ebuild 2010 BLAKE2B 281937f52d9ba8a97d5297c994a41a5cf702e6173019601e5cbe8b3757b69e02ba991e8feaad56bd66a63d172019321c9ab74840ab945f0ba62f51dc6cdc0413 SHA512 4120db145b0f3759dd55b3699f4a6bfa997c2d7b6dc44135576de870c9f016c41b5349d061f5d6977c8369265a48d5704fa39c83a4526374aae298099006b3ea
MISC metadata.xml 461 BLAKE2B cf54d866278b449c8551d3d1681df0c08315b3863fb2e61ece2613b9a263f9fc122b54028f6f6cce5442db62b49e8c422c5b0baccd57a79b63f926efcbb1a85b SHA512 bb30935bab43083ba0328512acf204d8494571b00ee08caadc53a300ffccef2ae63bab8852166d9c158ce554f15493deeffef17ae52f7fe82734f9ef6bbf07ff
diff --git a/net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild b/net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild
new file mode 100644
index 000000000000..449b50847e09
--- /dev/null
+++ b/net-misc/yt-dlp/yt-dlp-2021.12.25.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 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
+}