[gentoo-commits] repo/gentoo:master commit in: dev-lang/ruby/files/3.2/, dev-lang/ruby/

2024-01-19 Thread Hans de Graaff
commit: 48e0df513076f834210ff3ea48f58380cfd5a616
Author: Hans de Graaff  gentoo  org>
AuthorDate: Fri Jan 19 17:55:45 2024 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Fri Jan 19 17:57:02 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48e0df51

dev-lang/ruby: add 3.2.3

Signed-off-by: Hans de Graaff  gentoo.org>

 dev-lang/ruby/Manifest |   1 +
 .../files/3.2/011-arm64-branch-protection.patch|  28 ++
 dev-lang/ruby/ruby-3.2.3.ebuild| 298 +
 3 files changed, 327 insertions(+)

diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
index 889da2b60c70..8c106844a6ee 100644
--- a/dev-lang/ruby/Manifest
+++ b/dev-lang/ruby/Manifest
@@ -1,3 +1,4 @@
 DIST ruby-3.1.4.tar.xz 15316604 BLAKE2B 
5d771c267451c05ae192991976957d43d1131e652ac5a90a8dfff9deba97cf6b139d0113f5d2ed44225a545aa79a1c732555de1efc83d1010d097ec35f7e92dd
 SHA512 
a627bb629a10750b8b2081ad451a41faea0fc85d95aa1e267e3d2a0f56a35bb58195d4a8d13bbdbd82f4197a96dae22b1cee1dfc83861ec33a67ece07aef5633
 DIST ruby-3.2.2.tar.xz 15118856 BLAKE2B 
8e09fb0f6808d4572f86ea190db4f4b950ff3a13391bf7bc3e515b6d14f356d3f7c1eb5bbbe2de460ef78edee54462fdf9be56722cd9e27a613febfe45f8c40a
 SHA512 
a29f24cd80f563f6368952d06d6273f7241a409fa9ab2f60e03dde2ac58ca06bee1750715b6134caebf4c061d3503446dc37a6059e19860bb0010eef34951935
+DIST ruby-3.2.3.tar.xz 15163960 BLAKE2B 
e2cfa215b2cb910bac5f3b58edcdece91b21ffcfb6b4c183eec0c8502c320b78e7a8732c393b6e6a38dc9cfd81e129c00562d9be45f0deb36306ac81f96dcdc1
 SHA512 
d2a1897c2f4e801a28acb869322abfee76775115016252cecad90639485ed51deda1446cb16edb387f10a2e188602d646ef9b008b57f27bd745071277c535f3b
 DIST ruby-3.3.0.tar.xz 16345456 BLAKE2B 
09ef6fb4b2768118207e7a9ece17c5c62c9f596b1c13ac6199245889fcc5d25f03336831ec3bf1367a460a8a26c4426c32bcd576b0da8bdafc90301032b4d2f0
 SHA512 
7959c5753bfa0bfc4d6d74060869aabbe9815c1c97930659da11b917ee0803ddbbd80e869e00c48b8694b4ba48709c3b6493fd045568e36e902616c35ababf01

diff --git a/dev-lang/ruby/files/3.2/011-arm64-branch-protection.patch 
b/dev-lang/ruby/files/3.2/011-arm64-branch-protection.patch
new file mode 100644
index ..14d2c00837a7
--- /dev/null
+++ b/dev-lang/ruby/files/3.2/011-arm64-branch-protection.patch
@@ -0,0 +1,28 @@
+From a8af871e29c6c922c4c3aeb94697ab958fc12e9b Mon Sep 17 00:00:00 2001
+From: Yuta Saito 
+Date: Wed, 27 Dec 2023 06:22:45 +
+Subject: [PATCH] [Bug #20085] Use consistent default options for
+ `-mbranch-protection`
+
+We need to use the same options for both C compiler and assembler
+when `-mbranch-protection` is guessed by configure. Otherwise,
+`coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies.
+---
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9286946fc15f4..18b4247991d42 100644
+--- a/configure.ac
 b/configure.ac
+@@ -830,7 +830,10 @@ AS_IF([test "$GCC" = yes], [
+   AS_FOR(option, opt, [-mbranch-protection=pac-ret 
-msign-return-address=all], [
+ RUBY_TRY_CFLAGS(option, [branch_protection=yes], 
[branch_protection=no])
+ AS_IF([test "x$branch_protection" = xyes], [
++# C compiler and assembler must be consistent for 
-mbranch-protection
++# since they both check `__ARM_FEATURE_PAC_DEFAULT` 
definition.
+ RUBY_APPEND_OPTION(XCFLAGS, option)
++RUBY_APPEND_OPTION(ASFLAGS, option)
+ break
+ ])
+ ])

diff --git a/dev-lang/ruby/ruby-3.2.3.ebuild b/dev-lang/ruby/ruby-3.2.3.ebuild
new file mode 100644
index ..74f31bc252dc
--- /dev/null
+++ b/dev-lang/ruby/ruby-3.2.3.ebuild
@@ -0,0 +1,298 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic multiprocessing
+
+MY_P="${PN}-$(ver_cut 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(ver_cut 1-2)
+MY_SUFFIX=$(ver_rs 1 '' ${SLOT})
+RUBYVERSION=${SLOT}.0
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="https://www.ruby-lang.org/;
+SRC_URI="https://cache.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.xz;
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos 
~x64-solaris"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc jit socks5 +ssl static-libs 
systemtap tk valgrind xemacs"
+
+RDEPEND="
+   berkdb? ( sys-libs/db:= )
+   gdbm? ( sys-libs/gdbm:= )
+   jemalloc? ( dev-libs/jemalloc:= )
+   jit? ( >=virtual/rust-1.58.1 )
+   ssl? (
+   dev-libs/openssl:0=
+   )
+   socks5? ( >=net-proxy/dante-1.1.13 )
+   systemtap? ( dev-util/systemtap )
+   tk? (
+   dev-lang/tcl:0=[threads]
+   dev-lang/tk:0=[threads]
+   )
+   dev-libs/libyaml
+   dev-libs/libffi:=
+   

[gentoo-commits] repo/gentoo:master commit in: dev-lang/ruby/files/3.2/, dev-lang/ruby/

2023-03-10 Thread Hans de Graaff
commit: a4c209b762f4574867743de2114eb98de648f635
Author: Hans de Graaff  gentoo  org>
AuthorDate: Fri Mar 10 16:48:23 2023 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Fri Mar 10 20:29:09 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4c209b7

dev-lang/ruby: redo musl patch for ruby 3.2

Closes: https://bugs.gentoo.org/899902
Signed-off-by: Hans de Graaff  gentoo.org>

 dev-lang/ruby/files/3.2/901-musl-stacksize.patch | 24 +---
 dev-lang/ruby/ruby-3.2.1.ebuild  |  2 +-
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/dev-lang/ruby/files/3.2/901-musl-stacksize.patch 
b/dev-lang/ruby/files/3.2/901-musl-stacksize.patch
index e5fcfce2195e..f18aa271ea65 100644
--- a/dev-lang/ruby/files/3.2/901-musl-stacksize.patch
+++ b/dev-lang/ruby/files/3.2/901-musl-stacksize.patch
@@ -1,11 +1,6 @@
-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
+--- a/thread_pthread.c 2023-02-08 05:02:20.0 +0100
 b/thread_pthread.c 2023-03-10 17:46:25.694739053 +0100
+@@ -1033,7 +1033,7 @@
  {
  native_main_thread.id = pthread_self();
  
@@ -13,14 +8,13 @@ index 951885ffa0..e2d662143b 100644
 +#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)
-
+ void* stackaddr;
+@@ -2090,7 +2090,7 @@
+ 
  #ifdef STACKADDR_AVAILABLE
  if (get_stack(, ) == 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, ) == 0 && rlim.rlim_cur > size) {
-
+ if (pthread_equal(th->nt->thread_id, native_main_thread.id)) {
+ struct rlimit rlim;
+ if (getrlimit(RLIMIT_STACK, ) == 0 && rlim.rlim_cur > size) {

diff --git a/dev-lang/ruby/ruby-3.2.1.ebuild b/dev-lang/ruby/ruby-3.2.1.ebuild
index 9193389e5f80..d98ad3ab2a5a 100644
--- a/dev-lang/ruby/ruby-3.2.1.ebuild
+++ b/dev-lang/ruby/ruby-3.2.1.ebuild
@@ -75,7 +75,7 @@ src_prepare() {
eapply "${FILESDIR}"/"${SLOT}"/010*.patch
 
if use elibc_musl ; then
-   eapply "${FILESDIR}"/3.1/901-musl-*.patch
+   eapply "${FILESDIR}"/${SLOT}/901-musl-*.patch
fi
 
einfo "Unbundling gems..."