commit:     9c693c54fef278c374c2fefd72ab616ec0d81f19
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  6 15:56:27 2026 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Fri Feb  6 15:57:46 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c693c54

dev-ml/ocaml-gettext: Patch to fix building against OCaml 5.4

Closes: https://bugs.gentoo.org/966263
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../ocaml-gettext/files/ocaml-gettext-ocaml-5.4.patch  | 18 ++++++++++++++++++
 dev-ml/ocaml-gettext/ocaml-gettext-0.4.2.1.ebuild      |  6 +++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/dev-ml/ocaml-gettext/files/ocaml-gettext-ocaml-5.4.patch 
b/dev-ml/ocaml-gettext/files/ocaml-gettext-ocaml-5.4.patch
new file mode 100644
index 000000000000..7a7c806b0d76
--- /dev/null
+++ b/dev-ml/ocaml-gettext/files/ocaml-gettext-ocaml-5.4.patch
@@ -0,0 +1,18 @@
+From 5d521981e39dcaeada6bbe7b15c5432d6de5d33c Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <[email protected]>
+Date: Wed, 15 Oct 2025 09:24:18 +0100
+Subject: [PATCH] xgettext: Fix type for OCaml 5.4
+
+Fixes: https://github.com/gildor478/ocaml-gettext/issues/40
+Signed-off-by: Richard W.M. Jones <[email protected]>
+--- a/src/bin/ocaml-xgettext/xgettext.ml
++++ b/src/bin/ocaml-xgettext/xgettext.ml
+@@ -112,7 +112,7 @@ let rec is_like lid = function
+   | [] -> false
+   | func :: functions -> (
+       match lid with
+-      | (Lident f | Ldot (_, f)) when f = func -> true
++      | (Lident f | Ldot (_, {txt = f; _})) when f = func -> true
+       | _ -> is_like lid functions )
+ 
+ let visit_expr (iterator : Ast_iterator.iterator) expr =

diff --git a/dev-ml/ocaml-gettext/ocaml-gettext-0.4.2.1.ebuild 
b/dev-ml/ocaml-gettext/ocaml-gettext-0.4.2.1.ebuild
index f5b6abfb19d4..869d68580071 100644
--- a/dev-ml/ocaml-gettext/ocaml-gettext-0.4.2.1.ebuild
+++ b/dev-ml/ocaml-gettext/ocaml-gettext-0.4.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -32,6 +32,10 @@ BDEPEND="
        test? ( dev-ml/ounit2[ocamlopt=] )
 "
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-ocaml-5.4.patch
+)
+
 src_compile() {
        dune-compile ${DUNE_PKG_NAME}
 }

Reply via email to