commit:     dcb9310e224faff66061736ebfb78ce2eaf74afe
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 13 07:36:59 2024 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sat Jul 13 07:37:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcb9310e

dev-lang/ruby: avoid broken readline test on arm

Bug: https://bugs.gentoo.org/935871
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 .../ruby/files/3.1/020-arm-readline-test.patch     | 28 ++++++++++++++++++++++
 dev-lang/ruby/ruby-3.1.5.ebuild                    |  1 +
 dev-lang/ruby/ruby-3.1.6-r1.ebuild                 |  1 +
 3 files changed, 30 insertions(+)

diff --git a/dev-lang/ruby/files/3.1/020-arm-readline-test.patch 
b/dev-lang/ruby/files/3.1/020-arm-readline-test.patch
new file mode 100644
index 000000000000..3bc40baf00db
--- /dev/null
+++ b/dev-lang/ruby/files/3.1/020-arm-readline-test.patch
@@ -0,0 +1,28 @@
+From 868f873a78034016fc05d79061245695e3c372fc Mon Sep 17 00:00:00 2001
+From: matoro <[email protected]>
+Date: Thu, 23 May 2024 16:10:32 -0400
+Subject: [PATCH] Skip test_interrupt_in_other_thread on arm32-linux
+
+This is a combination of main Ruby commit
+https://github.com/ruby/ruby/commit/aefc98891c42024039f19ef45bdfe93fbc590b7c
+and my PR correcting the regex https://github.com/ruby/ruby/pull/10819.
+Upstream Ruby requests that changes to this test go to readline-ext repo
+before being backported to 3.2 branch.
+---
+ test/readline/test_readline.rb | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb
+index 746a3a5ba1..86d3862739 100644
+--- a/test/readline/test_readline.rb
++++ b/test/readline/test_readline.rb
+@@ -481,6 +481,9 @@ def test_interrupt_in_other_thread
+     # likewise with 32-bit userspace on 64-bit kernel
+     omit if /\Ax86_64-linux-(?:x32|i[3-6]686)\z/ =~ RUBY_PLATFORM
+ 
++    # Skip arm32-linux (Travis CI).  See aefc988 in main ruby repo.
++    omit "Skip arm32-linux" if /armv[0-9+][a-z]-linux/ =~ RUBY_PLATFORM
++
+     if defined?(TestReadline) && self.class == TestReadline
+       use = "use_ext_readline"
+     elsif defined?(TestRelineAsReadline) && self.class == TestRelineAsReadline

diff --git a/dev-lang/ruby/ruby-3.1.5.ebuild b/dev-lang/ruby/ruby-3.1.5.ebuild
index 97976505b293..7fbe2e40ec4c 100644
--- a/dev-lang/ruby/ruby-3.1.5.ebuild
+++ b/dev-lang/ruby/ruby-3.1.5.ebuild
@@ -72,6 +72,7 @@ PDEPEND="
 src_prepare() {
        eapply "${FILESDIR}"/"${SLOT}"/011*.patch
        eapply "${FILESDIR}"/"${SLOT}"/012*.patch
+       eapply "${FILESDIR}"/"${SLOT}"/020*.patch
        eapply "${FILESDIR}"/"${SLOT}"/902*.patch
 
        if use elibc_musl ; then

diff --git a/dev-lang/ruby/ruby-3.1.6-r1.ebuild 
b/dev-lang/ruby/ruby-3.1.6-r1.ebuild
index f80ca0f497a0..358461b38718 100644
--- a/dev-lang/ruby/ruby-3.1.6-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.1.6-r1.ebuild
@@ -72,6 +72,7 @@ PDEPEND="
 src_prepare() {
        eapply "${FILESDIR}"/"${SLOT}"/011*.patch
        eapply "${FILESDIR}"/"${SLOT}"/012*.patch
+       eapply "${FILESDIR}"/"${SLOT}"/020*.patch
        eapply "${FILESDIR}"/"${SLOT}"/902*.patch
 
        if use elibc_musl ; then

Reply via email to