From 1821fda7a2db17795d984c86b42273a4952ae5df Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Thu, 10 May 2018 16:44:19 +0200 Subject: [PATCH] Add support for riscv64 Signed-off-by: David Abdurachmanov --- ferret-0.11.8.4-add-riscv64.patch | 26 ++++++++++++++++++++++++++ rubygem-ferret.spec | 8 +++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ferret-0.11.8.4-add-riscv64.patch diff --git a/ferret-0.11.8.4-add-riscv64.patch b/ferret-0.11.8.4-add-riscv64.patch new file mode 100644 index 0000000..600b7ef --- /dev/null +++ b/ferret-0.11.8.4-add-riscv64.patch @@ -0,0 +1,26 @@ +diff --git a/ext/posh.h b/ext/posh.h +index 9c0e012..b122d58 100755 +--- a/ext/posh.h ++++ b/ext/posh.h +@@ -524,6 +524,21 @@ Metrowerks: + # define POSH_CPU_STRING "S/390" + #endif + ++#if defined __riscv && defined __riscv_xlen ++# if __riscv_xlen == 32 ++# define POSH_CPU_RISCV32 1 ++# define POSH_CPU_STRING "RISCV32" ++# elif __riscv_xlen == 64 ++# define POSH_CPU_RISCV64 1 ++# define POSH_CPU_STRING "RISCV64" ++# elif __riscv_xlen == 128 ++# define POSH_CPU_RISCV128 1 ++# define POSH_CPU_STRING "RISCV128" ++# else ++# error "Unknown XLEN size!" ++# 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 */ diff --git a/rubygem-ferret.spec b/rubygem-ferret.spec index b395f6a..9034401 100644 --- a/rubygem-ferret.spec +++ b/rubygem-ferret.spec @@ -3,7 +3,7 @@ Summary: Full-featured text search engine library Name: rubygem-%{gem_name} Version: 0.11.8.4 -Release: 21%{?dist} +Release: 21.0.riscv64%{?dist} Group: Development/Languages # License from # - MIT-LICENSE: MIT @@ -25,6 +25,8 @@ Patch4: rubygem-ferret-posh.h-aarch64.patch # s390x build # from http://pkg-ruby-extras-maintainers.alioth.debian.narkive.com/fQZGgAAD/dre-maint-rc-bug-474724 Patch5: rubygem-ferret-posh.h-s390x.patch +# support for riscv64 +Patch6: ferret-0.11.8.4-add-riscv64.patch BuildRequires: rubygems-devel BuildRequires: ruby-devel BuildRequires: rubygem(minitest) < 5 @@ -54,6 +56,7 @@ gem unpack %{SOURCE0} %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec @@ -120,6 +123,9 @@ popd %{gem_instdir}/test/ %changelog +* Thu May 10 2018 David Abdurachmanov - 0.11.8.4-21.0.riscv64 +- Add support for riscv64 + * Fri Feb 09 2018 Fedora Release Engineering - 0.11.8.4-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild