git: e1a7c49e51c3 - main - lang/ruby27: Fix orphaned .timestamp in bdbe2a2f4098f4d21495f314cf4d571efdb4f08f

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 30 Dec 2022 09:18:47 UTC
The branch main has been updated by sunpoet:

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

commit e1a7c49e51c3c0658dc044047d108e28acc8d27f
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-12-30 08:55:15 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-12-30 09:06:32 +0000

    lang/ruby27: Fix orphaned .timestamp in bdbe2a2f4098f4d21495f314cf4d571efdb4f08f
    
    When both CAPIDOCS and DOCS options are enabled, the following commands are executed:
    1. post-install-CAPIDOCS-on: removed the installed .timestamp (in STAGEDIR).
    2. post-install-DOCS-on: copied the generated .timestamp (in capi directory) to the STAGEDIR again.
    Therefore, the installed .timestamp is orphaned.
    To fix this, we remove both the generated and installed .timestamp in post-install-CAPIDOCS-on:.
    
    PR:             267775
    Reported by:    yasu
---
 lang/ruby27/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lang/ruby27/Makefile b/lang/ruby27/Makefile
index cb6e5734c7a6..1326301338a5 100644
--- a/lang/ruby27/Makefile
+++ b/lang/ruby27/Makefile
@@ -186,7 +186,7 @@ post-install:
 .endif
 
 post-install-CAPIDOCS-on:
-	${RM} ${STAGEDIR}${PREFIX}/share/doc/ruby${RUBY_SUFFIX}/capi/.timestamp
+	${RM} ${WRKSRC}/doc/capi/.timestamp ${STAGEDIR}${PREFIX}/share/doc/ruby${RUBY_SUFFIX}/capi/.timestamp
 	cd ${STAGEDIR}${PREFIX} && ${FIND} share/doc/ruby${RUBY_SUFFIX}/capi/ -type f >> ${TMPPLIST}
 
 post-install-DEBUG-off:
@@ -207,7 +207,7 @@ post-install-DOCS-on:
 	${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
 		${STAGEDIR}${RUBY_DOCDIR}/${FILE:C|^([^/]+)/.*|\1|}/
 .endfor
-	@(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/ "! -name .timestamp")
+	@(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/)
 	${INSTALL_DATA} ${WRKSRC}/COPYING*	\
 			${WRKSRC}/ChangeLog	\
 			${WRKSRC}/LEGAL		\