[rubygem-sqlite3] fix build on big endian arches (patch by VÃt Ondruch)
Dan Horák
sharkcz at fedoraproject.org
Wed Jun 22 13:25:59 UTC 2011
commit 48ee131f2cb85749633fa93571b63a3cc5fda250
Author: Dan Horák <dan at danny.cz>
Date: Wed Jun 22 15:25:46 2011 +0200
fix build on big endian arches (patch by Vít Ondruch)
rubygem-sqlite3-1.3.3-big-endian.patch | 12 ++++++++++++
rubygem-sqlite3.spec | 12 +++++++++++-
2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/rubygem-sqlite3-1.3.3-big-endian.patch b/rubygem-sqlite3-1.3.3-big-endian.patch
new file mode 100644
index 0000000..b04f001
--- /dev/null
+++ b/rubygem-sqlite3-1.3.3-big-endian.patch
@@ -0,0 +1,12 @@
+diff test/test_database.rb.bak test/test_database.rb -u
+--- test/test_database.rb.bak 2011-06-22 07:53:05.000000000 -0400
++++ test/test_database.rb 2011-06-22 08:43:35.135232514 -0400
+@@ -54,7 +54,7 @@
+ end
+
+ def test_new_with_options
+- db = SQLite3::Database.new(Iconv.conv('UTF-16LE', 'UTF-8', ':memory:'),
++ db = SQLite3::Database.new(Iconv.conv('UTF-16BE', 'UTF-8', ':memory:'),
+ :utf16 => true)
+ assert db
+ end
diff --git a/rubygem-sqlite3.spec b/rubygem-sqlite3.spec
index 83dd272..dd5bd4d 100644
--- a/rubygem-sqlite3.spec
+++ b/rubygem-sqlite3.spec
@@ -7,13 +7,15 @@
Summary: Allows Ruby scripts to interface with a SQLite3 database
Name: rubygem-%{gemname}
Version: 1.3.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: Development/Languages
License: BSD
# It is not clear what is the official homepage. However, I have risen ticket
# on upstream: https://github.com/luislavena/sqlite3-ruby/issues/issue/26
URL: http://sqlite-ruby.rubyforge.org/
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+# https://github.com/luislavena/sqlite3-ruby/issues/40
+Patch0: %{name}-1.3.3-big-endian.patch
Requires: rubygems
Requires: ruby(abi) = 1.8
BuildRequires: ruby(rubygems)
@@ -130,6 +132,11 @@ create_symlink_rec %{geminstdir}/lib %{ruby_sitelib}
%check
pushd %{buildroot}%{geminstdir}
+
+# fix tests for big endian arches
+%ifarch %{sparc} ppc ppc64 s390 s390x
+patch -l -p0 < %{PATCH0}
+%endif
RUBYOPT="I%{buildroot}%{ruby_sitearch} Ilib" testrb test/test_*
%files
@@ -163,6 +170,9 @@ RUBYOPT="I%{buildroot}%{ruby_sitearch} Ilib" testrb test/test_*
%changelog
+* Wed Jun 22 2011 Dan Horák <dan[at]danny.cz> - 1.3.3-5
+- fix build on big endian arches (patch by Vít Ondruch)
+
* Fri Jun 03 2011 Vít Ondruch <vondruch at redhat.com> - 1.3.3-4
- The subdirecotry of ruby_sitearch has to be owned by package.
More information about the scm-commits
mailing list