add aarch64 definitions to posh.h to fix FTBFS

This commit is contained in:
Peter Robinson 2015-01-27 09:08:19 +00:00
parent 62780c70d7
commit 05be8fd465
2 changed files with 25 additions and 1 deletions

View File

@ -3,7 +3,7 @@
Summary: Full-featured text search engine library
Name: rubygem-%{gem_name}
Version: 0.11.8.4
Release: 9%{?dist}
Release: 10%{?dist}
Group: Development/Languages
# License from
# - MIT-LICENSE: MIT
@ -21,6 +21,8 @@ Patch1: rubygem-ferret-0.11.8.4-make-rake-just-development-dependency.patch
Patch2: rubygem-ferret-0.11.8.4-Block-variables-has-local-scopes.patch
# See https://bugs.ruby-lang.org/issues/9889
Patch3: rubygem-ferret-0.11.8.4-ruby22-hashsize.patch
# fix build on aarch64
Patch4: rubygen-ferret-posh.h-aarch64.patch
BuildRequires: rubygems-devel
BuildRequires: ruby-devel
BuildRequires: rubygem(minitest) < 5
@ -48,6 +50,7 @@ gem unpack %{SOURCE0}
%patch0 -p2
%patch2 -p2
%patch3 -p1
%patch4 -p1
gem spec %{SOURCE0} -l --ruby > %{gem_name}-%{version}.gemspec
%patch1 -p1
@ -111,6 +114,9 @@ popd
%{gem_instdir}/test/
%changelog
* Mon Jan 26 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 0.11.8.4-10
- add aarch64 definitions to posh.h to fix FTBFS
* Sun Jan 18 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.11.8.4-9
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
- Fix RHASH_SIZE related fix failure

View File

@ -0,0 +1,18 @@
Index: ferret-0.11.8.4/ext/posh.h
===================================================================
--- ferret-0.11.8.4.orig/ext/posh.h
+++ ferret-0.11.8.4/ext/posh.h
@@ -512,6 +512,13 @@ Metrowerks:
# define POSH_CPU_STRING "PA-RISC"
#endif
+#if defined __aarch64__ || defined __arm64__ || defined FORCE_DOXYGEN
+# define POSH_CPU_AARCH64 /**<if defined, target CPU is AArch64 */
+# if !defined FORCE_DOXYGEN
+# define POSH_CPU_STRING "AArch64"
+# endif
+#endif
+
#if !defined POSH_CPU_STRING
# error POSH cannot determine target CPU
# define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */