Fix: always apply loongarch64 patch, use the same gemspec on all arches.

Signed-off-by: Jia Chao <jiac13@chinaunicom.cn>
(cherry picked from commit 5889bcedde1d8f982996fa628be34662055b479d)
This commit is contained in:
Jia Chao 2024-12-02 15:47:16 +08:00 committed by openeuler-sync-bot
parent a80ba30877
commit 601b4dcb1a
2 changed files with 5 additions and 51 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,12 @@
%global gem_name ffi
Name: rubygem-%{gem_name}
Version: 1.10.0
Release: 5
Release: 6
Summary: FFI Extensions for Ruby
License: BSD-3-Clause and MIT
URL: https://www.github.com/ffi/ffi
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://www.github.com/ffi/%{gem_name}/archive/%{version}.tar.gz
Source2: ffi-1.10.0-loongarch64.gemspec
Patch0: Remove-taint-support.patch
Patch1: 0001-add-loongarch64-support-for-ffi.patch
Patch2: 0002-Add-types.conf-for-riscv64-linux.patch
@ -31,17 +30,11 @@ Documentation for %{name}.
ln -s %{gem_name}-%{version}/test test
ln -s %{gem_name}-%{version}/spec spec
%patch0 -p1
%ifarch loongarch64
%patch1 -p1
%endif
%patch2 -p1
%build
%ifarch loongarch64
gem build %{SOURCE2}
%else
gem build ../%{gem_name}-%{version}.gemspec
%endif
gem build ffi.gemspec
%gem_install
%install
@ -86,6 +79,9 @@ popd
%{gem_instdir}/ffi.gemspec
%changelog
* Mon Dec 02 2024 Jia Chao <jiac13@chinaunicom.cn> 1.10.0-6
- Fix: always apply loongarch64 patch, use the same gemspec on all arches.
* Mon Jul 10 2023 laokz <zhangkai@iscas.ac.cn> - 1.10.0-5
- backport upstream patch to support riscv64