Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Mar 2024 09:25:12 GMT
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 32a6b38c233c - main - ports-mgmt/portupgrade: unbreak for Ruby 3.2+
Message-ID:  <202403210925.42L9PCKZ047764@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by eugen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=32a6b38c233cbe0c401c835ec8b5755e62b51d68

commit 32a6b38c233cbe0c401c835ec8b5755e62b51d68
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2024-03-21 09:18:04 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2024-03-21 09:25:06 +0000

    ports-mgmt/portupgrade: unbreak for Ruby 3.2+
    
    portupgrade fails with an error "undefined method `exists?' for File:Class"
    if used with Ruby 3.2+ (seems it removed alias "exists?" for method "exist?").
    
    Fix it. Bump PORTREVISION.
---
 ports-mgmt/portupgrade/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ports-mgmt/portupgrade/Makefile b/ports-mgmt/portupgrade/Makefile
index 858c5a271420..284b9f651f69 100644
--- a/ports-mgmt/portupgrade/Makefile
+++ b/ports-mgmt/portupgrade/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	portupgrade
 PORTVERSION=	2.4.16
-PORTREVISION=	2
+PORTREVISION=	3
 PORTEPOCH=	2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	LOCAL/bdrewery/${PORTNAME}/ \
@@ -41,6 +41,12 @@ INSTALL_TARGET+=	install-doc
 # For PKG_DBDRIVER={bdb_btree,bdb_hash}
 RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/bdb.so:databases/ruby-bdb
 
+.if ${RUBY_VERSION_CODE:U} >= 320
+post-patch:
+	cd ${WRKSRC} && ${FIND} bin etc lib -type f |\
+		${XARGS} ${REINPLACE_CMD} 's/File\.exists\?/File.exist?/'
+.endif
+
 post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib/compat/pkg
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403210925.42L9PCKZ047764>