New upstream version 0.4.1.

Add small fix for OCaml 4.11.
This commit is contained in:
Richard W.M. Jones 2020-04-22 10:20:06 +01:00
parent 342bdb083f
commit 983af03722
4 changed files with 108 additions and 12 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ ocaml-gettext-0.3.3.tar.gz
/ocaml-gettext-0.3.5.tar.gz
/0.3.7.tar.gz
/ocaml-gettext-0.3.8-3aecf8e5350f.tar.gz
/v0.4.1.tar.gz

View File

@ -0,0 +1,86 @@
From 4bd5f21dd6b033bf8c0f1f9549255629325b86eb Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 22 Apr 2020 10:17:03 +0100
Subject: [PATCH] xgettext: Ignore extra Loc.t parameter of Pconst_string.
---
src/bin/ocaml-xgettext/xgettext.ml | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/bin/ocaml-xgettext/xgettext.ml b/src/bin/ocaml-xgettext/xgettext.ml
index 3b42ac1..92ab016 100644
--- a/src/bin/ocaml-xgettext/xgettext.ml
+++ b/src/bin/ocaml-xgettext/xgettext.ml
@@ -121,7 +121,7 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
| Pexp_apply
( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
:: _ )
when is_like lid [ "s_"; "f_" ] ->
(* Add a singular / default domain string *)
@@ -129,9 +129,9 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
| Pexp_apply
( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (plural, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (plural, _, _)); _ } )
:: _ )
when is_like lid [ "sn_"; "fn_" ] ->
(* Add a plural / default domain string *)
@@ -140,7 +140,7 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
_
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
:: _ )
when is_like lid [ "gettext"; "fgettext" ] ->
(* Add a singular / default domain string *)
@@ -149,9 +149,9 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
_
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (domain, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (domain, _, _)); _ } )
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ }
+ { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ }
)
:: _ )
when is_like lid [ "dgettext"; "fdgettext"; "dcgettext"; "fdcgettext" ] ->
@@ -161,9 +161,9 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
_
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ } )
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (plural, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (plural, _, _)); _ } )
:: _ )
when is_like lid [ "ngettext"; "fngettext" ] ->
(* Add a plural / default domain string *)
@@ -172,12 +172,12 @@ let visit_expr (iterator : Ast_iterator.iterator) expr =
( { pexp_desc = Pexp_ident { Asttypes.txt = lid; _ }; _ },
_
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (domain, _)); _ } )
+ { pexp_desc = Pexp_constant (Pconst_string (domain, _, _)); _ } )
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (singular, _)); _ }
+ { pexp_desc = Pexp_constant (Pconst_string (singular, _, _)); _ }
)
:: ( Asttypes.Nolabel,
- { pexp_desc = Pexp_constant (Pconst_string (plural, _)); _ }
+ { pexp_desc = Pexp_constant (Pconst_string (plural, _, _)); _ }
)
:: _ )
when is_like lid [ "dngettext"; "fdngettext"; "dcngettext"; "fdcngettext" ]
--
2.24.1

View File

@ -1,17 +1,18 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
Name: ocaml-gettext
Version: 0.3.8
Release: 0.7.git3aecf8e5350f%{?dist}
Version: 0.4.1
Release: 1%{?dist}
Summary: OCaml library for i18n
License: LGPLv2+ with exceptions
URL: https://github.com/gildor478/ocaml-gettext
#Source0: https://github.com/gildor478/%{name}/archive/%{version}.tar.gz
# Temporarily using a preview of 0.3.8 built from git:
# git archive --format=tar --prefix=ocaml-gettext-0.3.8/ 3aecf8e5350f | gzip > ocaml-gettext-0.3.8-3aecf8e5350f.tar.gz
Source0: ocaml-gettext-0.3.8-3aecf8e5350f.tar.gz
Source0: https://github.com/gildor478/%{name}/archive/v%{version}.tar.gz
# https://github.com/gildor478/ocaml-gettext/issues/8
# Pconst_string added extra Loc.t parameter which we must ignore.
Patch1: 0001-xgettext-Ignore-extra-Loc.t-parameter-of-Pconst_stri.patch
BuildRequires: ocaml >= 4.00.1
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
@ -90,8 +91,8 @@ signature files for developing applications that use
%prep
%setup -q
#autopatch -p1
%setup -q -n %{name}-%{version}
%autopatch -p1
# Remove dependency on batteries.
sed -i -e 's/batteries//' test/dune
@ -117,7 +118,7 @@ rm -rf $RPM_BUILD_ROOT/usr/doc
%files
%doc COPYING
%doc LICENSE.txt
%{_libdir}/ocaml/gettext
%{_libdir}/ocaml/gettext-stub
%if %opt
@ -137,7 +138,7 @@ rm -rf $RPM_BUILD_ROOT/usr/doc
%files devel
%doc README.md CHANGELOG THANKS TODO.md
%doc README.md CHANGES.md THANKS TODO.md
# %doc build/share/doc/html/*
%if %opt
%{_libdir}/ocaml/gettext/*.a
@ -154,11 +155,14 @@ rm -rf $RPM_BUILD_ROOT/usr/doc
%{_libdir}/ocaml/gettext-stub/*.ml
%{_bindir}/ocaml-gettext
%{_bindir}/ocaml-xgettext
%{_mandir}/man1/ocaml-gettext.1*
%{_mandir}/man1/ocaml-xgettext.1*
%{_mandir}/man5/ocaml-gettext.5*
%if !0%{?rhel}
%files camomile
%doc COPYING
%doc LICENSE.txt
%{_libdir}/ocaml/gettext-camomile
%if %opt
%exclude %{_libdir}/ocaml/gettext-camomile/*.a
@ -180,6 +184,11 @@ rm -rf $RPM_BUILD_ROOT/usr/doc
%changelog
* Wed Apr 22 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-1
- New upstream version 0.4.1.
- Add small fix for OCaml 4.11.
- Package the man pages.
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.7.git3aecf8e5350f
- OCaml 4.11.0 pre-release attempt 2

View File

@ -1 +1 @@
SHA512 (ocaml-gettext-0.3.8-3aecf8e5350f.tar.gz) = f35f6e7a1cef84eb24f3c5ec03c8d0646dcc1151cd1182f5448b181aa765d653042eebcef148fef59643dbb38f3349b393a17d824ee74f106f537f1314fc9550
SHA512 (v0.4.1.tar.gz) = 52a48cdd00e16dcf3c191d400930e88c144c119eb730bfa825ad269f9a6785d5833f13cb32da3de544a12bfff104da78adec27a8172425f4b8fce6d05821ec31