git: b845623d2f25 - main - databases/arrow: Avoid failures in the R extension build

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 13 Apr 2024 00:17:32 UTC
The branch main has been updated by yuri:

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

commit b845623d2f252dbc44068191bdfaf70f8123da26
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-04-13 00:06:34 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-04-13 00:17:25 +0000

    databases/arrow: Avoid failures in the R extension build
    
    ... by adjusting "true" and "false" values in lib/cmake/Arrow/ArrowOptions.cmake
    to "ON" and "OFF".
    
    Reported by:    Bryce Mecum <brycemecum@gmail.com>
---
 databases/arrow/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/databases/arrow/Makefile b/databases/arrow/Makefile
index d4545fe4dd76..72d6ebf2c4a7 100644
--- a/databases/arrow/Makefile
+++ b/databases/arrow/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	arrow
 DISTVERSION=	15.0.2
+PORTREVISION=	1
 CATEGORIES=	databases
 MASTER_SITES=	APACHE/${PORTNAME}/${PORTNAME}-${DISTVERSION} \
 		https://github.com/apache/orc/archive/rel/:orc
@@ -218,6 +219,13 @@ PLIST_FILES+=	lib/cmake/Arrow/Findutf8proc.cmake
     PLIST_SUB+=	TESTINGFLIGHT="@comment "
 .endif
 
+post-install:
+	# based on the user's report on 2024-04-12, the R extension expects only "ON" and "OFF" values in lib/cmake/Arrow/ArrowOptions.cmake
+	# other values confuse the R extension build, so we adjust these values to "ON" and "OFF" as a workaround
+	${REINPLACE_CMD} -i '' \
+		-e 's|"true"|"ON"|; s|"false"|"OFF"|' \
+		${STAGEDIR}${PREFIX}/lib/cmake/Arrow/ArrowOptions.cmake
+
 do-test: # tests fail to compile: https://issues.apache.org/jira/browse/ARROW-12625
 	@cd ${BUILD_WRKSRC} && \
 		${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DARROW_BUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \