mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-23 18:38:08 -07:00
dev-ruby/ffi: fix 32-bit test failure
Thanks-to: Tee KOBAYASHI <xtkoba@gmail.com> Closes: https://bugs.gentoo.org/815130 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -31,6 +31,10 @@ DEPEND+=" dev-libs/libffi"
|
||||
|
||||
ruby_add_bdepend "dev-ruby/rake"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.14.2-32bit-long-double.patch
|
||||
)
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/tasks/ s:^:#:' \
|
||||
-e '/Gem::Tasks/,/end/ s:^:#:' Rakefile || die
|
||||
@@ -26,11 +26,15 @@ LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
RDEPEND+=" dev-libs/libffi:0="
|
||||
DEPEND+=" dev-libs/libffi"
|
||||
RDEPEND+=" dev-libs/libffi:="
|
||||
DEPEND+=" dev-libs/libffi:="
|
||||
|
||||
ruby_add_bdepend "dev-ruby/rake"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.14.2-32bit-long-double.patch
|
||||
)
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/tasks/ s:^:#:' \
|
||||
-e '/Gem::Tasks/,/end/ s:^:#:' Rakefile || die
|
||||
@@ -26,11 +26,15 @@ LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
RDEPEND+=" dev-libs/libffi:0="
|
||||
DEPEND+=" dev-libs/libffi"
|
||||
RDEPEND+=" dev-libs/libffi:="
|
||||
DEPEND+=" dev-libs/libffi:="
|
||||
|
||||
ruby_add_bdepend "dev-ruby/rake"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.14.2-32bit-long-double.patch
|
||||
)
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/tasks/ s:^:#:' \
|
||||
-e '/Gem::Tasks/,/end/ s:^:#:' Rakefile || die
|
||||
@@ -26,11 +26,15 @@ LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
RDEPEND+=" dev-libs/libffi:0="
|
||||
DEPEND+=" dev-libs/libffi"
|
||||
RDEPEND+=" dev-libs/libffi:="
|
||||
DEPEND+=" dev-libs/libffi:="
|
||||
|
||||
ruby_add_bdepend "dev-ruby/rake"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.14.2-32bit-long-double.patch
|
||||
)
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/tasks/ s:^:#:' \
|
||||
-e '/Gem::Tasks/,/end/ s:^:#:' Rakefile || die
|
||||
19
dev-ruby/ffi/files/ffi-1.14.2-32bit-long-double.patch
Normal file
19
dev-ruby/ffi/files/ffi-1.14.2-32bit-long-double.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
https://bugs.gentoo.org/815130
|
||||
https://github.com/ffi/ffi/commit/315d66e7b0768856d589e15bf597f4816d5cd524
|
||||
|
||||
From 0ef7a9d7d22c9a7779def3f8c7f0166d996a2401 Mon Sep 17 00:00:00 2001
|
||||
From: xtkoba <69125751+xtkoba@users.noreply.github.com>
|
||||
Date: Wed, 29 Sep 2021 19:24:44 +0900
|
||||
Subject: [PATCH] Keep `LONGDOUBLE_ADJ >= sizeof(long double)`
|
||||
|
||||
--- a/ext/ffi_c/Call.c
|
||||
+++ b/ext/ffi_c/Call.c
|
||||
@@ -71,7 +71,7 @@
|
||||
#define FLOAT32_ADJ (4)
|
||||
#define FLOAT64_ADJ (8)
|
||||
#define ADDRESS_ADJ (sizeof(void *))
|
||||
-#define LONGDOUBLE_ADJ (ffi_type_longdouble.alignment)
|
||||
+#define LONGDOUBLE_ADJ (ffi_type_longdouble.alignment > sizeof(long double) ? ffi_type_longdouble.alignment : sizeof(long double))
|
||||
|
||||
#endif /* USE_RAW */
|
||||
|
||||
Reference in New Issue
Block a user