aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2024-03-21 09:18:04 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2024-03-21 09:25:06 +0000
commit32a6b38c233cbe0c401c835ec8b5755e62b51d68 (patch)
treed13d3097a6a655ecb999f420de9961abca817c95
parent352fb71e12ce598356d93f0c1ad05b0608efc3a6 (diff)
downloadports-32a6b38c233cbe0c401c835ec8b5755e62b51d68.tar.gz
ports-32a6b38c233cbe0c401c835ec8b5755e62b51d68.zip
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.
-rw-r--r--ports-mgmt/portupgrade/Makefile8
1 files changed, 7 insertions, 1 deletions
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