git: 2a325f4cc52c - main - ports-mgmt/portupgrade*: Use databases/rubygem-dbm with Ruby 3.2

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Thu, 05 Jan 2023 09:56:20 UTC
The branch main has been updated by yasu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2a325f4cc52c8565348304a9a24a2975ecaaeedd

commit 2a325f4cc52c8565348304a9a24a2975ecaaeedd
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-12-06 20:30:17 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2023-01-05 09:55:42 +0000

    ports-mgmt/portupgrade*: Use databases/rubygem-dbm with Ruby 3.2
    
    databases/ruby-bdb is BROKEN with Ruby 3.2.
    
    PR:             268207
    Approved by:    maintainer timeout
    MFH:            2023Q1
---
 ports-mgmt/portupgrade-devel/Makefile | 5 +++++
 ports-mgmt/portupgrade/Makefile       | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/ports-mgmt/portupgrade-devel/Makefile b/ports-mgmt/portupgrade-devel/Makefile
index 1abdc7f2ef4e..44aaa0892fe9 100644
--- a/ports-mgmt/portupgrade-devel/Makefile
+++ b/ports-mgmt/portupgrade-devel/Makefile
@@ -40,8 +40,13 @@ INSTALL_TARGET=		install
 INSTALL_TARGET+=	install-doc
 .endif
 
+.if ${RUBY_VER} >= 3.2
+# databases/ruby-bdb is BROKEN with Ruby 3.2
+RUN_DEPENDS+=	rubygem-dbm>0:databases/rubygem-dbm
+.else
 # For PKG_DBDRIVER={bdb_btree,bdb_hash}
 RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/bdb.so:databases/ruby-bdb
+.endif
 
 regression-test: patch
 	cd ${WRKSRC} && ${MAKE} test
diff --git a/ports-mgmt/portupgrade/Makefile b/ports-mgmt/portupgrade/Makefile
index b4a8be928994..4fc1e8e6b928 100644
--- a/ports-mgmt/portupgrade/Makefile
+++ b/ports-mgmt/portupgrade/Makefile
@@ -39,8 +39,13 @@ INSTALL_TARGET=		install
 INSTALL_TARGET+=	install-doc
 .endif
 
+.if ${RUBY_VER} >= 3.2
+# databases/ruby-bdb is BROKEN with Ruby 3.2
+RUN_DEPENDS+=	rubygem-dbm>0:databases/rubygem-dbm
+.else
 # For PKG_DBDRIVER={bdb_btree,bdb_hash}
 RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/bdb.so:databases/ruby-bdb
+.endif
 
 post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib/compat/pkg