/[gentoo-x86]/net-misc/youtube-dl/youtube-dl-2015.07.04.ebuild
Gentoo

Contents of /net-misc/youtube-dl/youtube-dl-2015.07.04.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jul 8 04:45:04 2015 UTC (4 years, 5 months ago) by jer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key A792A613)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/youtube-dl/youtube-dl-2015.07.04.ebuild,v 1.1 2015/07/05 04:05:06 jer Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=(python{2_7,3_3,3_4})
8 DISTUTILS_SINGLE_IMPL=true
9 inherit bash-completion-r1 distutils-r1 eutils
10
11 DESCRIPTION="Download videos from YouTube.com (and more sites...)"
12 HOMEPAGE="http://rg3.github.com/youtube-dl/"
13 SRC_URI="http://youtube-dl.org/downloads/${PV}/${P}.tar.gz"
14
15 LICENSE="public-domain"
16 SLOT="0"
17 KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
18 IUSE="offensive test"
19
20 DEPEND="
21 dev-python/setuptools[${PYTHON_USEDEP}]
22 test? ( dev-python/nose[coverage(+)] )
23 "
24
25 S="${WORKDIR}/${PN}"
26
27 src_prepare() {
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 drtuber eporner eroprofile extremetube
34 fourtube foxgay goshgay hellporno hentaistigma hornbunny keezmovies
35 mofosex motherless porn91 pornhd pornotube pornovoisines pornoxo
36 redtube sexykarma sexu sunporno slutload spankbang spankwire thisav
37 tnaflix trutube tube8 vporn xbef xnxx xtube xvideos xxxymovies
38 youjizz youporn
39 )
40 # these have multi-line import statements
41 local mxxx=(
42 pornhub xhamster
43 )
44 # do single line imports
45 sed -i \
46 -e $( printf '/%s/d;' ${xxx[@]} ) \
47 youtube_dl/extractor/__init__.py \
48 || die
49
50 # do multiple line imports
51 sed -i \
52 -e $( printf '/%s/,/)/d;' ${mxxx[@]} ) \
53 youtube_dl/extractor/__init__.py \
54 || die
55
56 sed -i \
57 -e $( printf '/%s/d;' ${mxxx[@]} ) \
58 youtube_dl/extractor/generic.py \
59 youtube_dl/extractor/tumblr.py \
60 || die
61
62 rm \
63 $( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \
64 $( printf 'youtube_dl/extractor/%s.py ' ${mxxx[@]} ) \
65 test/test_age_restriction.py \
66 || die
67 fi
68
69 epatch_user
70 }
71
72 src_compile() {
73 distutils-r1_src_compile
74 }
75
76 src_test() {
77 emake test
78 }
79
80 src_install() {
81 python_domodule youtube_dl
82 dobin bin/${PN}
83 dodoc README.txt
84 doman ${PN}.1
85 newbashcomp ${PN}.bash-completion ${PN}
86 python_fix_shebang "${ED}"
87 }

  ViewVC Help
Powered by ViewVC 1.1.20