From 65e4244e411c4f65f55f2aa91f39e228f4c0680b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 4 Mar 2023 13:38:05 +0000 Subject: gentoo auto-resync : 04:03:2023 - 13:38:04 --- .../ruby/files/3.2/010-default-gem-location.patch | 11 +++++++++ dev-lang/ruby/files/3.2/901-musl-stacksize.patch | 26 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 dev-lang/ruby/files/3.2/010-default-gem-location.patch create mode 100644 dev-lang/ruby/files/3.2/901-musl-stacksize.patch (limited to 'dev-lang/ruby/files') diff --git a/dev-lang/ruby/files/3.2/010-default-gem-location.patch b/dev-lang/ruby/files/3.2/010-default-gem-location.patch new file mode 100644 index 000000000000..36009ad66f61 --- /dev/null +++ b/dev-lang/ruby/files/3.2/010-default-gem-location.patch @@ -0,0 +1,11 @@ +--- a/tool/rbinstall.rb 2022-11-13 08:12:27.373041649 +0100 ++++ b/tool/rbinstall.rb 2022-11-13 08:16:09.110406705 +0100 +@@ -994,7 +994,7 @@ + end + + install?(:ext, :comm, :gem, :'bundled-gems') do +- gem_dir = Gem.default_dir ++ gem_dir = ENV['GEM_DESTDIR'] + install_dir = with_destdir(gem_dir) + prepare "bundled gems", gem_dir + RbInstall.no_write do diff --git a/dev-lang/ruby/files/3.2/901-musl-stacksize.patch b/dev-lang/ruby/files/3.2/901-musl-stacksize.patch new file mode 100644 index 000000000000..e5fcfce2195e --- /dev/null +++ b/dev-lang/ruby/files/3.2/901-musl-stacksize.patch @@ -0,0 +1,26 @@ +musl has a conservative stacksize, as compared to glibc, so treat it +like other systems with such stacksize + +diff --git a/thread_pthread.c b/thread_pthread.c +index 951885ffa0..e2d662143b 100644 +--- a/thread_pthread.c ++++ b/thread_pthread.c +@@ -721,7 +721,7 @@ ruby_init_stack(volatile VALUE *addr + { + native_main_thread.id = pthread_self(); + +-#if MAINSTACKADDR_AVAILABLE ++#if MAINSTACKADDR_AVAILABLE && !(defined(__linux__) && !defined(__GLIBC__)) + if (native_main_thread.stack_maxsize) return; + { + void* stackaddr; +@@ -1680,7 +1680,7 @@ ruby_stack_overflowed_p(const rb_thread_t *th, const void *addr) + + #ifdef STACKADDR_AVAILABLE + if (get_stack(&base, &size) == 0) { +-# ifdef __APPLE__ ++# if defined(__APPLE__) || (defined(__linux__) && !defined(__GLIBC__)) + if (pthread_equal(th->thread_id, native_main_thread.id)) { + struct rlimit rlim; + if (getrlimit(RLIMIT_STACK, &rlim) == 0 && rlim.rlim_cur > size) { + -- cgit v1.2.3