File e827b7ab392e5cf48dd620537952bff43fbcbdf0.patch of Package ocaml-gettext

From e827b7ab392e5cf48dd620537952bff43fbcbdf0 Mon Sep 17 00:00:00 2001
From: Antonio Nuno Monteiro <anmonteiro@gmail.com>
Date: Sun, 24 Nov 2024 15:45:11 -0800
Subject: [PATCH] 5.3 support

---
 src/bin/ocaml-xgettext/xgettext.ml | 44 ++++++++++++++++++++++--------
 1 file changed, 33 insertions(+), 11 deletions(-)

diff --git a/src/bin/ocaml-xgettext/xgettext.ml b/src/bin/ocaml-xgettext/xgettext.ml
index e79a3b3..358828e 100644
--- a/src/bin/ocaml-xgettext/xgettext.ml
+++ b/src/bin/ocaml-xgettext/xgettext.ml
@@ -121,7 +121,9 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
   | Pexp_apply
       ( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
         ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+          { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (singular, _, _)); _ }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
           { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
 #else
           { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
@@ -133,13 +135,17 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
   | Pexp_apply
       ( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
         ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+          { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (singular, _, _)); _ }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
           { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
 #else
           { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
 #endif
         :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+             { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (plural, _, _)); _ }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
              { pexp_desc = Pexp_constant (Pconst_string (plural, _, _)); _ } )
 #else
              { pexp_desc = Pexp_constant (Pconst_string (plural, _)); _ } )
@@ -152,7 +158,9 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
       ( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
         _
         :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+             { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (singular, _, _)); _ }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
              { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
 #else
              { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
@@ -165,13 +173,17 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
       ( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
         _
         :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+             { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (domain, _, _)); _ }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
              { pexp_desc = Pexp_constant (Pconst_string (domain, _, _)); _ } )
 #else
              { pexp_desc = Pexp_constant (Pconst_string (domain, _)); _ } )
 #endif
            :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+                { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (singular, _, _)); _ }; _ }
+#elif OCAML_VERSION >= (4, 11, 0)
                 { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ }
 #else
                 { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ }
@@ -185,13 +197,17 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
       ( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
         _
         :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+             { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (singular, _, _)); _ }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
              { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
 #else
              { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
 #endif
            :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+                { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (plural, _, _)); _ }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
                 { pexp_desc = Pexp_constant (Pconst_string (plural, _, _)); _ } )
 #else
                 { pexp_desc = Pexp_constant (Pconst_string (plural, _)); _ } )
@@ -204,20 +220,26 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
       ( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
         _
         :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+             { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (domain, _, _)) }; _ } )
+#elif OCAML_VERSION >= (4, 11, 0)
              { pexp_desc = Pexp_constant (Pconst_string (domain, _, _)); _ } )
 #else
              { pexp_desc = Pexp_constant (Pconst_string (domain, _)); _ } )
 #endif
            :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+                { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (singular, _, _)); _ }; _ }
+#elif OCAML_VERSION >= (4, 11, 0)
                 { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ }
 #else
                 { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ }
 #endif
               )
               :: ( Asttypes.Nolabel,
-#if OCAML_VERSION >= (4, 11, 0)
+#if OCAML_VERSION >= (5, 3, 0)
+                   { pexp_desc = Pexp_constant { pconst_desc = (Pconst_string (plural, _, _)); _ }; _ }
+#elif OCAML_VERSION >= (4, 11, 0)
                    { pexp_desc = Pexp_constant (Pconst_string (plural, _, _)); _ }
 #else
                    { pexp_desc = Pexp_constant (Pconst_string (plural, _)); _ }
openSUSE Build Service is sponsored by