]> git.pld-linux.org Git - packages/ruby-ffi.git/commitdiff
- updated to 1.15.5 master auto/th/ruby-ffi-1.15.5-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 18 Feb 2023 20:18:40 +0000 (21:18 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 18 Feb 2023 20:18:40 +0000 (21:18 +0100)
- added x32 patch (maybe incomplete, but samples work)
- added metadata hack (they are not unpackaged automatically now?)

ffi-x32.patch [new file with mode: 0644]
ruby-ffi-platform.patch
ruby-ffi.spec

diff --git a/ffi-x32.patch b/ffi-x32.patch
new file mode 100644 (file)
index 0000000..7f00689
--- /dev/null
@@ -0,0 +1,127 @@
+--- 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
+@@ -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__))
+ # 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
+     # 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
+@@ -0,0 +1,103 @@
++rbx.platform.typedef.*__caddr_t = char
++rbx.platform.typedef.*__qaddr_t = long_long
++rbx.platform.typedef.__blkcnt64_t = long_long
++rbx.platform.typedef.__blkcnt_t = long_long
++rbx.platform.typedef.__blksize_t = long_long
++rbx.platform.typedef.__clock_t = long_long
++rbx.platform.typedef.__clockid_t = int
++rbx.platform.typedef.__daddr_t = int
++rbx.platform.typedef.__dev_t = ulong_long
++rbx.platform.typedef.__fd_mask = long
++rbx.platform.typedef.__fsblkcnt64_t = ulong_long
++rbx.platform.typedef.__fsblkcnt_t = ulong_long
++rbx.platform.typedef.__fsfilcnt64_t = ulong_long
++rbx.platform.typedef.__fsfilcnt_t = ulong_long
++rbx.platform.typedef.__gid_t = uint
++rbx.platform.typedef.__id_t = uint
++rbx.platform.typedef.__ino64_t = ulong_long
++rbx.platform.typedef.__ino_t = ulong_long
++rbx.platform.typedef.__int16_t = short
++rbx.platform.typedef.__int32_t = int
++rbx.platform.typedef.__int64_t = long_long
++rbx.platform.typedef.__int8_t = char
++rbx.platform.typedef.__intptr_t = int
++rbx.platform.typedef.__key_t = int
++rbx.platform.typedef.__loff_t = long_long
++rbx.platform.typedef.__mode_t = uint
++rbx.platform.typedef.__nlink_t = uint
++rbx.platform.typedef.__off64_t = long_long
++rbx.platform.typedef.__off_t = long_long
++rbx.platform.typedef.__pid_t = int
++rbx.platform.typedef.__priority_which_t = int
++rbx.platform.typedef.__quad_t = long_long
++rbx.platform.typedef.__rlim64_t = ulong_long
++rbx.platform.typedef.__rlim_t = ulong_long
++rbx.platform.typedef.__rlimit_resource_t = int
++rbx.platform.typedef.__rusage_who_t = int
++rbx.platform.typedef.__sig_atomic_t = int
++rbx.platform.typedef.__socklen_t = uint
++rbx.platform.typedef.__ssize_t = int
++rbx.platform.typedef.__suseconds_t = long_long
++rbx.platform.typedef.__swblk_t = long_long
++rbx.platform.typedef.__time_t = long_long
++rbx.platform.typedef.__timer_t = pointer
++rbx.platform.typedef.__u_char = uchar
++rbx.platform.typedef.__u_int = uint
++rbx.platform.typedef.__u_long = ulong
++rbx.platform.typedef.__u_quad_t = ulong_long
++rbx.platform.typedef.__u_short = ushort
++rbx.platform.typedef.__uid_t = uint
++rbx.platform.typedef.__uint16_t = ushort
++rbx.platform.typedef.__uint32_t = uint
++rbx.platform.typedef.__uint64_t = ulong_long
++rbx.platform.typedef.__uint8_t = uchar
++rbx.platform.typedef.__useconds_t = uint
++rbx.platform.typedef.blkcnt_t = long_long
++rbx.platform.typedef.blksize_t = long_long
++rbx.platform.typedef.clockid_t = int
++rbx.platform.typedef.daddr_t = int
++rbx.platform.typedef.dev_t = ulong_long
++rbx.platform.typedef.fd_mask = long
++rbx.platform.typedef.fsblkcnt_t = ulong_long
++rbx.platform.typedef.fsfilcnt_t = ulong_long
++rbx.platform.typedef.gid_t = uint
++rbx.platform.typedef.id_t = uint
++rbx.platform.typedef.in_addr_t = uint
++rbx.platform.typedef.in_port_t = ushort
++rbx.platform.typedef.ino_t = ulong_long
++rbx.platform.typedef.int16_t = short
++rbx.platform.typedef.int32_t = int
++rbx.platform.typedef.int64_t = long_long
++rbx.platform.typedef.int8_t = char
++rbx.platform.typedef.key_t = int
++rbx.platform.typedef.loff_t = long_long
++rbx.platform.typedef.mode_t = uint
++rbx.platform.typedef.nlink_t = uint
++rbx.platform.typedef.off_t = long_long
++rbx.platform.typedef.pid_t = int
++rbx.platform.typedef.pthread_key_t = uint
++rbx.platform.typedef.pthread_once_t = int
++rbx.platform.typedef.pthread_t = ulong
++rbx.platform.typedef.quad_t = long_long
++rbx.platform.typedef.register_t = long
++rbx.platform.typedef.rlim_t = ulong_long
++rbx.platform.typedef.sa_family_t = ushort
++rbx.platform.typedef.size_t = uint
++rbx.platform.typedef.socklen_t = uint
++rbx.platform.typedef.ssize_t = int
++rbx.platform.typedef.suseconds_t = long_long
++rbx.platform.typedef.time_t = long_long
++rbx.platform.typedef.timer_t = pointer
++rbx.platform.typedef.u_char = uchar
++rbx.platform.typedef.u_int = uint
++rbx.platform.typedef.u_int16_t = ushort
++rbx.platform.typedef.u_int32_t = uint
++rbx.platform.typedef.u_int64_t = ulong_long
++rbx.platform.typedef.u_int8_t = uchar
++rbx.platform.typedef.u_long = ulong
++rbx.platform.typedef.u_quad_t = ulong_long
++rbx.platform.typedef.u_short = ushort
++rbx.platform.typedef.uid_t = uint
++rbx.platform.typedef.uint = uint
++rbx.platform.typedef.ulong = ulong
++rbx.platform.typedef.ushort = ushort
index 4d1844188ba4d0218968aa548cc917387ab2ebd2..67f3e0c99efa1bad8cb00d6daf308dbc07bc0c78 100644 (file)
@@ -1,9 +1,9 @@
---- ffi-1.9.18/lib/ffi/platform.rb~    2017-04-24 22:55:45.000000000 +0300
-+++ ffi-1.9.18/lib/ffi/platform.rb     2017-04-24 22:56:19.872279857 +0300
-@@ -90,7 +90,7 @@
-     IS_SOLARIS = is_os("solaris")
-     IS_WINDOWS = is_os("windows")
-     IS_BSD = IS_MAC || IS_FREEBSD || IS_NETBSD || IS_OPENBSD
+--- 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
+     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)
  
index 7065690363403ef9f895c57e5e1525ec0fc4f67a..d0ea530dffc4c1830303c537d76a8095e1b8421c 100644 (file)
@@ -1,19 +1,20 @@
 #
 # Conditional build:
-%bcond_without tests           # build without tests
+%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.9.25
-Release:       4
+Version:       1.15.5
+Release:       1
 License:       BSD
 Group:         Development/Languages
 Source0:       http://rubygems.org/gems/%{pkgname}-%{version}.gem
-# Source0-md5: e8923807b970643d9e356a65038769ac
+# Source0-md5: 026cce18ef8ffc713be29c2ffc9d335b
 Patch0:                %{name}-platform.patch
+Patch1:                ffi-x32.patch
 URL:           https://wiki.github.com/ffi/ffi
 BuildRequires: libffi-devel >= %{ffi_req}
 BuildRequires: rpm-rubyprov
@@ -24,7 +25,7 @@ BuildRequires:        ruby-rspec
 BuildRequires: ruby-rspec-mocks
 %endif
 Requires:      libffi >= %{ffi_req}
-ExclusiveArch: %{ix86} %{x8664} aarch64 %{arm} ia64 mips mips64el mipsel powerpc64 ppc s390 s390x sparc sparcv9
+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)
 
 %description
@@ -45,12 +46,13 @@ stronie <http://wiki.github.com/ffi/ffi/why-use-ffi>.
 %prep
 %setup -q -n %{pkgname}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 # be sure to use system ffi
 %{__rm} -r ext/ffi_c/libffi
 
 # drop not our targets
-%{__rm} -r lib/ffi/platform/*-{aix,cygwin,darwin,gnu,*bsd,solaris,windows}
+%{__rm} -r lib/ffi/platform/*-{aix,cygwin,darwin,freebsd12,*bsd,gnu,haiku,msys,solaris,windows}
 # provide only definitions for package architecture
 %ifnarch aarch64
 %{__rm} -r lib/ffi/platform/aarch64-*
@@ -66,12 +68,19 @@ stronie <http://wiki.github.com/ffi/ffi/why-use-ffi>.
 %endif
 %ifnarch mips
 %{__rm} -r lib/ffi/platform/mips-*
+%{__rm} -r lib/ffi/platform/mipsisa32r6-*
 %endif
 %ifnarch mipsel
 %{__rm} -r lib/ffi/platform/mipsel-*
+%{__rm} -r lib/ffi/platform/mipsisa32r6el-*
+%endif
+%ifnarch mips64
+%{__rm} -r lib/ffi/platform/mips64-*
+%{__rm} -r lib/ffi/platform/mipsisa64r6-*
 %endif
 %ifnarch mips64el
 %{__rm} -r lib/ffi/platform/mips64el-*
+%{__rm} -r lib/ffi/platform/mipsisa64r6el-*
 %endif
 %ifnarch powerpc
 %{__rm} -r lib/ffi/platform/powerpc-*
@@ -79,22 +88,36 @@ stronie <http://wiki.github.com/ffi/ffi/why-use-ffi>.
 %ifnarch powerpc64
 %{__rm} -r lib/ffi/platform/powerpc64-*
 %endif
+%ifnarch powerpc64le
+%{__rm} -r lib/ffi/platform/powerpc64le-*
+%endif
 %ifnarch s390
 %{__rm} -r lib/ffi/platform/s390-*
 %endif
 %ifnarch s390x
 %{__rm} -r lib/ffi/platform/s390x-*
 %endif
-%ifnarch sparc
+%ifnarch riscv64
+%{__rm} -r lib/ffi/platform/riscv64-*
+%endif
+%ifnarch sparc sparcv9
 %{__rm} -r lib/ffi/platform/sparc-*
 %endif
+%ifnarch sparc64
+%{__rm} -r lib/ffi/platform/sparc64-*
+%endif
 %ifnarch %{x8664}
-%{__rm} -r lib/ffi/platform/x86_64-*
+%{__rm} -r lib/ffi/platform/x86_64-linux
+%endif
+%ifnarch x32
+%{__rm} -r lib/ffi/platform/x86_64-linux-gnux32
 %endif
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
+%{__tar} xf %{SOURCE0} metadata.gz
+
 %build
 %__gem_helper spec
 
This page took 0.117075 seconds and 4 git commands to generate.