Fix for latest Ruby in Rawhide. Fixes build failure identified by mass rebuild yesterday.

This commit is contained in:
Richard W.M. Jones 2013-02-15 11:07:50 +00:00
parent ccf015b8dc
commit 62695db69e
2 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,53 @@
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

View File

@ -7,7 +7,7 @@
Name: hivex Name: hivex
Version: 1.3.7 Version: 1.3.7
Release: 3%{?dist} Release: 4%{?dist}
Summary: Read and write Windows Registry binary hive files Summary: Read and write Windows Registry binary hive files
Group: Development/Libraries Group: Development/Libraries
@ -45,6 +45,9 @@ Patch0: %{name}-1.2.3-dirs.patch
Patch2: ruby-1.9-vendor-not-site.patch Patch2: ruby-1.9-vendor-not-site.patch
BuildRequires: autoconf, automake, libtool BuildRequires: autoconf, automake, libtool
# Fix for newest Ruby (upstream since 2013-02-15).
Patch3: 0001-ruby-Use-updated-rake-package-names-but-allow-fallba.patch
# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions # https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_exceptions
Provides: bundled(gnulib) Provides: bundled(gnulib)
@ -169,6 +172,7 @@ ruby-%{name} contains Ruby bindings for %{name}.
%patch0 -p1 -b .dirs %patch0 -p1 -b .dirs
%patch2 -p1 -b .rubyvendor %patch2 -p1 -b .rubyvendor
%patch3 -p1 -b .rubyrake
autoreconf ||: autoreconf ||:
@ -290,6 +294,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Fri Feb 15 2013 Richard W.M. Jones <rjones@redhat.com> - 1.3.7-4
- Fix for latest Ruby in Rawhide. Fixes build failure identified
by mass rebuild yesterday.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.7-3 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild