Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/ocaml-gettext.git#ab4b47dc0def66aa6635af2ad70cc7dc3d8e827e
This commit is contained in:
DistroBaker 2021-03-11 19:54:18 +00:00
parent 456901594c
commit 742b4fabe3
4 changed files with 46 additions and 100 deletions

1
.gitignore vendored
View File

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

View File

@ -1,86 +0,0 @@
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,8 +1,15 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
# Optionally disable camomile dep on RHEL.
%if !0%{?rhel}
%bcond_without camomile
%else
%bcond_with camomile
%endif
Name: ocaml-gettext
Version: 0.4.1
Release: 7%{?dist}
Version: 0.4.2
Release: 2%{?dist}
Summary: OCaml library for i18n
License: LGPLv2+ with exceptions
@ -10,30 +17,29 @@ URL: https://github.com/gildor478/ocaml-gettext
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: make
BuildRequires: make
BuildRequires: ocaml >= 4.00.1
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
BuildRequires: ocaml-compiler-libs
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-fileutils-devel >= 0.4.4-4
BuildRequires: ocaml-dune-devel
BuildRequires: ocaml-cppo
BuildRequires: docbook-style-xsl
BuildRequires: libxslt
BuildRequires: libxml2
BuildRequires: chrpath
BuildRequires: autoconf
%if !0%{?rhel} || 0%{?rhel} >= 9
%if !0%{?rhel}
BuildRequires: ocaml-ounit-devel
%endif
%if %{with camomile}
BuildRequires: ocaml-camomile-devel >= 0.8.6-3
BuildRequires: ocaml-camomile-data
%endif
BuildRequires: autoconf, automake
%if !0%{?rhel} || 0%{?rhel} >= 9
%if %{with camomile}
# ocaml-gettext program needs camomile data files
Requires: ocaml-camomile-data
%endif
@ -67,7 +73,7 @@ The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%if !0%{?rhel} || 0%{?rhel} >= 9
%if %{with camomile}
%package camomile
Summary: Parts of %{name} which depend on Camomile
Requires: %{name} = %{version}-%{release}
@ -99,6 +105,13 @@ signature files for developing applications that use
sed -i -e 's/batteries//' test/dune
sed -i -e 's/batteries//' test/test-stub/dune
%if %{without camomile}
# Remove dependency on camomile.
rm -r src/lib/gettext-camomile
rm -r test/test-camomile
sed -i -e 's/camomile//' `find -name dune`
%endif
%build
make build
@ -117,13 +130,18 @@ dune install --destdir=$RPM_BUILD_ROOT
# Remove this, we will use our own rules for documentation.
rm -rf $RPM_BUILD_ROOT/usr/doc
%if %{without camomile}
# If you use --without camomile but happen to have the camomile
# packages installed then it will still build them.
rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml/gettext-camomile
%endif
%files
%doc LICENSE.txt
%{_libdir}/ocaml/gettext
%{_libdir}/ocaml/gettext-stub
%if %opt
%exclude %{_libdir}/ocaml/gettext/*.a
%exclude %{_libdir}/ocaml/gettext/*.cmxa
%exclude %{_libdir}/ocaml/gettext/*/*.a
%exclude %{_libdir}/ocaml/gettext/*/*.cmxa
@ -142,7 +160,6 @@ rm -rf $RPM_BUILD_ROOT/usr/doc
%doc README.md CHANGES.md THANKS TODO.md
# %doc build/share/doc/html/*
%if %opt
%{_libdir}/ocaml/gettext/*.a
%{_libdir}/ocaml/gettext/*.cmxa
%{_libdir}/ocaml/gettext/*/*.a
%{_libdir}/ocaml/gettext/*/*.cmxa
@ -161,7 +178,7 @@ rm -rf $RPM_BUILD_ROOT/usr/doc
%{_mandir}/man5/ocaml-gettext.5*
%if !0%{?rhel} || 0%{?rhel} >= 9
%if %{with camomile}
%files camomile
%doc LICENSE.txt
%{_libdir}/ocaml/gettext-camomile
@ -185,6 +202,20 @@ rm -rf $RPM_BUILD_ROOT/usr/doc
%changelog
* Mon Mar 8 23:22:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-2
- Better handling of optional camomile subpackage.
* Tue Mar 2 23:22:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-1
- New upstream version 4.2
- Remove patch now upstream.
- BR ocaml-cppo
* Mon Mar 1 23:22:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-9
- OCaml 4.12.0 build
* Wed Feb 24 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-8
- Remove ocaml-camomile dep on RHEL 9.
* Mon Feb 1 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-7
- Bump and rebuild for updated ocaml-camomile.

View File

@ -1 +1 @@
SHA512 (v0.4.1.tar.gz) = 52a48cdd00e16dcf3c191d400930e88c144c119eb730bfa825ad269f9a6785d5833f13cb32da3de544a12bfff104da78adec27a8172425f4b8fce6d05821ec31
SHA512 (v0.4.2.tar.gz) = fb89be8d8d9e0ed9327b81a0c81c884ff3f1a97e46b475ef8084abded5c84a256de05d5aa0f42be94f43ab438276a4506af726b6950e4161359a9616fb5832ec