[rubygem-idn] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
Vít Ondruch
vondruch at fedoraproject.org
Thu Mar 7 14:29:30 UTC 2013
commit 78153507384ebdb5476d5ad10755ec00a8ecd72c
Author: Vít Ondruch <vondruch at redhat.com>
Date: Thu Mar 7 15:29:14 2013 +0100
Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
...gem-idn-0.0.2-ruby2-encoding-in-tests-fix.patch | 22 ++++++++++++++++
rubygem-idn.spec | 27 +++++++++----------
2 files changed, 35 insertions(+), 14 deletions(-)
---
diff --git a/rubygem-idn-0.0.2-ruby2-encoding-in-tests-fix.patch b/rubygem-idn-0.0.2-ruby2-encoding-in-tests-fix.patch
new file mode 100644
index 0000000..a083a6a
--- /dev/null
+++ b/rubygem-idn-0.0.2-ruby2-encoding-in-tests-fix.patch
@@ -0,0 +1,22 @@
+diff --git a/test/tc_Stringprep.rb b/test/tc_Stringprep.rb
+index c7f15cb..bcdd401 100644
+--- a/test/tc_Stringprep.rb
++++ b/test/tc_Stringprep.rb
+@@ -60,7 +60,7 @@ class Test_Stringprep < Test::Unit::TestCase
+ def test_with_profile_STRINGPREP
+ TESTCASES_STRINGPREP.each do |key, val|
+ rc = Stringprep.with_profile(val[1], val[0])
+- assert_equal(val[2], rc, "TestCase #{key} failed")
++ assert_equal(val[2].force_encoding('ASCII-8BIT'), rc, "TestCase #{key} failed")
+ end
+ end
+
+@@ -75,7 +75,7 @@ class Test_Stringprep < Test::Unit::TestCase
+ def test_nfkc_normalize_NFKC
+ TESTCASES_NFKC.each do |key, val|
+ rc = Stringprep.nfkc_normalize(val[0])
+- assert_equal(val[1], rc, "TestCase #{key} failed")
++ assert_equal(val[1].force_encoding('ASCII-8BIT'), rc, "TestCase #{key} failed")
+ end
+ end
+ end
diff --git a/rubygem-idn.spec b/rubygem-idn.spec
index 2ea280e..032647c 100644
--- a/rubygem-idn.spec
+++ b/rubygem-idn.spec
@@ -4,7 +4,7 @@
Summary: Ruby Bindings for the GNU LibIDN library
Name: rubygem-%{gem_name}
Version: 0.0.2
-Release: 8%{?dist}
+Release: 9%{?dist}
Group: Development/Languages
# ASL license for ext/idn.c, ext/idn.h, ext/punycode.c and ext/stringprep.c
@@ -12,7 +12,10 @@ License: ASL 2.0 and LGPLv2+
URL: http://rubyforge.org/projects/idn/
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch0: rubygem-idn-0.0.2-Fix-for-ruby-1.9.x.patch
-Requires: ruby(abi) = 1.9.1
+# Fixes failure due to change in default encoding in Ruby 2.0.
+# http://rubyforge.org/tracker/index.php?func=detail&aid=29724&group_id=924&atid=3635
+Patch1: rubygem-idn-0.0.2-ruby2-encoding-in-tests-fix.patch
+Requires: ruby(release)
Requires: ruby(rubygems)
BuildRequires: rubygems-devel
@@ -45,6 +48,7 @@ pushd %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p0
+%patch1 -p1
# Avoid "cert_chain must not be nil" error.
sed -i -e "10d" %{gem_name}.gemspec
@@ -53,24 +57,16 @@ gem build %{gem_name}.gemspec
popd
popd
-mkdir -p ./%{gem_dir}
-export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
-gem install \
- -V \
- --local \
- --install-dir ./%{gem_dir} \
- --force --rdoc \
- --ri \
- ../%{gem_name}-%{version}/%{gem_name}-%{version}.gem
+%gem_install -n ../%{gem_name}-%{version}/%{gem_name}-%{version}.gem
%build
%install
mkdir -p %{buildroot}%{gem_dir}
-mkdir -p %{buildroot}%{gem_extdir}/lib
+mkdir -p %{buildroot}%{gem_extdir_mri}/lib
cp -a ./* %{buildroot}/
-mv %{buildroot}%{gem_instdir}/lib/%{gem_name}.so %{buildroot}%{gem_extdir}/lib/
+mv %{buildroot}%{gem_instdir}/lib/%{gem_name}.so %{buildroot}%{gem_extdir_mri}/lib/
## remove all shebang, set permission to 0644
find .%{gem_instdir}/{Rakefile,lib,spec} -type f | \
@@ -85,7 +81,7 @@ popd
%files
%dir %{gem_instdir}/
-%{gem_extdir}
+%{gem_extdir_mri}
%exclude %{gem_libdir}
%doc %{gem_instdir}/CHANGES
%doc %{gem_instdir}/LICENSE
@@ -102,6 +98,9 @@ popd
%{gem_docdir}
%changelog
+* Thu Mar 07 2013 Josef Stribny <jstribny at redhat.com> - 0.0.2-9
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list