commit:     87dab152decd44422608056bf528ac2f8010fed2
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 13 20:56:03 2016 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Mar 13 21:28:31 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87dab152

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

 ...ld => docbook-xsl-stylesheets-1.79.1-r1.ebuild} | 25 +++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

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 aeba632..58caa01 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

Reply via email to