[packages/ruby-ffi] Up to 1.17.3; there are no tests to be run

arekm arekm at pld-linux.org
Mon Mar 16 20:13:21 CET 2026


commit fc0f1bfdd5fdad2ffc217b42054d06cc32d4d042
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 16 20:13:10 2026 +0100

    Up to 1.17.3; there are no tests to be run

 ffi-x32.patch           | 32 ++++++++++++++++----------------
 ruby-ffi-platform.patch | 18 +++++++++---------
 ruby-ffi.spec           | 23 ++++++-----------------
 3 files changed, 31 insertions(+), 42 deletions(-)
---
diff --git a/ruby-ffi.spec b/ruby-ffi.spec
index b717770..8c91905 100644
--- a/ruby-ffi.spec
+++ b/ruby-ffi.spec
@@ -1,18 +1,14 @@
-#
-# Conditional build:
-%bcond_without	tests	# testing
-
 %define	ffi_req	7:3.2
 %define	pkgname ffi
 Summary:	FFI Extensions for Ruby
 Summary(pl.UTF-8):	Rozszerzenia FFI dla języka Ruby
 Name:		ruby-%{pkgname}
-Version:	1.15.5
+Version:	1.17.3
 Release:	1
 License:	BSD
 Group:		Development/Languages
 Source0:	http://rubygems.org/gems/%{pkgname}-%{version}.gem
-# Source0-md5:	026cce18ef8ffc713be29c2ffc9d335b
+# Source0-md5:	53b580e3d6f86a517234195d13d60c97
 Patch0:		%{name}-platform.patch
 Patch1:		ffi-x32.patch
 URL:		https://wiki.github.com/ffi/ffi
@@ -20,10 +16,6 @@ BuildRequires:	libffi-devel >= %{ffi_req}
 BuildRequires:	rpm-rubyprov
 BuildRequires:	rpmbuild(macros) >= 1.665
 BuildRequires:	ruby-devel
-%if %{with tests}
-BuildRequires:	ruby-rspec
-BuildRequires:	ruby-rspec-mocks
-%endif
 Requires:	libffi >= %{ffi_req}
 ExclusiveArch:	%{ix86} %{x8664} x32 aarch64 %{arm} ia64 mips mipsel mips64 mips64el powerpc64 powerpc64le ppc s390 s390x riscv64 sparc sparcv9 sparc64
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -53,6 +45,8 @@ stronie <http://wiki.github.com/ffi/ffi/why-use-ffi>.
 
 # drop not our targets
 %{__rm} -r lib/ffi/platform/*-{aix,cygwin,darwin,freebsd12,*bsd,gnu,haiku,msys,solaris,windows}
+# drop arches not in ExclusiveArch
+%{__rm} -r lib/ffi/platform/{hppa*,loongarch64,sw_64}-*
 # provide only definitions for package architecture
 %ifnarch aarch64
 %{__rm} -r lib/ffi/platform/aarch64-*
@@ -103,8 +97,8 @@ stronie <http://wiki.github.com/ffi/ffi/why-use-ffi>.
 %ifnarch sparc sparcv9
 %{__rm} -r lib/ffi/platform/sparc-*
 %endif
-%ifnarch sparc64
-%{__rm} -r lib/ffi/platform/sparc64-*
+%ifnarch sparc64 sparcv9
+%{__rm} -r lib/ffi/platform/sparcv9-*
 %endif
 %ifnarch %{x8664}
 %{__rm} -r lib/ffi/platform/x86_64-linux
@@ -129,11 +123,6 @@ cd ext/ffi_c
 	optflags="%{rpmcflags} -fPIC"
 cd -
 
-%if %{with tests}
-ruby -Ilib:ext/ffi_c -S \
-	rspec spec
-%endif
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir}/ffi,%{ruby_specdir}}
diff --git a/ffi-x32.patch b/ffi-x32.patch
index 7f00689..060fdef 100644
--- a/ffi-x32.patch
+++ b/ffi-x32.patch
@@ -1,26 +1,26 @@
---- ffi-1.15.5/ext/ffi_c/MethodHandle.c.orig	2023-02-18 19:46:18.462877574 +0100
-+++ ffi-1.15.5/ext/ffi_c/MethodHandle.c	2023-02-18 20:11:26.531881239 +0100
+--- ffi-1.17.3/ext/ffi_c/MethodHandle.c.orig	2025-12-29 00:00:00.000000000 +0100
++++ ffi-1.17.3/ext/ffi_c/MethodHandle.c	2025-12-29 00:00:00.000000000 +0100
 @@ -77,7 +77,7 @@
  static bool prep_trampoline(void* ctx, void* code, Closure* closure, char* errmsg, size_t errmsgsize);
  static long trampoline_size(void);
- 
--#if defined(__x86_64__) && (defined(__linux__) || defined(__APPLE__))
-+#if defined(__x86_64__) && !defined(__ILP32__) && (defined(__linux__) || defined(__APPLE__))
+
+-#if defined(__x86_64__) && \
++#if defined(__x86_64__) && !defined(__ILP32__) && \
+     (defined(__linux__) || defined(__APPLE__)) && \
+     !USE_FFI_ALLOC
  # define CUSTOM_TRAMPOLINE 1
- #endif
- 
---- ffi-1.15.5/lib/ffi/platform.rb.orig	2023-02-18 19:46:19.052881095 +0100
-+++ ffi-1.15.5/lib/ffi/platform.rb	2023-02-18 20:18:51.244538146 +0100
-@@ -104,6 +104,7 @@ module FFI
- 
+--- ffi-1.17.3/lib/ffi/platform.rb.orig	2025-12-29 00:00:00.000000000 +0100
++++ ffi-1.17.3/lib/ffi/platform.rb	2025-12-29 00:00:00.000000000 +0100
+@@ -107,6 +107,7 @@
+
      # Add the version for known ABI breaks
      name_version = "12" if IS_FREEBSD && OSVERSION >= 12 # 64-bit inodes
 +    name_version = "-gnux32" if RbConfig::CONFIG['host_os'] == "linux-gnux32"
- 
-     NAME = "#{ARCH}-#{OS}#{name_version}"
-     CONF_DIR = File.join(RbConfig::CONFIG["vendorarchdir"], 'ffi', 'platform', NAME)
---- ffi-1.15.5/lib/ffi/platform/x86_64-linux-gnux32/types.conf.orig	1970-01-01 01:00:00.000000000 +0100
-+++ ffi-1.15.5/lib/ffi/platform/x86_64-linux-gnux32/types.conf	2023-02-18 21:04:54.427719598 +0100
+
+     NAME = FFI.make_shareable("#{ARCH}-#{OS}#{name_version}")
+     CONF_DIR = FFI.make_shareable(File.join(RbConfig::CONFIG["vendorarchdir"], 'ffi', 'platform', NAME))
+--- ffi-1.17.3/lib/ffi/platform/x86_64-linux-gnux32/types.conf.orig	1970-01-01 01:00:00.000000000 +0100
++++ ffi-1.17.3/lib/ffi/platform/x86_64-linux-gnux32/types.conf	2023-02-18 21:04:54.427719598 +0100
 @@ -0,0 +1,103 @@
 +rbx.platform.typedef.*__caddr_t = char
 +rbx.platform.typedef.*__qaddr_t = long_long
diff --git a/ruby-ffi-platform.patch b/ruby-ffi-platform.patch
index 67f3e0c..e8cd817 100644
--- a/ruby-ffi-platform.patch
+++ b/ruby-ffi-platform.patch
@@ -1,11 +1,11 @@
---- ffi-1.15.5/lib/ffi/platform.rb.orig	2023-02-18 19:37:47.086493199 +0100
-+++ ffi-1.15.5/lib/ffi/platform.rb	2023-02-18 19:38:48.586860130 +0100
-@@ -106,7 +106,7 @@ module FFI
+--- ffi-1.17.3/lib/ffi/platform.rb.orig	2025-12-29 00:00:00.000000000 +0100
++++ ffi-1.17.3/lib/ffi/platform.rb	2025-12-29 00:00:00.000000000 +0100
+@@ -108,7 +108,7 @@
      name_version = "12" if IS_FREEBSD && OSVERSION >= 12 # 64-bit inodes
- 
-     NAME = "#{ARCH}-#{OS}#{name_version}"
--    CONF_DIR = File.join(File.dirname(__FILE__), 'platform', NAME)
-+    CONF_DIR = File.join(RbConfig::CONFIG["vendorarchdir"], 'ffi', 'platform', NAME)
- 
+
+     NAME = FFI.make_shareable("#{ARCH}-#{OS}#{name_version}")
+-    CONF_DIR = FFI.make_shareable(File.join(File.dirname(__FILE__), 'platform', NAME))
++    CONF_DIR = FFI.make_shareable(File.join(RbConfig::CONFIG["vendorarchdir"], 'ffi', 'platform', NAME))
+
      public
- 
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-ffi.git/commitdiff/fc0f1bfdd5fdad2ffc217b42054d06cc32d4d042



More information about the pld-cvs-commit mailing list