git: 3ff8f3d88f3d - main - science/py-openbabel: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 07 Aug 2023 15:25:19 UTC
The branch main has been updated by bofh:

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

commit 3ff8f3d88f3dcc6272d8335270888334aa1c6e5d
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-07 13:48:03 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-07 15:24:44 +0000

    science/py-openbabel: Fix build with llvm16
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 science/py-openbabel/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/science/py-openbabel/Makefile b/science/py-openbabel/Makefile
index a6353eee68e7..d4fe048259f5 100644
--- a/science/py-openbabel/Makefile
+++ b/science/py-openbabel/Makefile
@@ -18,6 +18,14 @@ USE_PYTHON=	distutils autoplist
 
 BINARY_ALIAS=	python=${PYTHON_CMD}
 
+.include <bsd.port.options.mk>
+
+post-patch:
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+	@${REINPLACE_CMD} -e 's|binary_function|__binary_function|g' \
+		${WRKSRC}/openbabel/openbabel-python.i
+.endif
+
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/openbabel/_openbabel${PYTHON_EXT_SUFFIX}.so