Browse Source

Add a more recent youtube-dl release

master
Alarig Le Lay 8 months ago
parent
commit
08ec46219f
2 changed files with 119 additions and 0 deletions
  1. 2
    0
      net-misc/youtube-dl/Manifest
  2. 117
    0
      net-misc/youtube-dl/youtube-dl-2018.11.07.ebuild

+ 2
- 0
net-misc/youtube-dl/Manifest View File

@@ -0,0 +1,2 @@
1
+DIST youtube-dl-2018.11.07.tar.gz 3053158 BLAKE2B e6220003a570158d0da2b054489297ac2c65b7e657d9e713a1229d2b22ed0a1d2e29d171809f5cdb76a5e22e11add15b25449729e1f58316450cf7054c0ded8b SHA512 9bb552e1343d151c98aa20a91728d59cfea1ec24d838533af57a3d25c5ab4be7e1de2aac2e426632835a20ed0ef3516ce3c8cccdc9b0d2505bd1516d5b9e910d
2
+EBUILD youtube-dl-2018.11.07.ebuild 3439 BLAKE2B 2e9fcd2e40f815a9d75bb7adff01f12afa5345c027f5dc55b9e20b30a3055bef402d66361048a9cc6cb71e1e6b3982e3b059bee837fb8d36c886be616d078490 SHA512 b46ab94dffbea58076d3b83de105a1c51ed1ae2213ff9b26b074cdcc41ec8ed97223baf92aec78ca2c56d0614826893a01ee0ca8e2e5667561dc43fec12ebbca

+ 117
- 0
net-misc/youtube-dl/youtube-dl-2018.11.07.ebuild View File

@@ -0,0 +1,117 @@
1
+# Copyright 1999-2018 Gentoo Authors
2
+# Distributed under the terms of the GNU General Public License v2
3
+
4
+EAPI=6
5
+PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
6
+inherit bash-completion-r1 distutils-r1 readme.gentoo-r1
7
+
8
+DESCRIPTION="Download videos from YouTube.com (and more sites...)"
9
+HOMEPAGE="https://rg3.github.com/youtube-dl/"
10
+SRC_URI="https://youtube-dl.org/downloads/${PV}/${P}.tar.gz"
11
+
12
+LICENSE="public-domain"
13
+SLOT="0"
14
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
15
+IUSE="+offensive test"
16
+
17
+RDEPEND="
18
+	dev-python/setuptools[${PYTHON_USEDEP}]
19
+"
20
+DEPEND="
21
+	${RDEPEND}
22
+	test? ( dev-python/nose[coverage(+)] )
23
+"
24
+
25
+S="${WORKDIR}/${PN}"
26
+
27
+python_prepare_all() {
28
+	if ! use offensive; then
29
+		sed -i -e "/..version../s|'$|+gentoo.no.offensive.sites'|g" \
30
+			youtube_dl/version.py || die
31
+		# these have single line import statements
32
+		local xxx=(
33
+			alphaporno anysex behindkink camwithher chaturbate eporner
34
+			eroprofile extremetube foxgay goshgay hellporno hentaistigma
35
+			hornbunny keezmovies lovehomeporn mofosex myvidster porn91 porncom
36
+			pornflip pornhd pornotube pornovoisines pornoxo ruleporn sexu
37
+			slutload spankbang spankwire sunporno thisav vporn watchindianporn
38
+			xbef xnxx xtube xvideos xxxymovies youjizz youporn
39
+		)
40
+		# these have multi-line import statements
41
+		local mxxx=(
42
+			drtuber fourtube motherless pornhub redtube tnaflix tube8 xhamster
43
+		)
44
+		# do single line imports
45
+		sed -i \
46
+			-e $( printf '/%s/d;' ${xxx[@]} ) \
47
+			youtube_dl/extractor/extractors.py \
48
+			|| die
49
+
50
+		# do multiple line imports
51
+		sed -i \
52
+			-e $( printf '/%s/,/)/d;' ${mxxx[@]} ) \
53
+			youtube_dl/extractor/extractors.py \
54
+			|| die
55
+
56
+		sed -i \
57
+			-e $( printf '/%s/d;' ${mxxx[@]} ) \
58
+			youtube_dl/extractor/generic.py \
59
+			|| die
60
+
61
+		rm \
62
+			$( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \
63
+			$( printf 'youtube_dl/extractor/%s.py ' ${mxxx[@]} ) \
64
+			test/test_age_restriction.py \
65
+			|| die
66
+	fi
67
+
68
+	eapply_user
69
+
70
+	distutils-r1_python_prepare_all
71
+}
72
+
73
+src_compile() {
74
+	distutils-r1_src_compile
75
+}
76
+
77
+python_test() {
78
+	emake test
79
+}
80
+
81
+python_install_all() {
82
+	dodoc README.txt
83
+	doman ${PN}.1
84
+
85
+	newbashcomp ${PN}.bash-completion ${PN}
86
+
87
+	insinto /usr/share/zsh/site-functions
88
+	newins youtube-dl.zsh _youtube-dl
89
+
90
+	insinto /usr/share/fish/vendor_completions.d
91
+	doins youtube-dl.fish
92
+
93
+	distutils-r1_python_install_all
94
+
95
+	rm -r "${ED}"/usr/etc || die
96
+	rm -r "${ED}"/usr/share/doc/youtube_dl || die
97
+}
98
+
99
+pkg_postinst() {
100
+	elog "youtube-dl(1) / https://bugs.gentoo.org/355661 /"
101
+	elog "https://github.com/rg3/youtube-dl/blob/master/README.md#faq :"
102
+	elog
103
+	elog "${PN} works fine on its own on most sites. However, if you want"
104
+	elog "to convert video/audio, you'll need avconf (media-video/libav) or"
105
+	elog "ffmpeg (media-video/ffmpeg). On some sites - most notably YouTube -"
106
+	elog "videos can be retrieved in a higher quality format without sound."
107
+	elog "${PN} will detect whether avconv/ffmpeg is present and"
108
+	elog "automatically pick the best option."
109
+	elog
110
+	elog "Videos or video formats streamed via RTMP protocol can only be"
111
+	elog "downloaded when rtmpdump (media-video/rtmpdump) is installed."
112
+	elog "Downloading MMS and RTSP videos requires either mplayer"
113
+	elog "(media-video/mplayer) or mpv (media-video/mpv) to be installed."
114
+	elog
115
+	elog "If you want ${PN} to embed thumbnails from the metadata into the"
116
+	elog "resulting MP4 files, consider installing media-video/atomicparsley"
117
+}

Loading…
Cancel
Save