commit:     ed5e62dc5b29676bd8ca014aa91a9b88bbb07d5e
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 13 16:56:53 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Sep 13 16:57:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5e62dc

dev-util/coccinelle: fix build with stdcompat-21

Closes: https://bugs.gentoo.org/962208
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-util/coccinelle/coccinelle-1.3.0.ebuild        |  1 +
 .../files/coccinelle-1.3.0-stdcompat.patch         | 30 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/dev-util/coccinelle/coccinelle-1.3.0.ebuild 
b/dev-util/coccinelle/coccinelle-1.3.0.ebuild
index 6d6314613e3c..f9aa7c486cce 100644
--- a/dev-util/coccinelle/coccinelle-1.3.0.ebuild
+++ b/dev-util/coccinelle/coccinelle-1.3.0.ebuild
@@ -51,6 +51,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-find-xxdate.patch
        "${FILESDIR}"/${PN}-1.1.1-shuffle.patch
        "${FILESDIR}"/${P}-python-3.13.patch
+       "${FILESDIR}"/${P}-stdcompat.patch
 )
 SITEFILE=50coccinelle-gentoo.el
 

diff --git a/dev-util/coccinelle/files/coccinelle-1.3.0-stdcompat.patch 
b/dev-util/coccinelle/files/coccinelle-1.3.0-stdcompat.patch
new file mode 100644
index 000000000000..843ff5e6f81a
--- /dev/null
+++ b/dev-util/coccinelle/files/coccinelle-1.3.0-stdcompat.patch
@@ -0,0 +1,30 @@
+From 84eb33ca2a2dde1ad4903e4d5ca6ac1732554e60 Mon Sep 17 00:00:00 2001
+From: Seb Hinderer <[email protected]>
+Date: Thu, 7 Aug 2025 17:38:52 +0200
+Subject: [PATCH] Stop including stdcompat.h
+
+Starting with stdcompat 21.0 this file is no longer provided.
+
+The only reason why it was included was to provide access to the
+`caml_alloc_initialized_string` primitive which is actually exported
+by caml/alloc.h.
+
+It has been verified that this was already the case in OCaml 4.11,
+which is the oldest version of the OCaml compiler pyml will now be supporting.
+---
+ pyml_stubs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pyml_stubs.c b/pyml_stubs.c
+index 40e3481..204e601 100644
+--- a/bundles/pyml/pyml-current/pyml_stubs.c
++++ b/bundles/pyml/pyml-current/pyml_stubs.c
+@@ -11,7 +11,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <stdcompat.h>
++#include <caml/alloc.h>
+ #include <assert.h>
+ #include "pyml_stubs.h"
+ 

Reply via email to