1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2024 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
DISTUTILS_USE_PEP517=hatchling
|
7 |
7 |
PYTHON_COMPAT=( pypy3 python3_{10..13} )
|
8 |
|
inherit bash-completion-r1 distutils-r1 optfeature wrapper
|
|
8 |
inherit bash-completion-r1 distutils-r1 git-r3 optfeature wrapper
|
9 |
9 |
|
10 |
10 |
DESCRIPTION="youtube-dl fork with additional features and fixes"
|
11 |
11 |
HOMEPAGE="https://github.com/yt-dlp/yt-dlp/"
|
12 |
|
SRC_URI="
|
13 |
|
https://github.com/yt-dlp/yt-dlp/releases/download/${PV}/${PN}.tar.gz
|
14 |
|
-> ${P}.tar.gz
|
15 |
|
"
|
16 |
|
S=${WORKDIR}/${PN}
|
|
12 |
EGIT_REPO_URI="https://github.com/yt-dlp/yt-dlp.git"
|
17 |
13 |
|
18 |
14 |
LICENSE="Unlicense"
|
19 |
15 |
SLOT="0"
|
20 |
|
# note that yt-dlp bumps are typically done straight-to-stable (unless there
|
21 |
|
# was major/breaking changes) given website changes breaks it on a whim
|
22 |
|
KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~riscv x86 ~arm64-macos ~x64-macos"
|
|
16 |
IUSE="man"
|
23 |
17 |
|
24 |
18 |
RDEPEND="
|
25 |
19 |
dev-python/pycryptodome[${PYTHON_USEDEP}]
|
26 |
20 |
!net-misc/youtube-dl[-yt-dlp(-)]
|
27 |
21 |
"
|
|
22 |
BDEPEND="
|
|
23 |
man? ( virtual/pandoc )
|
|
24 |
"
|
28 |
25 |
|
29 |
26 |
distutils_enable_tests pytest
|
30 |
27 |
|
|
28 |
python_compile() {
|
|
29 |
# generate missing files in live, not in compile_all nor prepare
|
|
30 |
# given need lazy before compile and it needs a usable ${PYTHON}
|
|
31 |
emake completions lazy-extractors $(usev man yt-dlp.1)
|
|
32 |
|
|
33 |
"${EPYTHON}" devscripts/update-version.py || die
|
|
34 |
|
|
35 |
distutils-r1_python_compile
|
|
36 |
}
|
|
37 |
|
31 |
38 |
python_test() {
|
32 |
39 |
local EPYTEST_DESELECT=(
|
33 |
40 |
# fails with FEATURES=network-sandbox
|
... | ... | |
41 |
48 |
|
42 |
49 |
python_install_all() {
|
43 |
50 |
dodoc README.md Changelog.md supportedsites.md
|
44 |
|
doman yt-dlp.1
|
|
51 |
use man && doman yt-dlp.1
|
45 |
52 |
|
46 |
53 |
dobashcomp completions/bash/yt-dlp
|
47 |
54 |
|
... | ... | |
51 |
58 |
insinto /usr/share/zsh/site-functions
|
52 |
59 |
doins completions/zsh/_yt-dlp
|
53 |
60 |
|
54 |
|
rm -r "${ED}"/usr/share/doc/yt_dlp || die
|
55 |
|
|
56 |
61 |
make_wrapper youtube-dl "yt-dlp --compat-options youtube-dl"
|
57 |
62 |
}
|
58 |
63 |
|