[rubygem-hoe] rescue RDoc::Task

Mamoru Tasaka mtasaka at fedoraproject.org
Thu Sep 8 18:17:54 UTC 2011


commit 811593736f6bf8a2a87a5f83a50436e16709ee7b
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date:   Fri Sep 9 03:17:41 2011 +0900

    rescue RDoc::Task

 rubygem-hoe-2.12.3-rdoctask-rescue.patch |   17 +++++++++++++++++
 rubygem-hoe.spec                         |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/rubygem-hoe-2.12.3-rdoctask-rescue.patch b/rubygem-hoe-2.12.3-rdoctask-rescue.patch
new file mode 100644
index 0000000..afecc36
--- /dev/null
+++ b/rubygem-hoe-2.12.3-rdoctask-rescue.patch
@@ -0,0 +1,17 @@
+--- TMP/lib/hoe/publish.rb.dep	1970-01-01 09:00:00.000000000 +0900
++++ TMP/lib/hoe/publish.rb	2011-09-09 03:08:08.000000000 +0900
+@@ -93,11 +93,13 @@
+ 
+       begin
+         require 'rdoc/task'
++        rdoctask = RDoc::Task
+       rescue LoadError
+         require 'rake/rdoctask'
++        rdoctask = Rake::RDocTask
+       end
+ 
+-      RDoc::Task.new(:docs) do |rd|
++      rdoctask.new(:docs) do |rd|
+         rd.main = readme_file
+         rd.options << '-d' if (`which dot` =~ /\/dot/) unless
+           ENV['NODOT'] || Hoe::WINDOZE
diff --git a/rubygem-hoe.spec b/rubygem-hoe.spec
index af4cb35..20923b4 100644
--- a/rubygem-hoe.spec
+++ b/rubygem-hoe.spec
@@ -13,6 +13,8 @@ Source0:    	http://rubygems.org/gems/%{gemname}-%{version}.gem
 # Rescue Hoe.spec task when Manifest.txt
 # seattlerb-Bugs-28571
 Patch0:		rubygem-hoe-2.12.2-rescue-missing-Manifest.patch
+# Rescue RDoc::Task when rubygem(rdoc) is not installed
+Patch1:		rubygem-hoe-2.12.3-rdoctask-rescue.patch
 Requires:   	ruby(abi) = 1.8
 Requires:   	rubygems >= 1.3.6
 Requires:   	rubygem(rubyforge) >= 2.0.4
@@ -66,6 +68,7 @@ gem install \
 
 pushd .%{geminstdir}
 %patch0 -p0
+%patch1 -p1
 
 %build
 # Allow rake 0.9


More information about the scm-commits mailing list