git: d4e0df85317b - 2024Q2 - lang/ruby33: Fix build with latest -CURRENT

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Wed, 24 Apr 2024 18:13:26 UTC
The branch 2024Q2 has been updated by yasu:

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

commit d4e0df85317bd23b887c4c61817bd4b1ffebb274
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2024-04-24 18:07:09 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2024-04-24 18:13:07 +0000

    lang/ruby33: Fix build with latest -CURRENT
    
    post-install-DOCS-on copies all files/directories under ${WRKSRC}/doc/
    into ${STAGEDIR}${RUBY_DOCDIR}/, then installs ${WRKSRC}/ChangeLog to
    same directory. But there is ChangeLog directory under ${WRKSRC}/doc/.
    As a result there is already ${STAGEDIR}${RUBY_DOCDIR}/ChangeLog
    directory when ${WRKSRC}/ChangeLog is tried to be installed as
    ${WRKSRC}/doc/ChangeLog. Previously install(1) regards it as non-fatal
    and build continues. But on latest -CURRENT the command regards it as
    fatal and results in build error. So fix it by moving
    ${WRKSRC}/ChangeLog to ${WRKSRC}/doc/ChangeLog/ChangeLog at extract
    phase.
    
    Bump PORTREVISION as plist is changed.
    
    PR:             278554
    Reported by:    Siva Mahadevan
    MFH:            2024Q2
    
    (cherry picked from commit 8f7dac72c518bd1de867e78af351a4a7cf02d799)
---
 Mk/Uses/ruby.mk       | 2 +-
 lang/ruby33/Makefile  | 4 +++-
 lang/ruby33/pkg-plist | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Mk/Uses/ruby.mk b/Mk/Uses/ruby.mk
index cad327f2bd46..e1650bfe791a 100644
--- a/Mk/Uses/ruby.mk
+++ b/Mk/Uses/ruby.mk
@@ -163,7 +163,7 @@ RUBY_PORTREVISION=	0
 # Ruby 3.3
 #
 RUBY_DISTVERSION=	3.3.1
-RUBY_PORTREVISION=	0
+RUBY_PORTREVISION=	1
 
 # When adding a version, please keep the comment in
 # Mk/bsd.default-versions.mk in sync.
diff --git a/lang/ruby33/Makefile b/lang/ruby33/Makefile
index 21949fe60944..89cb21edfbb6 100644
--- a/lang/ruby33/Makefile
+++ b/lang/ruby33/Makefile
@@ -113,6 +113,9 @@ RB_SET_CONF_VAR=	${SH} -c \
 			'${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' \
 			--
 
+post-extract-DOCS-on:
+	${MV} ${WRKSRC}/ChangeLog ${WRKSRC}/doc/ChangeLog
+
 post-patch:
 # We get these from other ports
 .for d in bin/* ext/dbm ext/gdbm ext/win32* lib/bundler* libexec/bundler* \
@@ -188,7 +191,6 @@ post-install-DOCS-on:
 .endfor
 	@(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/)
 	${INSTALL_DATA} ${WRKSRC}/COPYING*	\
-			${WRKSRC}/ChangeLog	\
 			${WRKSRC}/LEGAL		\
 			${WRKSRC}/README*	\
 			${STAGEDIR}${RUBY_DOCDIR}/
diff --git a/lang/ruby33/pkg-plist b/lang/ruby33/pkg-plist
index f18a365ed509..b4cc54ee25c9 100644
--- a/lang/ruby33/pkg-plist
+++ b/lang/ruby33/pkg-plist
@@ -1113,6 +1113,7 @@ libdata/pkgconfig/ruby-%%RUBY_VER%%.pc
 %%NO_CAPIDOCS%%%%NO_DOCS%%%%RDOC%%@dir %%RUBY_DOCDIR%%
 %%DOCS%%%%RUBY_DOCDIR%%/COPYING
 %%DOCS%%%%RUBY_DOCDIR%%/COPYING.ja
+%%DOCS%%%%RUBY_DOCDIR%%/ChangeLog/ChangeLog
 %%DOCS%%%%RUBY_DOCDIR%%/ChangeLog/ChangeLog-0.06_to_0.52
 %%DOCS%%%%RUBY_DOCDIR%%/ChangeLog/ChangeLog-0.50_to_0.60
 %%DOCS%%%%RUBY_DOCDIR%%/ChangeLog/ChangeLog-0.60_to_1.1