[rubygem-mail] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
Vít Ondruch
vondruch at fedoraproject.org
Wed Mar 6 07:47:56 UTC 2013
commit 9a33ad41f30e6439611ccfb88a663cbb14f7c1c8
Author: Vít Ondruch <vondruch at redhat.com>
Date: Tue Mar 5 13:14:59 2013 +0100
Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
...5.2-Issue-453-Failing-spec-in-1.9.3-fixed.patch | 29 ++++++++++++++++++++
rubygem-mail.spec | 28 ++++++++++---------
2 files changed, 44 insertions(+), 13 deletions(-)
---
diff --git a/rubygem-mail-2.5.2-Issue-453-Failing-spec-in-1.9.3-fixed.patch b/rubygem-mail-2.5.2-Issue-453-Failing-spec-in-1.9.3-fixed.patch
new file mode 100644
index 0000000..7aba81a
--- /dev/null
+++ b/rubygem-mail-2.5.2-Issue-453-Failing-spec-in-1.9.3-fixed.patch
@@ -0,0 +1,29 @@
+From bb25038fa667273c136c6fb2823d01684999d252 Mon Sep 17 00:00:00 2001
+From: Mikel Lindsaar <mikel at reinteractive.net>
+Date: Sat, 17 Nov 2012 10:56:01 +1100
+Subject: [PATCH] Issue 453: Failing spec in 1.9.3 fixed
+
+---
+ lib/mail/version_specific/ruby_1_9.rb | 5 ++-
+ spec/mail/encodings_spec.rb | 76 +++++++++++++++++++----------------
+ 2 files changed, 46 insertions(+), 35 deletions(-)
+
+diff --git a/lib/mail/version_specific/ruby_1_9.rb b/lib/mail/version_specific/ruby_1_9.rb
+index 0eb3806..e74df25 100644
+--- a/lib/mail/version_specific/ruby_1_9.rb
++++ b/lib/mail/version_specific/ruby_1_9.rb
+@@ -68,7 +68,10 @@ module Mail
+ match = str.match(/\=\?(.+)?\?[Qq]\?(.+)?\?\=/m)
+ if match
+ encoding = match[1]
+- str = Encodings::QuotedPrintable.decode(match[2].gsub(/_/, '=20'))
++ string = match[2].gsub(/_/, '=20')
++ # Remove trailing = if it exists in a Q encoding as Ruby 1.9.3 does not silently discard
++ string = string.sub(/\=$/, '')
++ str = Encodings::QuotedPrintable.decode(string)
+ str.force_encoding(fix_encoding(encoding))
+ end
+ decoded = str.encode("utf-8", :invalid => :replace, :replace => "")
+--
+1.8.1.4
+
diff --git a/rubygem-mail.spec b/rubygem-mail.spec
index 158d3b3..909fd40 100644
--- a/rubygem-mail.spec
+++ b/rubygem-mail.spec
@@ -1,16 +1,10 @@
# Generated from mail-2.3.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name mail
-%if %{fedora} < 17
-%global rubyabi 1.8
-%else
-%global rubyabi 1.9.1
-%endif
-
Summary: Mail provides a nice Ruby DSL for making, sending and reading emails
Name: rubygem-%{gem_name}
Version: 2.4.4
-Release: 3%{?dist}
+Release: 4%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/mikel/mail
@@ -18,7 +12,10 @@ Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
# git clone https://github.com/mikel/mail.git && cd mail && git checkout 2.4.4
# tar czvf mail-2.4.4-specs.tgz spec/
Source1: %{gem_name}-%{version}-specs.tgz
-Requires: ruby(abi) = %{rubyabi}
+# Fix trailing equals signs.
+# https://github.com/mikel/mail/issues/453
+Patch0: rubygem-mail-2.5.2-Issue-453-Failing-spec-in-1.9.3-fixed.patch
+Requires: ruby(release)
Requires: ruby(rubygems)
Requires: rubygem(mime-types) >= 1.16
Requires: rubygem(mime-types) < 2
@@ -26,8 +23,8 @@ Requires: rubygem(treetop) >= 1.4.8
Requires: rubygem(treetop) < 1.5
Requires: rubygem(i18n) >= 0.4.0
BuildRequires: rubygems-devel
-BuildRequires: ruby(abi) = %{rubyabi}
-BuildRequires: rubygem(rspec-core)
+BuildRequires: ruby(release)
+BuildRequires: rubygem(rspec)
BuildRequires: rubygem(mime-types) >= 1.16
BuildRequires: rubygem(mime-types) < 2
BuildRequires: rubygem(treetop) >= 1.4.8
@@ -49,11 +46,13 @@ This package contains documentation for %{name}.
%prep
%setup -q -c -T
-mkdir -p .%{gem_dir}
# Gem install encoding conversion errors.
# https://github.com/mikel/mail/issues/393
-LANG=en_US.utf8 gem install --local --install-dir .%{gem_dir} \
- --force %{SOURCE0}
+LANG=en_US.utf8 %gem_install -n %{SOURCE0}
+
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
%build
@@ -88,6 +87,9 @@ popd
%doc %{gem_instdir}/Rakefile
%changelog
+* Tue Mar 05 2013 Vít Ondruch <vondruch at redhat.com> - 2.4.4-4
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list