From 87dab152decd44422608056bf528ac2f8010fed2 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 13 Mar 2016 20:56:03 +0000 Subject: [PATCH] app-text/docbook-xsl-stylesheets: Fix #575818 (Java), #536600 (Ruby) Delete the unnecessary Java-related stuff and other tools as they bloat the stage3 tarballs massively. Fixes bug #575818. A java USE flag could be added but it's probably not worth the hassle. Use the ruby-single eclass as suggested by graaff in bug #536600. I was going to do dev-lang/ruby:* as suggested by pacho but ruby-single seems like the correct thing to do and I don't want to go against the Ruby team. This also removes a useless find call. Package-Manager: portage-2.2.28 --- ... docbook-xsl-stylesheets-1.79.1-r1.ebuild} | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) rename app-text/docbook-xsl-stylesheets/{docbook-xsl-stylesheets-1.79.1.ebuild => docbook-xsl-stylesheets-1.79.1-r1.ebuild} (77%) diff --git a/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1.ebuild b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r1.ebuild similarity index 77% rename from app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1.ebuild rename to app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r1.ebuild index aeba63242dee..58caa01cfafa 100644 --- a/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1.ebuild +++ b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r1.ebuild @@ -1,9 +1,13 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 +USE_RUBY="ruby20 ruby21 ruby22 ruby23" + +inherit ruby-single + DOCBOOKDIR="/usr/share/sgml/${PN/-//}" MY_PN="${PN%-stylesheets}" MY_P="${MY_PN}-${PV}" @@ -18,14 +22,25 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~s IUSE="ruby" RDEPEND=">=app-text/build-docbook-catalog-1.1 -ruby? ( || ( dev-lang/ruby:2.0 dev-lang/ruby:2.1 dev-lang/ruby:2.2 ) )" -DEPEND="" + ruby? ( ${RUBY_DEPS} )" S="${WORKDIR}/${MY_P}" # Makefile is broken since 1.76.0 RESTRICT=test +src_prepare() { + # Delete the unnecessary Java-related stuff and other tools as they + # bloat the stage3 tarballs massively. See bug #575818. + rm -rv extensions/ tools/ || die + find \( -name build.xml -o -name build.properties \) \ + -printf "removed %p\n" -delete || die + + if ! use ruby; then + rm -rv epub/ || die + fi +} + # The makefile runs tests, not builds. src_compile() { :; } @@ -42,8 +57,8 @@ src_install() { doins VERSION VERSION.xsl local i - for i in $(find . -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do - [[ "$i" == "epub" ]] && ! use ruby && continue + for i in */; do + i=${i%/} cd "${S}"/${i} for doc in ChangeLog README; do -- 2.26.2