Fix build with USE=doc; drop rake-compiler dependency altogether. Bug #395133 by...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Mon, 19 Dec 2011 18:36:50 +0000 (18:36 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Mon, 19 Dec 2011 18:36:50 +0000 (18:36 +0000)
Package-Manager: portage-2.2.0_alpha81/cvs/Linux x86_64

dev-ruby/pg/ChangeLog
dev-ruby/pg/pg-0.12.0-r1.ebuild

index 549f526cc667ca19adcbbc6fd2bae2f722547c9c..5ad7685104f6a9af9f96d053d1edc7bf090ee0cf 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-ruby/pg
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/pg/ChangeLog,v 1.42 2011/12/18 21:13:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/pg/ChangeLog,v 1.43 2011/12/19 18:36:50 flameeyes Exp $
+
+  19 Dec 2011; Diego E. Pettenò <flameeyes@gentoo.org> pg-0.12.0-r1.ebuild:
+  Fix build with USE=doc; drop rake-compiler dependency altogether. Bug #395133
+  by onip.
 
 *pg-0.12.0-r1 (18 Dec 2011)
 
index df4f7b78defc631394a8602cfaf819e8cec4d605..4fd098d5131f956fa7b8108a8cb9b5141004005a 100644 (file)
@@ -1,14 +1,14 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/pg/pg-0.12.0-r1.ebuild,v 1.1 2011/12/18 21:13:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/pg/pg-0.12.0-r1.ebuild,v 1.2 2011/12/19 18:36:50 flameeyes Exp $
 
 EAPI=4
 USE_RUBY="ruby18 ree18 ruby19"
 
 RUBY_FAKEGEM_TEST_TASK=""
 
-RUBY_FAKEGEM_TASK_DOC="apidocs"
-RUBY_FAKEGEM_DOCDIR="docs/api"
+RUBY_FAKEGEM_TASK_DOC="redocs"
+RUBY_FAKEGEM_DOCDIR="doc"
 RUBY_FAKEGEM_EXTRADOC="ChangeLog Contributors.rdoc README.rdoc History.rdoc"
 
 inherit ruby-fakegem
@@ -30,7 +30,6 @@ DEPEND="${DEPEND}
 ruby_add_bdepend "
        doc? (
                dev-ruby/hoe
-               dev-ruby/rake-compiler
                || ( >=dev-ruby/yard-0.6.1 dev-ruby/rdoc ) )
        test? ( dev-ruby/rspec:2 )"
 
@@ -38,8 +37,17 @@ all_ruby_prepare() {
        # this is required to make rake-compiler a build-time only
        # dependency rather than a runtime one. Without this, bundler will
        # fail to load pg if rake-compiler is not installed as well (which
-       # is silly).
+       # is silly). This also allows us not to depend on it at all, since
+       # we build the extension on our own.
        sed -i -e 's|:runtime|:development|' ../metadata || die
+
+       # hack the Rakefile to make it sure that it doesn't load
+       # rake-compiler (so that we don't have to depend on it and it
+       # actually works when building with USE=doc).
+       sed -i \
+               -e '/Rakefile.cross/s:^:#:' \
+               -e '/ExtensionTask/,/^end$/ s:^:#:' \
+               Rakefile || die
 }
 
 each_ruby_configure() {