summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2024-07-11 08:12:45 +0200
committerHans de Graaff <graaff@gentoo.org>2024-07-11 08:13:41 +0200
commit5364f7046f5083b3207d009c0b2982a69849fee8 (patch)
treeede755648f3b9a786bfb056226ef99eb65b86504 /dev-lang
parentapp-misc/fastfetch: drop 2.18.0 (diff)
downloadgentoo-5364f7046f5083b3207d009c0b2982a69849fee8.tar.gz
gentoo-5364f7046f5083b3207d009c0b2982a69849fee8.tar.bz2
gentoo-5364f7046f5083b3207d009c0b2982a69849fee8.zip
dev-lang/ruby: backport fix for tty test to 3.1
Closes: https://bugs.gentoo.org/935809 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ruby/files/3.1/012-test-readline-without-tty.patch33
-rw-r--r--dev-lang/ruby/ruby-3.1.5.ebuild1
-rw-r--r--dev-lang/ruby/ruby-3.1.6-r1.ebuild1
-rw-r--r--dev-lang/ruby/ruby-3.1.6.ebuild1
4 files changed, 36 insertions, 0 deletions
diff --git a/dev-lang/ruby/files/3.1/012-test-readline-without-tty.patch b/dev-lang/ruby/files/3.1/012-test-readline-without-tty.patch
new file mode 100644
index 000000000000..99319377ae45
--- /dev/null
+++ b/dev-lang/ruby/files/3.1/012-test-readline-without-tty.patch
@@ -0,0 +1,33 @@
+From 47988e63d65098ce1e6484f03ae5e2ca42bd7963 Mon Sep 17 00:00:00 2001
+From: Sorah Fukumori <her@sorah.jp>
+Date: Sat, 8 Jan 2022 14:03:02 +0900
+Subject: [PATCH] test_readline#test_without_tty: Use EnvUtil.rubybin
+
+`ruby` is not always available in certain build environments and
+configure options. Choose appropriate command line using EnvUtil.
+---
+ test/readline/test_readline.rb | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb
+index be338c6c0d484e..be6e65f32ef22d 100644
+--- a/test/readline/test_readline.rb
++++ b/test/readline/test_readline.rb
+@@ -6,6 +6,8 @@
+ require "open3"
+
+ module BasetestReadline
++ RUBY = EnvUtil.rubybin
++
+ INPUTRC = "INPUTRC"
+ TERM = "TERM"
+ SAVED_ENV = %w[COLUMNS LINES]
+@@ -839,7 +841,7 @@ def test_without_tty
+ loader = "use_lib_reline"
+ end
+ if loader
+- res, exit_status = Open3.capture2e("ruby -I#{__dir__} -Ilib -rhelper -e '#{loader}; Readline.readline(%{y or n?})'", stdin_data: "y\n")
++ res, exit_status = Open3.capture2e("#{RUBY} -I#{__dir__} -Ilib -rhelper -e '#{loader}; Readline.readline(%{y or n?})'", stdin_data: "y\n")
+ assert exit_status.success?, "It should work fine without tty, but it failed.\nError output:\n#{res}"
+ end
+ end
diff --git a/dev-lang/ruby/ruby-3.1.5.ebuild b/dev-lang/ruby/ruby-3.1.5.ebuild
index 993cce45993f..7b78ca8a545c 100644
--- a/dev-lang/ruby/ruby-3.1.5.ebuild
+++ b/dev-lang/ruby/ruby-3.1.5.ebuild
@@ -71,6 +71,7 @@ PDEPEND="
src_prepare() {
eapply "${FILESDIR}"/"${SLOT}"/011*.patch
+ eapply "${FILESDIR}"/"${SLOT}"/012*.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 ed9e6cd0f085..f80ca0f497a0 100644
--- a/dev-lang/ruby/ruby-3.1.6-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.1.6-r1.ebuild
@@ -71,6 +71,7 @@ PDEPEND="
src_prepare() {
eapply "${FILESDIR}"/"${SLOT}"/011*.patch
+ eapply "${FILESDIR}"/"${SLOT}"/012*.patch
eapply "${FILESDIR}"/"${SLOT}"/902*.patch
if use elibc_musl ; then
diff --git a/dev-lang/ruby/ruby-3.1.6.ebuild b/dev-lang/ruby/ruby-3.1.6.ebuild
index a14fd90dfe78..01adf5d8f861 100644
--- a/dev-lang/ruby/ruby-3.1.6.ebuild
+++ b/dev-lang/ruby/ruby-3.1.6.ebuild
@@ -71,6 +71,7 @@ PDEPEND="
src_prepare() {
eapply "${FILESDIR}"/"${SLOT}"/011*.patch
+ eapply "${FILESDIR}"/"${SLOT}"/012*.patch
eapply "${FILESDIR}"/"${SLOT}"/902*.patch
if use elibc_musl ; then