git: 427cb03fab5d - main - databases/mongodb60: Fix build with python-3.11

From: Wen Heping <wen_at_FreeBSD.org>
Date: Tue, 20 Feb 2024 11:30:02 UTC
The branch main has been updated by wen:

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

commit 427cb03fab5df35a86bdacf4bb8438b9ab4ed346
Author:     Wen Heping <wen@FreeBSD.org>
AuthorDate: 2024-02-20 11:27:47 +0000
Commit:     Wen Heping <wen@FreeBSD.org>
CommitDate: 2024-02-20 11:29:14 +0000

    databases/mongodb60: Fix build with python-3.11
    
    PR:             275494
    Approved by:    portmgr(blanket, fix build)
---
 databases/mongodb60/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/databases/mongodb60/Makefile b/databases/mongodb60/Makefile
index 53f4194e2ac0..69720bb329f5 100644
--- a/databases/mongodb60/Makefile
+++ b/databases/mongodb60/Makefile
@@ -117,6 +117,12 @@ post-patch:
 	${RM} -rf ${WRKSRC}/src/third_party/zlib-*
 	${RM} -rf ${WRKSRC}/src/third_party/zstandard
 
+# fix build with python-3.11
+	${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/util.py
+	${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/preprocessor.py
+	${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/backend/base.py
+	${REINPLACE_CMD} -e 's#rU#r#g' ${WRKDIR}/spidermonkey-${MOZJS_TAG}/python/mozbuild/mozbuild/action/process_define_files.py
+
 do-configure:
 # Replacement of ${WRKSRC}/src/third_party/mozjs/get-sources.sh
 	${LN} -sF ${WRKDIR}/spidermonkey-${MOZJS_TAG} ${WRKSRC}/src/third_party/mozjs/mozilla-release