summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-05-15 16:28:59 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-17 08:54:55 +0200
commit8434d7602786dd7752124f4f2649ff4990759177 (patch)
tree6dcaec871434f4b9aa53ee59a005fc0df8acc522 /Ports
parentd78bed2ffe24defb0ea6297e7aa83c6b2c23e4de (diff)
downloadserenity-8434d7602786dd7752124f4f2649ff4990759177.zip
Ports: Update Ruby to version 3.2.2
Three patches that are apparently no longer needed have been removed.
Diffstat (limited to 'Ports')
-rw-r--r--Ports/AvailablePorts.md2
-rw-r--r--Ports/ruby/patches/0001-Teach-configure-about-serenity.patch42
-rw-r--r--Ports/ruby/patches/0002-Remove-locale-defines.patch29
-rw-r--r--Ports/ruby/patches/0003-Remove-the-inline-definitions-of-labs-and-llabs.patch37
-rw-r--r--Ports/ruby/patches/0004-Remove-uses-of-rusage.patch127
-rw-r--r--Ports/ruby/patches/ReadMe.md16
-rw-r--r--Ports/ruby/version.sh6
7 files changed, 40 insertions, 219 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index 420598c318..4dd4f37320 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -241,7 +241,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`RetroArch`](RetroArch/) | RetroArch | 1.12.0 | https://www.retroarch.com |
| [`RISCVEmu`](RISCVEmu/) | A Basic C++ RISC-V Emulator | ad8ad6a | https://github.com/IdanHo/RISCVEmu |
| [`rsync`](rsync/) | rsync | 3.1.3 | https://rsync.samba.org/ |
-| [`ruby`](ruby/) | Ruby | 3.0.4 | https://www.ruby-lang.org/ |
+| [`ruby`](ruby/) | Ruby | 3.2.2 | https://www.ruby-lang.org/ |
| [`rvvm`](rvvm/) | RVVM - The RISC-V Virtual Machine | 0.5 | https://github.com/LekKit/RVVM |
| [`sam`](sam/) | Software Automatic Mouth (SAM) | c86ea39 | https://github.com/vidarh/SAM |
| [`scummvm`](scummvm/) | ScummVM | 2.7.0 | https://www.scummvm.org/ |
diff --git a/Ports/ruby/patches/0001-Teach-configure-about-serenity.patch b/Ports/ruby/patches/0001-Teach-configure-about-serenity.patch
index d21df61c3f..120ba5c0f3 100644
--- a/Ports/ruby/patches/0001-Teach-configure-about-serenity.patch
+++ b/Ports/ruby/patches/0001-Teach-configure-about-serenity.patch
@@ -4,20 +4,50 @@ Date: Sat, 8 Jan 2022 17:02:29 +0330
Subject: [PATCH] Teach configure about serenity
Co-Authored-By: Eric Seifert <seiferteric@gmail.com>
+Co-Authored-By: Tim Schumacher <timschumi@gmx.de>
---
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ configure | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
-index a0d9a6c..44ebf54 100755
+index db34b7918baf98119bc1b2de420b7f36f9692260..fc20a056a1acb046bffece2458aeddb9389fc48c 100755
--- a/configure
+++ b/configure
-@@ -28610,7 +28610,7 @@ fi
+@@ -29485,6 +29485,10 @@ esac
+ ;; #(
+ *-haiku*) :
+
++ coroutine_type=pthread
++ ;; #(
++ *-serenity*) :
++
+ coroutine_type=pthread
+ ;; #(
+ *-emscripten*) :
+@@ -30227,7 +30231,7 @@ esac
+ fi
+
+ case "$target_os" in #(
+- linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu) :
++ linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | serenity*) :
+
+ if test "$rb_cv_binary_elf" = no
+ then :
+@@ -30417,7 +30421,7 @@ fi
*) :
;;
esac ;; #(
- linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*) :
-+ linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | serenity* | haiku*) :
++ linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku* | serenity*) :
: ${LDSHARED='$(CC) -shared'}
- if test "$rb_cv_binary_elf" = yes; then :
+ if test "$rb_cv_binary_elf" = yes
+@@ -31614,7 +31618,7 @@ esac
+
+ LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
+ ;; #(
+- linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | haiku*) :
++ linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | haiku* | serenity*) :
+
+ # RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS)
+ for rb_opt in '-Wl,-soname,$(LIBRUBY_SONAME)' "$LDFLAGS_OPTDIR"; do
diff --git a/Ports/ruby/patches/0002-Remove-locale-defines.patch b/Ports/ruby/patches/0002-Remove-locale-defines.patch
deleted file mode 100644
index 920874eb41..0000000000
--- a/Ports/ruby/patches/0002-Remove-locale-defines.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Eric Seifert <seiferteric@gmail.com>
-Date: Tue, 21 Sep 2021 23:09:21 -0700
-Subject: [PATCH] Remove locale defines
-
-Serenity does not have any of that.
----
- ext/nkf/nkf-utf8/nkf.h | 8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/ext/nkf/nkf-utf8/nkf.h b/ext/nkf/nkf-utf8/nkf.h
-index cd30376..7bafe73 100644
---- a/ext/nkf/nkf-utf8/nkf.h
-+++ b/ext/nkf/nkf-utf8/nkf.h
-@@ -152,14 +152,6 @@ void setbinmode(FILE *fp)
- # ifndef HAVE_LOCALE_H
- # define HAVE_LOCALE_H
- # endif
--#elif defined(__BIONIC__) /* bionic doesn't have locale */
--#else
--# ifndef HAVE_LANGINFO_H
--# define HAVE_LANGINFO_H
--# endif
--# ifndef HAVE_LOCALE_H
--# define HAVE_LOCALE_H
--# endif
- #endif
-
- #ifdef HAVE_LANGINFO_H
diff --git a/Ports/ruby/patches/0003-Remove-the-inline-definitions-of-labs-and-llabs.patch b/Ports/ruby/patches/0003-Remove-the-inline-definitions-of-labs-and-llabs.patch
deleted file mode 100644
index f7b47297ad..0000000000
--- a/Ports/ruby/patches/0003-Remove-the-inline-definitions-of-labs-and-llabs.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Eric Seifert <seiferteric@gmail.com>
-Date: Tue, 21 Sep 2021 23:09:21 -0700
-Subject: [PATCH] Remove the inline definitions of labs and llabs
-
----
- ext/bigdecimal/bigdecimal.h | 17 -----------------
- 1 file changed, 17 deletions(-)
-
-diff --git a/ext/bigdecimal/bigdecimal.h b/ext/bigdecimal/bigdecimal.h
-index 28f3363..a2c8c7e 100644
---- a/ext/bigdecimal/bigdecimal.h
-+++ b/ext/bigdecimal/bigdecimal.h
-@@ -74,23 +74,6 @@ extern "C" {
- #endif
- #endif
-
--#ifndef HAVE_LABS
--static inline long
--labs(long const x)
--{
-- if (x < 0) return -x;
-- return x;
--}
--#endif
--
--#ifndef HAVE_LLABS
--static inline LONG_LONG
--llabs(LONG_LONG const x)
--{
-- if (x < 0) return -x;
-- return x;
--}
--#endif
-
- #ifndef HAVE_FINITE
- static int
diff --git a/Ports/ruby/patches/0004-Remove-uses-of-rusage.patch b/Ports/ruby/patches/0004-Remove-uses-of-rusage.patch
deleted file mode 100644
index 3137f83f6d..0000000000
--- a/Ports/ruby/patches/0004-Remove-uses-of-rusage.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Eric Seifert <seiferteric@gmail.com>
-Date: Tue, 21 Sep 2021 23:09:21 -0700
-Subject: [PATCH] Remove uses of rusage
-
----
- gc.c | 23 -----------------------
- process.c | 37 -------------------------------------
- 2 files changed, 60 deletions(-)
-
-diff --git a/gc.c b/gc.c
-index 5d0c342..332340e 100644
---- a/gc.c
-+++ b/gc.c
-@@ -11544,17 +11544,6 @@ getrusage_time(void)
- }
- #endif
-
--#ifdef RUSAGE_SELF
-- {
-- struct rusage usage;
-- struct timeval time;
-- if (getrusage(RUSAGE_SELF, &usage) == 0) {
-- time = usage.ru_utime;
-- return time.tv_sec + time.tv_usec * 1e-6;
-- }
-- }
--#endif
--
- #ifdef _WIN32
- {
- FILETIME creation_time, exit_time, kernel_time, user_time;
-@@ -11613,18 +11602,6 @@ gc_prof_setup_new_record(rb_objspace_t *objspace, int reason)
- record->flags = reason | (ruby_gc_stressful ? GPR_FLAG_STRESS : 0);
- #if MALLOC_ALLOCATED_SIZE
- record->allocated_size = malloc_allocated_size;
--#endif
--#if GC_PROFILE_MORE_DETAIL && GC_PROFILE_DETAIL_MEMORY
--#ifdef RUSAGE_SELF
-- {
-- struct rusage usage;
-- if (getrusage(RUSAGE_SELF, &usage) == 0) {
-- record->maxrss = usage.ru_maxrss;
-- record->minflt = usage.ru_minflt;
-- record->majflt = usage.ru_majflt;
-- }
-- }
--#endif
- #endif
- }
- }
-diff --git a/process.c b/process.c
-index 674f05d..b7941aa 100644
---- a/process.c
-+++ b/process.c
-@@ -324,9 +324,6 @@ static ID id_GETTIMEOFDAY_BASED_CLOCK_REALTIME, id_TIME_BASED_CLOCK_REALTIME;
- static ID id_TIMES_BASED_CLOCK_MONOTONIC;
- static ID id_TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID;
- #endif
--#ifdef RUSAGE_SELF
--static ID id_GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID;
--#endif
- static ID id_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID;
- #ifdef __APPLE__
- static ID id_MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC;
-@@ -7878,16 +7875,6 @@ VALUE
- rb_proc_times(VALUE obj)
- {
- VALUE utime, stime, cutime, cstime, ret;
--#if defined(RUSAGE_SELF) && defined(RUSAGE_CHILDREN)
-- struct rusage usage_s, usage_c;
--
-- if (getrusage(RUSAGE_SELF, &usage_s) != 0 || getrusage(RUSAGE_CHILDREN, &usage_c) != 0)
-- rb_sys_fail("getrusage");
-- utime = DBL2NUM((double)usage_s.ru_utime.tv_sec + (double)usage_s.ru_utime.tv_usec/1e6);
-- stime = DBL2NUM((double)usage_s.ru_stime.tv_sec + (double)usage_s.ru_stime.tv_usec/1e6);
-- cutime = DBL2NUM((double)usage_c.ru_utime.tv_sec + (double)usage_c.ru_utime.tv_usec/1e6);
-- cstime = DBL2NUM((double)usage_c.ru_stime.tv_sec + (double)usage_c.ru_stime.tv_usec/1e6);
--#else
- const double hertz = (double)get_clk_tck();
- struct tms buf;
-
-@@ -7896,7 +7883,6 @@ rb_proc_times(VALUE obj)
- stime = DBL2NUM(buf.tms_stime / hertz);
- cutime = DBL2NUM(buf.tms_cutime / hertz);
- cstime = DBL2NUM(buf.tms_cstime / hertz);
--#endif
- ret = rb_struct_new(rb_cProcessTms, utime, stime, cutime, cstime);
- RB_GC_GUARD(utime);
- RB_GC_GUARD(stime);
-@@ -8312,26 +8298,6 @@ rb_clock_gettime(int argc, VALUE *argv, VALUE _)
- }
- #endif
-
--#ifdef RUSAGE_SELF
--#define RUBY_GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID \
-- ID2SYM(id_GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID)
-- if (clk_id == RUBY_GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID) {
-- struct rusage usage;
-- int32_t usec;
-- ret = getrusage(RUSAGE_SELF, &usage);
-- if (ret != 0)
-- rb_sys_fail("getrusage");
-- tt.giga_count = usage.ru_utime.tv_sec + usage.ru_stime.tv_sec;
-- usec = (int32_t)(usage.ru_utime.tv_usec + usage.ru_stime.tv_usec);
-- if (1000000 <= usec) {
-- tt.giga_count++;
-- usec -= 1000000;
-- }
-- tt.count = usec * 1000;
-- denominators[num_denominators++] = 1000000000;
-- goto success;
-- }
--#endif
-
- #ifdef HAVE_TIMES
- #define RUBY_TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID \
-@@ -9081,9 +9047,6 @@ Init_process(void)
- #ifdef HAVE_TIMES
- id_TIMES_BASED_CLOCK_MONOTONIC = rb_intern_const("TIMES_BASED_CLOCK_MONOTONIC");
- id_TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID = rb_intern_const("TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID");
--#endif
--#ifdef RUSAGE_SELF
-- id_GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID = rb_intern_const("GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID");
- #endif
- id_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID = rb_intern_const("CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID");
- #ifdef __APPLE__
diff --git a/Ports/ruby/patches/ReadMe.md b/Ports/ruby/patches/ReadMe.md
index 9d800c81b0..7393a00226 100644
--- a/Ports/ruby/patches/ReadMe.md
+++ b/Ports/ruby/patches/ReadMe.md
@@ -5,19 +5,3 @@
Teach configure about serenity
-## `0002-Remove-locale-defines.patch`
-
-Remove locale defines
-
-Serenity does not have any of that.
-
-## `0003-Remove-the-inline-definitions-of-labs-and-llabs.patch`
-
-Remove the inline definitions of labs and llabs
-
-
-## `0004-Remove-uses-of-rusage.patch`
-
-Remove uses of rusage
-
-
diff --git a/Ports/ruby/version.sh b/Ports/ruby/version.sh
index b736cbb44d..4952dd77bb 100644
--- a/Ports/ruby/version.sh
+++ b/Ports/ruby/version.sh
@@ -1,6 +1,6 @@
-RUBY_MAJOR="3.0"
-RUBY_TEENY="4"
+RUBY_MAJOR="3.2"
+RUBY_TEENY="2"
RUBY_VERSION="${RUBY_MAJOR}.${RUBY_TEENY}"
RUBY_ARCHIVE="ruby-${RUBY_VERSION}.tar.gz"
RUBY_ARCHIVE_URL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/${RUBY_ARCHIVE}"
-RUBY_ARCHIVE_SHA256SUM="70b47c207af04bce9acea262308fb42893d3e244f39a4abc586920a1c723722b"
+RUBY_ARCHIVE_SHA256SUM="96c57558871a6748de5bc9f274e93f4b5aad06cd8f37befa0e8d94e7b8a423bc"