git: 3a57a3175c1a - main - databases/mongodb70: Fix build with python-3.11

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

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

commit 3a57a3175c1ac40d83d27aa6bafb7fbd8ee01a40
Author:     Wen Heping <wen@FreeBSD.org>
AuthorDate: 2024-02-20 09:19:38 +0000
Commit:     Wen Heping <wen@FreeBSD.org>
CommitDate: 2024-02-20 09:21:43 +0000

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

diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile
index d9f1b806b361..df98a51d859e 100644
--- a/databases/mongodb70/Makefile
+++ b/databases/mongodb70/Makefile
@@ -122,6 +122,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