net-misc/youtube-dl: Remove USE=offensive, add RESTRICT=test
authorJeroen Roovers <jer@gentoo.org>
Mon, 28 Jan 2019 18:26:07 +0000 (19:26 +0100)
committerJeroen Roovers <jer@gentoo.org>
Mon, 28 Jan 2019 18:30:00 +0000 (19:30 +0100)
Bug: https://bugs.gentoo.org/show_bug.cgi?id=599928
Closes: https://bugs.gentoo.org/show_bug.cgi?id=605010
Closes: https://bugs.gentoo.org/show_bug.cgi?id=635996
Closes: https://bugs.gentoo.org/show_bug.cgi?id=643200
Closes: https://bugs.gentoo.org/show_bug.cgi?id=676532
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-misc/youtube-dl/youtube-dl-2019.01.27.ebuild
net-misc/youtube-dl/youtube-dl-99999999.ebuild

index 6ef55f59a57e2448fb4688a9b00eb4ef0476ef18..2cb0551f3e35003f2e25d402b2099c3d50b7289e 100644 (file)
@@ -8,76 +8,23 @@ inherit bash-completion-r1 distutils-r1 readme.gentoo-r1
 DESCRIPTION="Download videos from YouTube.com (and more sites...)"
 HOMEPAGE="https://rg3.github.com/youtube-dl/"
 SRC_URI="https://youtube-dl.org/downloads/${PV}/${P}.tar.gz"
-
 LICENSE="public-domain"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
-IUSE="+offensive test"
 
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+RESTRICT="test"
+SLOT="0"
 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 foxgay goshgay hellporno hentaistigma
-                       hornbunny keezmovies lovehomeporn mofosex myvidster porn91 porncom
-                       pornflip pornhd pornotube pornovoisines pornoxo ruleporn sexu
-                       slutload spankbang spankwire sunporno thisav vporn watchindianporn
-                       xbef xnxx xtube xvideos xxxymovies youjizz youporn
-               )
-               # these have multi-line import statements
-               local mxxx=(
-                       drtuber fourtube motherless pornhub redtube tnaflix tube8 xhamster
-               )
-               # 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
-
-       eapply_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
index 4713e21251b328a403756a05ee6663f092187742..632093ebfdb4573440c8a2f3ea4f6f6ea1ecce00 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -8,76 +8,24 @@ inherit bash-completion-r1 distutils-r1 git-r3 readme.gentoo-r1
 DESCRIPTION="Download videos from YouTube.com (and more sites...)"
 HOMEPAGE="https://rg3.github.com/youtube-dl/"
 EGIT_REPO_URI="https://github.com/rg3/youtube-dl"
-
 LICENSE="public-domain"
-SLOT="0"
-KEYWORDS=""
-IUSE="+offensive test"
 
+KEYWORDS=""
+RESTRICT="test"
+SLOT="0"
 RDEPEND="
        dev-python/setuptools[${PYTHON_USEDEP}]
 "
 DEPEND="
        ${RDEPEND}
-       test? ( dev-python/nose[coverage(+)] )
 "
 
-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 foxgay goshgay hellporno hentaistigma
-                       hornbunny keezmovies lovehomeporn mofosex myvidster porn91 porncom
-                       pornflip pornhd pornotube pornovoisines pornoxo ruleporn sexu
-                       slutload spankbang spankwire sunporno thisav vporn watchindianporn
-                       xbef xnxx xtube xvideos xxxymovies youjizz youporn
-               )
-               # these have multi-line import statements
-               local mxxx=(
-                       drtuber fourtube motherless pornhub redtube tnaflix tube8 xhamster
-               )
-               # 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
-
-       eapply_user
-
-       distutils-r1_python_prepare_all
-}
-
 src_compile() {
        distutils-r1_src_compile
 
        emake ${PN}.{bash-completion,fish,zsh}
 }
 
-python_test() {
-       emake test
-}
-
 python_install_all() {
        dodoc README.md