forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
- Loading branch information
Jeroen Roovers
committed
Jan 20, 2017
1 parent
2305d0b
commit 8e12d77
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DIST youtube-dl-2016.12.22.tar.gz 2502964 SHA256 f5bc5eb1af17391b7a1da795f4181c3702fb2c1da2668b25f1260dbdba882524 SHA512 87fee134da660a4feb4cfcd2cbb35cb9682e6ed08c766e3c89f6c986f991cac78c64f5bf8a1d15c4080e4df0909c6a360137407a7896b93f8f41cf4493f341cb WHIRLPOOL 6909d34958e4152be3334723c68d207bb34db2996d90908829ebd3ee45d28768d7f6cba8ce0fb19de440b34fb96b46b3d5b8bf830c998037c4f4d59e574206c3 | ||
DIST youtube-dl-2017.01.10.tar.gz 2517299 SHA256 6493d1400c5735221d65688548ada4d45875f25562f7c49c73263d9ae4369932 SHA512 c5c8a1b9650e0580a9b0243e71401427dd9806e9bc588140d2fa7cb32fc8889361164d175c9660363f67b762a6283a7de5948135c25fb210e6da771b94423a42 WHIRLPOOL 0e2a2d7a6bf1ecce4a599606772cb0e6b00e43920d6961a612b158f1e1e2906d71cb2f9d0158dbcb7c446201017649d67523782e2c6c11b0b5f2ecae9d48bc6b | ||
DIST youtube-dl-2017.01.14.tar.gz 2518837 SHA256 76c8bd77db6c820bfa72f1e2a873101ca736fd1d9954ccebf349fa7caef99cca SHA512 4371dba5b1ba0b35a26e8be424cebbaaaf823338a59ef4e5c6925ef966fbe5c2bd1c15a6ff58085cb36513fe991d79a0d77171051ff5730eca017bd4df9fe494 WHIRLPOOL 2822a2bfe39cacc759fc123a494a78d9b541abc5468f69bb2b19a6918dcd4fab720c4edbda7ff415c5acc4c0233340918b695f6d15007b60e5568834932e1fcc | ||
DIST youtube-dl-2017.01.18.tar.gz 2521980 SHA256 7c16f3ce7cf8a673a4c531e4a1fc10801467a61732cb65430e40b3ab8b2f2d2e SHA512 12333f99ce3bd264081db42f19cf855d0739a099cd5a34cb17341fd3dd8297325bf874a1f6b6e74acb7917a5e0bfb89b5cc6bce0231587b2a15c38335a49d5d7 WHIRLPOOL ae006ec199020315520173f6ae56724bb5eaa858a030e7e71e730df359a8e87caf9cb2610b6b1cd65912272891c1f19c3fd90d6304c93b45d2e51996a62cf985 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=5 | ||
|
||
PYTHON_COMPAT=(python{2_7,3_4,3_5}) | ||
inherit bash-completion-r1 distutils-r1 eutils | ||
|
||
DESCRIPTION="Download videos from YouTube.com (and more sites...)" | ||
HOMEPAGE="https://rg3.github.com/youtube-dl/" | ||
SRC_URI="http://youtube-dl.org/downloads/${PV}/${P}.tar.gz" | ||
|
||
LICENSE="public-domain" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris" | ||
IUSE="offensive test" | ||
|
||
RDEPEND=" | ||
dev-python/setuptools[${PYTHON_USEDEP}] | ||
" | ||
DEPEND=" | ||
${RDEPEND} | ||
test? ( dev-python/nose[coverage(+)] ) | ||
" | ||
|
||
S="${WORKDIR}/${PN}" | ||
|
||
python_prepare_all() { | ||
if ! use offensive; then | ||
sed -i -e "/__version__/s|'$|-gentoo_no_offensive_sites'|g" \ | ||
youtube_dl/version.py || die | ||
# these have single line import statements | ||
local xxx=( | ||
alphaporno anysex behindkink camwithher chaturbate eporner | ||
eroprofile extremetube fourtube foxgay goshgay hellporno | ||
hentaistigma hornbunny keezmovies lovehomeporn mofosex motherless | ||
myvidster porn91 porncom pornhd pornotube pornovoisines pornoxo | ||
ruleporn sexu slutload spankbang spankwire sunporno thisav tube8 | ||
vporn watchindianporn xbef xnxx xtube xvideos xxxymovies youjizz | ||
youporn | ||
) | ||
# these have multi-line import statements | ||
local mxxx=( | ||
drtuber pornhub redtube xhamster tnaflix | ||
) | ||
# do single line imports | ||
sed -i \ | ||
-e $( printf '/%s/d;' ${xxx[@]} ) \ | ||
youtube_dl/extractor/extractors.py \ | ||
|| die | ||
|
||
# do multiple line imports | ||
sed -i \ | ||
-e $( printf '/%s/,/)/d;' ${mxxx[@]} ) \ | ||
youtube_dl/extractor/extractors.py \ | ||
|| die | ||
|
||
sed -i \ | ||
-e $( printf '/%s/d;' ${mxxx[@]} ) \ | ||
youtube_dl/extractor/generic.py \ | ||
|| die | ||
|
||
rm \ | ||
$( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \ | ||
$( printf 'youtube_dl/extractor/%s.py ' ${mxxx[@]} ) \ | ||
test/test_age_restriction.py \ | ||
|| die | ||
fi | ||
|
||
epatch_user | ||
|
||
distutils-r1_python_prepare_all | ||
} | ||
|
||
src_compile() { | ||
distutils-r1_src_compile | ||
} | ||
|
||
python_test() { | ||
emake test | ||
} | ||
|
||
python_install_all() { | ||
dodoc README.txt | ||
doman ${PN}.1 | ||
|
||
newbashcomp ${PN}.bash-completion ${PN} | ||
|
||
insinto /usr/share/zsh/site-functions | ||
newins youtube-dl.zsh _youtube-dl | ||
|
||
insinto /usr/share/fish/completions | ||
doins youtube-dl.fish | ||
|
||
distutils-r1_python_install_all | ||
|
||
rm -r "${ED}"/usr/etc || die | ||
} |