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@gentoo.org>
This commit is contained in:
James Le Cuirot
2026-02-06 15:56:27 +00:00
parent d937516b41
commit 9c693c54fe
2 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
From 5d521981e39dcaeada6bbe7b15c5432d6de5d33c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
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 <rjones@redhat.com>
--- 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 =

View File

@@ -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}
}