git: 75d142325120 - main - devel/ocaml-ipaddr: force unsafe strings to prepare for modern OCaml

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Mon, 11 Apr 2022 10:09:25 UTC
The branch main has been updated by danfe:

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

commit 75d142325120d386d372e408a36c0d2ec48da6d2
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-04-11 10:08:54 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-04-11 10:08:54 +0000

    devel/ocaml-ipaddr: force unsafe strings to prepare for modern OCaml
    
    While here, perform configure step in the ${CONFIGURE_WRKSRC} (style
    issue, but canonical).
---
 devel/ocaml-ipaddr/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/devel/ocaml-ipaddr/Makefile b/devel/ocaml-ipaddr/Makefile
index 12c4e54b4e7d..2165d829fd58 100644
--- a/devel/ocaml-ipaddr/Makefile
+++ b/devel/ocaml-ipaddr/Makefile
@@ -24,7 +24,12 @@ USE_OCAML_CAMLP4=	yes
 USE_OCAMLFIND_PLIST=	yes
 USE_OCAML_LDCONFIG=	yes
 
+post-patch:
+	@${REINPLACE_CMD} -e '/^SETUP =/s,ocaml,& -unsafe-string,' \
+		${WRKSRC}/Makefile
+
 do-configure:
-	cd ${WRKSRC}; ocaml setup.ml -configure ${CONFIGURE_ARGS}
+	cd ${CONFIGURE_WRKSRC} && ocaml -unsafe-string setup.ml \
+		-configure ${CONFIGURE_ARGS}
 
 .include <bsd.port.mk>