From 638fbe8df7e542277bb2af936084492dbf549843 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 14 Oct 2025 09:34:32 +0100 Subject: [PATCH 1/3] OCaml 5.4.0 rebuild --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 8ed0878..abea8c2 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.5.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -158,6 +158,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Tue Oct 14 2025 Richard W.M. Jones - 0.5.0-7 +- OCaml 5.4.0 rebuild + * Fri Aug 22 2025 Jerry James - 0.5.0-6 - Rebuild for ocaml-dune 3.20.0 From ae93d1cd1a57ccf8e9b1d96c49d698d8656132f4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 15 Oct 2025 09:27:18 +0100 Subject: [PATCH 2/3] Add downstream patch to fix build for OCaml 5.4 --- 0001-xgettext-Fix-type-for-OCaml-5.4.patch | 27 ++++++++++++++++++++++ ocaml-gettext.spec | 5 ++++ 2 files changed, 32 insertions(+) create mode 100644 0001-xgettext-Fix-type-for-OCaml-5.4.patch diff --git a/0001-xgettext-Fix-type-for-OCaml-5.4.patch b/0001-xgettext-Fix-type-for-OCaml-5.4.patch new file mode 100644 index 0000000..dd3f5ee --- /dev/null +++ b/0001-xgettext-Fix-type-for-OCaml-5.4.patch @@ -0,0 +1,27 @@ +From 5d521981e39dcaeada6bbe7b15c5432d6de5d33c Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +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 +--- + src/bin/ocaml-xgettext/xgettext.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bin/ocaml-xgettext/xgettext.ml b/src/bin/ocaml-xgettext/xgettext.ml +index 8f54efc..aa12aed 100644 +--- 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 = +-- +2.50.1 + diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index abea8c2..eb49ebf 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -26,6 +26,11 @@ Source0: %{url}/archive/v%{version}.tar.gz # https://github.com/gildor478/ocaml-gettext/pull/37 Patch: https://github.com/gildor478/ocaml-gettext/pull/37.patch +# Fix for OCaml >= 5.4 +# https://github.com/gildor478/ocaml-gettext/issues/40 +# https://github.com/gildor478/ocaml-gettext/pull/41 +Patch: 0001-xgettext-Fix-type-for-OCaml-5.4.patch + BuildRequires: ocaml >= 4.03.0 BuildRequires: ocaml-fileutils-devel >= 0.6.6-1 BuildRequires: ocaml-dune >= 1.11.0 From 9d4fef37f2e4e6a2a2d3a98a4f47124c1cce0c37 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 13 Jan 2026 17:00:39 -0700 Subject: [PATCH 3/3] Fix a changelog entry --- ocaml-gettext.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index eb49ebf..5a2eca2 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -172,7 +172,7 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel * Thu Jul 24 2025 Fedora Release Engineering - 0.5.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Sat Jul 12 2025 Jerry James - 0.5.0-4 +* Sat Jul 12 2025 Jerry James - 0.5.0-4 - Rebuild to fix OCaml dependencies * Thu Apr 03 2025 Richard W.M. Jones - 0.5.0-3