[rubygem-RedCloth] Patch for ARM which doesn't use signed chars as a default

Vít Ondruch vondruch at fedoraproject.org
Wed Apr 10 14:33:22 UTC 2013


commit 115cc236651a48257d8abb36df1365fd89ac4b80
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Wed Apr 10 16:33:13 2013 +0200

    Patch for ARM which doesn't use signed chars as a default

 rubygem-RedCloth.spec                          |   24 +++++++++++++++++-------
 rubygem-redcloth-4.2.9-unsigned-char-fix.patch |   12 ++++++++++++
 2 files changed, 29 insertions(+), 7 deletions(-)
---
diff --git a/rubygem-RedCloth.spec b/rubygem-RedCloth.spec
index 7b19118..34fe60a 100644
--- a/rubygem-RedCloth.spec
+++ b/rubygem-RedCloth.spec
@@ -5,11 +5,14 @@
 Summary:       Textile parser for Ruby
 Name:          rubygem-%{gem_name}
 Version:       4.2.9
-Release:       4%{?dist}
+Release:       5%{?dist}
 Group:         Development/Languages
 License:       MIT
 URL:           http://redcloth.org
 Source0:       http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
+# Fixes failing tests on ARM which defaults to use unsigned char
+# http://jgarber.lighthouseapp.com/projects/13054-redcloth/tickets/236-test-failure-on-armelpowerpc
+Patch0:        rubygem-redcloth-4.2.9-unsigned-char-fix.patch
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires:      ruby(release)
 Requires:      ruby(rubygems)
@@ -23,11 +26,18 @@ Provides:      rubygem(%{gem_name}) = %{version}
 %description
 Textile parser for Ruby.
 
-
 %prep
-%setup -q -c -T
+gem unpack %{SOURCE0}
+%setup -q -D -T -n  %{gem_name}-%{version}
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+%patch0 -p1
+
+%build
+gem build %{gem_name}.gemspec
 
-%gem_install -n %{SOURCE0}
+%gem_install
 
 # To create debuginfo file corretly (workaround for
 # "#line" directive)
@@ -36,9 +46,6 @@ mkdir ext
 ln -sf .. ext/redcloth_scan
 popd
 
-
-%build
-
 %install
 mkdir -p %{buildroot}%{gem_dir}
 cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
@@ -83,6 +90,9 @@ popd
 
 
 %changelog
+* Wed Apr 10 2013 Josef Stribny <jstribny at redhat.com> - 4.2.9-5
+- Patch for ARM which doesn't use signed chars as a default
+
 * Thu Mar 07 2013 Josef Stribny <jstribny at redhat.com> - 4.2.9-4
 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
 
diff --git a/rubygem-redcloth-4.2.9-unsigned-char-fix.patch b/rubygem-redcloth-4.2.9-unsigned-char-fix.patch
new file mode 100644
index 0000000..ee8a536
--- /dev/null
+++ b/rubygem-redcloth-4.2.9-unsigned-char-fix.patch
@@ -0,0 +1,12 @@
+diff --git a/ext/redcloth_scan/extconf.rb b/ext/redcloth_scan/extconf.rb
+index 506d4a3..edd46c4 100644
+--- a/ext/redcloth_scan/extconf.rb
++++ b/ext/redcloth_scan/extconf.rb
+@@ -1,6 +1,6 @@
+ require 'mkmf'
+ CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
+-$CFLAGS << ' -O0 -Wall ' if CONFIG['CC'] =~ /gcc/
++$CFLAGS << ' -O0 -Wall -fsigned-char' if CONFIG['CC'] =~ /gcc/
+ dir_config("redcloth_scan")
+ have_library("c", "main")
+ create_makefile("redcloth_scan")


More information about the scm-commits mailing list