Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/youtube-dl/
Date: Wed, 05 Oct 2016 04:59:34
Message-Id: 1475643506.40920739a71b13d4388c6ac3cf573111304e6a03.jer@gentoo
1 commit: 40920739a71b13d4388c6ac3cf573111304e6a03
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 5 04:58:26 2016 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 5 04:58:26 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40920739
7
8 net-misc/youtube-dl: Fix installing in Prefix by Jonathan Lovelace (bug #596188).
9
10 Package-Manager: portage-2.3.1
11
12 ...0.02.ebuild => youtube-dl-2016.10.02-r1.ebuild} | 2 +-
13 net-misc/youtube-dl/youtube-dl-99999999.ebuild | 65 ++++++++++++++++++----
14 2 files changed, 55 insertions(+), 12 deletions(-)
15
16 diff --git a/net-misc/youtube-dl/youtube-dl-2016.10.02.ebuild b/net-misc/youtube-dl/youtube-dl-2016.10.02-r1.ebuild
17 similarity index 98%
18 rename from net-misc/youtube-dl/youtube-dl-2016.10.02.ebuild
19 rename to net-misc/youtube-dl/youtube-dl-2016.10.02-r1.ebuild
20 index 233bdf4..1f0ca43 100644
21 --- a/net-misc/youtube-dl/youtube-dl-2016.10.02.ebuild
22 +++ b/net-misc/youtube-dl/youtube-dl-2016.10.02-r1.ebuild
23 @@ -95,5 +95,5 @@ python_install_all() {
24
25 distutils-r1_python_install_all
26
27 - rm -r "${D}"/usr/etc || die
28 + rm -r "${ED}"/usr/etc || die
29 }
30
31 diff --git a/net-misc/youtube-dl/youtube-dl-99999999.ebuild b/net-misc/youtube-dl/youtube-dl-99999999.ebuild
32 index 36b7973..260621e 100644
33 --- a/net-misc/youtube-dl/youtube-dl-99999999.ebuild
34 +++ b/net-misc/youtube-dl/youtube-dl-99999999.ebuild
35 @@ -5,7 +5,6 @@
36 EAPI=5
37
38 PYTHON_COMPAT=(python{2_7,3_3,3_4,3_5})
39 -DISTUTILS_SINGLE_IMPL=true
40 inherit bash-completion-r1 distutils-r1 eutils git-r3
41
42 DESCRIPTION="Download videos from YouTube.com (and more sites...)"
43 @@ -15,7 +14,7 @@ EGIT_REPO_URI="https://github.com/rg3/youtube-dl.git"
44 LICENSE="public-domain"
45 SLOT="0"
46 KEYWORDS=""
47 -IUSE="test"
48 +IUSE="offensive test"
49
50 RDEPEND="
51 dev-python/setuptools[${PYTHON_USEDEP}]
52 @@ -26,21 +25,65 @@ DEPEND="
53 test? ( dev-python/nose[coverage(+)] )
54 "
55
56 +python_prepare_all() {
57 + if ! use offensive; then
58 + sed -i -e "/__version__/s|'$|-gentoo_no_offensive_sites'|g" \
59 + youtube_dl/version.py || die
60 + # these have single line import statements
61 + local xxx=(
62 + alphaporno anysex behindkink camwithher chaturbate drtuber eporner
63 + eroprofile extremetube fourtube foxgay goshgay hellporno
64 + hentaistigma hornbunny keezmovies lovehomeporn mofosex motherless
65 + myvidster porn91 pornhd pornotube pornovoisines pornoxo redtube
66 + ruleporn sexu slutload spankbang spankwire sunporno thisav tube8
67 + vporn watchindianporn xbef xnxx xtube xvideos xxxymovies youjizz
68 + youporn
69 + )
70 + # these have multi-line import statements
71 + local mxxx=(
72 + pornhub xhamster tnaflix
73 + )
74 + # do single line imports
75 + sed -i \
76 + -e $( printf '/%s/d;' ${xxx[@]} ) \
77 + youtube_dl/extractor/extractors.py \
78 + || die
79 +
80 + # do multiple line imports
81 + sed -i \
82 + -e $( printf '/%s/,/)/d;' ${mxxx[@]} ) \
83 + youtube_dl/extractor/extractors.py \
84 + || die
85 +
86 + sed -i \
87 + -e $( printf '/%s/d;' ${mxxx[@]} ) \
88 + youtube_dl/extractor/generic.py \
89 + || die
90 +
91 + rm \
92 + $( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \
93 + $( printf 'youtube_dl/extractor/%s.py ' ${mxxx[@]} ) \
94 + test/test_age_restriction.py \
95 + || die
96 + fi
97 +
98 + epatch_user
99 +
100 + distutils-r1_python_prepare_all
101 +}
102 +
103 src_compile() {
104 distutils-r1_src_compile
105 - emake -C docs man
106 - ${PYTHON} devscripts/bash-completion.py
107 }
108
109 -src_test() {
110 +python_test() {
111 emake test
112 }
113
114 -src_install() {
115 - python_domodule youtube_dl
116 - dobin bin/${PN}
117 +python_install_all() {
118 dodoc README.md
119 - doman docs/_build/man/${PN}.1
120 - newbashcomp ${PN}.bash-completion ${PN}
121 - python_fix_shebang "${ED}"
122 +
123 + distutils-r1_python_install_all
124 +
125 + rm -r "${ED}"/usr/etc || die
126 }