Monday, December 25, 2023

New: Ruby 3.3.0

This adds Ruby 3.3, released today. Release announcement at:

https://www.ruby-lang.org/en/news/2023/12/25/ruby-3-3-0-released/

I'd like to commit this with updates to ruby.port.mk to support the
ruby33 FLAVOR for Ruby ports, and with updates to ruby Makefile.inc:

* This sets PATCHORIG = .orig, because the build infrastructure handles
that better and it requires less work when updating plists.

* This sets optflags="", so that the build infrastructure does not
override the default optimization flags.

* This removes ncurses, readline, and yaml from WANTLIB, and adds yaml-0
to WANTLIB. For Ruby 3.1 and 3.2, ncurses and readline are added back.
Ruby 3.3 drops the readline extension, so those libraries are no longer
needed.

* This drops the gdbm subpackage code from Makefile.inc, since it
is no longer used by any supported Ruby version.

Tested on amd64 since beta1.

OK to commit?

Thanks,
Jeremy

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/Makefile,v
diff -u -p -r1.99 Makefile
--- Makefile 13 Oct 2023 23:12:43 -0000 1.99
+++ Makefile 11 Dec 2023 16:14:09 -0000
@@ -1,5 +1,6 @@
SUBDIR =
SUBDIR += 3.1
SUBDIR += 3.2
+SUBDIR += 3.3

.include <bsd.port.subdir.mk>
Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/ruby/Makefile.inc,v
diff -u -p -r1.33 Makefile.inc
--- Makefile.inc 9 Nov 2023 23:07:11 -0000 1.33
+++ Makefile.inc 15 Dec 2023 18:28:53 -0000
@@ -1,11 +1,9 @@
COMMENT-main ?= object oriented script language with threads
-COMMENT-gdbm ?= gdbm interface for ruby
COMMENT-ri_docs ?= ri documentation files for ruby

DISTNAME ?= ruby-${VERSION}

PKGNAME-main ?= ruby-${VERSION}
-PKGNAME-gdbm ?= ruby${BINREV}-gdbm-${VERSION}
PKGNAME-ri_docs ?= ruby${BINREV}-ri_docs-${VERSION}

PKG_ARCH-ri_docs ?= *
@@ -25,6 +23,7 @@ PERMIT_PACKAGE?= Yes
SITES ?= https://cache.ruby-lang.org/pub/ruby/${VERSION:R}/
SITES.p ?= https://github.com/ruby/ruby/commit/
PATCH_DIST_STRIP ?= -p1
+PATCHORIG = .orig

CONFIGURE_STYLE ?= gnu
CONFIGURE_ARGS += --enable-shared \
@@ -43,6 +42,7 @@ CONFIGURE_ARGS += --with-compress-debug-

CONFIGURE_ENV += LIBruby${BINREV}_VERSION=${LIBruby${BINREV}_VERSION} \
PREFIX="${PREFIX}" \
+ optflags="" \
CPPFLAGS="-DOPENSSL_NO_STATIC_ENGINE -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
DLDFLAGS="-L${LOCALBASE}/lib" \
@@ -51,17 +51,10 @@ CONFIGURE_ENV += LIBruby${BINREV}_VERSIO

MAKE_ENV += DLDFLAGS="-I${LOCALBASE}/lib"

-WANTLIB-main += c crypto ffi gmp m ncurses pthread readline ssl \
- util yaml z
+WANTLIB-main += c crypto ffi gmp m pthread ssl util yaml-0 z
LIB_DEPENDS-main += devel/gmp \
devel/libyaml \
devel/libffi
-
-WANTLIB-gdbm += c m gdbm gmp pthread ruby${BINREV}
-LIB_DEPENDS-gdbm += databases/gdbm \
- devel/gmp \
- lang/ruby/${REV},-main>=${VERSION},<${NEXTVER}
-RUN_DEPENDS-gdbm ?=

DEBUG_PACKAGES ?= -main

Index: ruby.port.mk
===================================================================
RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v
diff -u -p -r1.117 ruby.port.mk
--- ruby.port.mk 13 Oct 2023 23:15:40 -0000 1.117
+++ ruby.port.mk 31 Oct 2023 17:26:42 -0000
@@ -25,7 +25,7 @@ MODRUBY_HANDLE_FLAVORS ?= No
# If ruby.pork.mk should handle FLAVORs, define a separate FLAVOR
# for each ruby version.
. if !defined(FLAVORS)
-FLAVORS= ruby31 ruby32
+FLAVORS= ruby31 ruby32 ruby33
. endif

# Instead of adding flavors to the end of the package name, we use
@@ -49,11 +49,12 @@ FLAVOR = ruby32

# Check for conflicting FLAVORs and set MODRUBY_REV appropriately based
# on the FLAVOR.
-. for i in ruby31 ruby32
+. for i in ruby31 ruby32 ruby33
. if ${FLAVOR:M$i}
MODRUBY_REV = ${i:C/ruby([0-9])/\1./}
. if ${FLAVOR:N$i:Mruby31} || \
- ${FLAVOR:N$i:Mruby32}
+ ${FLAVOR:N$i:Mruby32} || \
+ ${FLAVOR:N$i:Mruby33}
ERRORS += "Fatal: Conflicting flavors used: ${FLAVOR}"
. endif
. endif
Index: 3.1/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/3.1/Makefile,v
diff -u -p -r1.14 Makefile
--- 3.1/Makefile 25 Sep 2023 17:07:32 -0000 1.14
+++ 3.1/Makefile 15 Dec 2023 18:31:33 -0000
@@ -4,6 +4,8 @@ SHARED_LIBS = ruby31 0.0
NEXTVER = 3.2
PKGSPEC-main ?= ruby->=3.1.0,<${NEXTVER}

+REVISION-main = 0
+
SITES.p1 ?= https://github.com/ruby/openssl/commit/

# Backport fix for fixnum*fixnum multiplication on octeon
@@ -37,7 +39,7 @@ CONFIGURE_ENV += ac_cv_path_MJIT_CC=`whi
GEM_EXTENSIONS_DIR = lib/ruby/gems/${REV}/extensions/${MACHINE_ARCH:S/i386/x86/:S/amd64/x86_64/}-openbsd
SUBST_VARS += GEM_EXTENSIONS_DIR

-WANTLIB-main += curses yaml-0
+WANTLIB-main += curses readline

post-extract:
${POST_EXTRACT}
Index: 3.2/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/3.2/Makefile,v
diff -u -p -r1.6 Makefile
--- 3.2/Makefile 24 Sep 2023 11:19:29 -0000 1.6
+++ 3.2/Makefile 11 Dec 2023 19:00:25 -0000
@@ -3,7 +3,7 @@ DISTNAME = ruby-${VERSION}
SHARED_LIBS = ruby32 0.0
NEXTVER = 3.3
PKGSPEC-main ?= ruby->=3.2.0,<${NEXTVER}
-REVISION-main = 1
+REVISION-main = 2

PSEUDO_FLAVORS= no_ri_docs bootstrap
# Do not build the RI docs on slow arches
@@ -36,7 +36,7 @@ CONFIGURE_ENV += ac_cv_path_MJIT_CC=`whi
GEM_EXTENSIONS_DIR = lib/ruby/gems/${REV}/extensions/${MACHINE_ARCH:S/i386/x86/:S/amd64/x86_64/}-openbsd
SUBST_VARS += GEM_EXTENSIONS_DIR

-WANTLIB-main += curses yaml-0
+WANTLIB-main += curses readline

TEST_ENV = RUBYGEMS_SYSTEM_UPDATE_MESSAGE=enable
TEST_TARGET = check TESTOPTS="-v -q"

No comments:

Post a Comment