Index: Mk/bsd.ruby.mk =================================================================== --- Mk/bsd.ruby.mk +++ Mk/bsd.ruby.mk @@ -133,7 +133,7 @@ # Ruby 2.7 # RUBY_DISTVERSION= 2.7.6 -RUBY_PORTREVISION= 2 +RUBY_PORTREVISION= 3 RUBY_PORTEPOCH= 1 . elif ${RUBY_VER} == 3.0 @@ -141,14 +141,14 @@ # Ruby 3.0 # RUBY_DISTVERSION= 3.0.4 -RUBY_PORTREVISION= 2 +RUBY_PORTREVISION= 3 RUBY_PORTEPOCH= 1 . elif ${RUBY_VER} == 3.1 # # Ruby 3.1 # RUBY_DISTVERSION= 3.1.2 -RUBY_PORTREVISION= 1 +RUBY_PORTREVISION= 2 RUBY_PORTEPOCH= 1 . elif ${RUBY_VER} == 3.2 @@ -156,7 +156,7 @@ # Ruby 3.2 # RUBY_DISTVERSION= 3.2.0-preview1 -RUBY_PORTREVISION= 2 +RUBY_PORTREVISION= 3 RUBY_PORTEPOCH= 1 # When adding a version, please keep the comment in Index: lang/ruby27/files/patch-util.c =================================================================== --- /dev/null +++ lang/ruby27/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:25:48 UTC ++++ util.c +@@ -210,6 +210,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -255,7 +256,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -521,7 +522,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str) Index: lang/ruby30/files/patch-util.c =================================================================== --- /dev/null +++ lang/ruby30/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:48:55 UTC ++++ util.c +@@ -214,6 +214,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -259,7 +260,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -525,7 +526,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str) Index: lang/ruby31/files/patch-util.c =================================================================== --- /dev/null +++ lang/ruby31/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:11:15 UTC ++++ util.c +@@ -218,6 +218,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -263,7 +264,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -530,7 +531,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str) Index: lang/ruby32/files/patch-util.c =================================================================== --- /dev/null +++ lang/ruby32/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:48:55 UTC ++++ util.c +@@ -214,6 +214,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -259,7 +260,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -525,7 +526,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str)