54 lines
1.3 KiB
Diff
54 lines
1.3 KiB
Diff
|
From 8d093bd981135453e2bdb22a98fc552f81b71f52 Mon Sep 17 00:00:00 2001
|
||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||
|
Date: Fri, 15 Feb 2013 11:03:27 +0000
|
||
|
Subject: [PATCH] ruby: Use updated rake package names, but allow fallback to
|
||
|
the old names.
|
||
|
|
||
|
---
|
||
|
ruby/Rakefile.in | 21 ++++++++++++++++++---
|
||
|
1 file changed, 18 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/ruby/Rakefile.in b/ruby/Rakefile.in
|
||
|
index 4cb2d67..204e37c 100644
|
||
|
--- a/ruby/Rakefile.in
|
||
|
+++ b/ruby/Rakefile.in
|
||
|
@@ -17,9 +17,24 @@
|
||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
|
|
||
|
require 'rake/clean'
|
||
|
-require 'rake/rdoctask'
|
||
|
require 'rake/testtask'
|
||
|
-require 'rake/gempackagetask'
|
||
|
+
|
||
|
+# Used to be rake/rdoctask. Now it's rdoc/task.
|
||
|
+begin
|
||
|
+ require 'rdoc/task'
|
||
|
+rescue
|
||
|
+ require 'rake/rdoctask'
|
||
|
+end
|
||
|
+
|
||
|
+# Used to be rake/gempackagetask. Now it's rubygems/package_task. Also
|
||
|
+# we need to use the appropriate class name below.
|
||
|
+begin
|
||
|
+ require 'rubygems/package_task'
|
||
|
+ gempackagetask='Gem::PackageTask'
|
||
|
+rescue
|
||
|
+ require 'rake/gempackagetask'
|
||
|
+ gempackagetask='Rake::GemPackageTask'
|
||
|
+end
|
||
|
|
||
|
PKG_NAME='@PACKAGE_NAME@'
|
||
|
PKG_VERSION='@PACKAGE_VERSION@'
|
||
|
@@ -108,7 +123,7 @@ Ruby bindings for hivex.
|
||
|
EOF
|
||
|
end
|
||
|
|
||
|
-Rake::GemPackageTask.new(SPEC) do |pkg|
|
||
|
+eval(gempackagetask).new(SPEC) do |pkg|
|
||
|
pkg.need_tar = true
|
||
|
pkg.need_zip = true
|
||
|
end
|
||
|
--
|
||
|
1.8.1.2
|
||
|
|