Compare commits

..

No commits in common. 'c9' and 'cs10' have entirely different histories.
c9 ... cs10

@ -0,0 +1,11 @@
--- ocaml-gettext-0.4.2/src/lib/gettext-camomile/gettextCamomile.ml.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/src/lib/gettext-camomile/gettextCamomile.ml 2023-06-22 13:41:46.930127479 -0600
@@ -20,7 +20,7 @@
(* USA *)
(**************************************************************************)
-open CamomileLibraryDefault.Camomile
+open Camomile
open GettextTypes
(** Error reported when something goes wrong during Camomile initialization.

@ -0,0 +1,13 @@
--- ocaml-gettext-0.4.2/test/test.ml.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/test/test.ml 2024-05-07 19:56:55.742155830 -0600
@@ -278,8 +278,8 @@ let install_test =
( "test7.mo",
MoInvalidHeaderTableTranslationOutOfBound
((28l, 2626l), (-49l, 111l)) );
- ("test8.mo", MoInvalidStringOutOfBound (2626, 36));
- ("test9.mo", MoInvalidTranslationOutOfBound (2626, 196));
+ ("test8.mo", MoCannotOpenFile ("testdata/test8.mo"));
+ ("test9.mo", MoCannotOpenFile ("testdata/test9.mo"));
]
@ List.map install_warning_test_one
[

@ -0,0 +1,152 @@
--- ocaml-gettext-0.4.2/gettext-camomile.opam.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/gettext-camomile.opam 2023-06-22 13:31:24.299464751 -0600
@@ -19,9 +19,8 @@ depends: [
"ocaml" {>= "4.03.0"}
"dune" {>= "1.11.0"}
"camomile"
- "base-bytes"
"gettext" {= version}
- "ounit" {with-test & > "2.0.8"}
+ "ounit2" {with-test & > "2.2.6"}
"fileutils" {with-test}
]
synopsis: "Internationalization library using camomile (i18n)"
--- ocaml-gettext-0.4.2/gettext.opam.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/gettext.opam 2023-06-22 13:30:52.810938219 -0600
@@ -20,8 +20,7 @@ depends: [
"dune" {>= "1.11.0"}
"cppo" {build}
"fileutils"
- "base-bytes"
- "ounit" {with-test & > "2.0.8"}
+ "ounit2" {with-test & > "2.2.6"}
]
synopsis: "Internationalization library (i18n)"
description:"""
--- ocaml-gettext-0.4.2/gettext-stub.opam.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/gettext-stub.opam 2023-06-22 13:32:14.938703327 -0600
@@ -19,9 +19,8 @@ depends: [
"ocaml" {>= "4.03.0"}
"dune" {>= "1.11.0"}
"dune-configurator"
- "base-bytes"
"gettext" {= version}
- "ounit" {with-test & > "2.0.8"}
+ "ounit2" {with-test & > "2.2.6"}
"fileutils" {with-test}
]
depexts: [
--- ocaml-gettext-0.4.2/src/lib/gettext-stub/gettextStubCompat_stubs.c.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/src/lib/gettext-stub/gettextStubCompat_stubs.c 2023-06-22 13:33:17.080769220 -0600
@@ -76,7 +76,7 @@ CAMLprim value gettextStubCompat_gettext
value v_msgid)
{
CAMLparam1(v_msgid);
- CAMLreturn(copy_string(gettext(String_val(v_msgid))));
+ CAMLreturn(caml_copy_string(gettext(String_val(v_msgid))));
}
CAMLprim value gettextStubCompat_dgettext(
@@ -85,7 +85,7 @@ CAMLprim value gettextStubCompat_dgettex
{
CAMLparam2(v_domainname, v_msgid);
CAMLreturn(
- copy_string(
+ caml_copy_string(
dgettext(
String_val(v_domainname),
String_val(v_msgid))));
@@ -98,7 +98,7 @@ CAMLprim value gettextStubCompat_dcgette
{
CAMLparam3(v_domainname, v_msgid, v_category);
CAMLreturn(
- copy_string(
+ caml_copy_string(
dcgettext(
String_val(v_domainname),
String_val(v_msgid),
@@ -112,7 +112,7 @@ CAMLprim value gettextStubCompat_ngettex
{
CAMLparam3(v_msgid1, v_msgid2, v_n);
CAMLreturn(
- copy_string(
+ caml_copy_string(
ngettext(
String_val(v_msgid1),
String_val(v_msgid2),
@@ -127,7 +127,7 @@ CAMLprim value gettextStubCompat_dngette
{
CAMLparam4(v_domainname, v_msgid1, v_msgid2, v_n);
CAMLreturn(
- copy_string(
+ caml_copy_string(
dngettext(
String_val(v_domainname),
String_val(v_msgid1),
@@ -158,7 +158,7 @@ CAMLprim value gettextStubCompat_dcngett
"NULL string not expected at "STRINGIFY(__LINE__)" in "__FILE__);
};
- CAMLreturn(copy_string(res));
+ CAMLreturn(caml_copy_string(res));
}
CAMLprim value gettextStubCompat_textdomain(
--- ocaml-gettext-0.4.2/test/common/dune.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/test/common/dune 2023-06-22 13:33:50.049275086 -0600
@@ -1,3 +1,3 @@
(library
(name common)
- (libraries gettext.base oUnit))
+ (libraries gettext.base ounit2))
--- ocaml-gettext-0.4.2/test/dune.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/test/dune 2023-06-22 13:34:09.487983748 -0600
@@ -6,7 +6,7 @@
../src/bin/ocaml-xgettext/xgettext.exe
(glob_files testdata/*)
(glob_files testdata/fr_FR/LC_MESSAGES/*))
- (libraries oUnit str fileutils gettext.extension common)
+ (libraries ounit2 str fileutils gettext.extension common)
(action
(run %{test}
-runner sequential
--- ocaml-gettext-0.4.2/test/test-camomile/dune.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/test/test-camomile/dune 2023-06-22 13:34:24.840753623 -0600
@@ -4,6 +4,6 @@
(deps
(glob_files testdata/*)
(glob_files ../testdata/fr_FR/LC_MESSAGES/*))
- (libraries common gettext-camomile oUnit fileutils)
+ (libraries common gettext-camomile ounit2 fileutils)
(action
(run %{test} -test-dir ../testdata)))
--- ocaml-gettext-0.4.2/test/test.ml.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/test/test.ml 2023-06-22 13:35:08.719095972 -0600
@@ -221,7 +221,7 @@ let install_test =
Printf.sprintf "%s warning" fl_mo >:: fun ctxt ->
let tests = make_tests ctxt in
let out = Buffer.create 13 in
- let capture_out strm = Stream.iter (Buffer.add_char out) strm in
+ let capture_out strm = Seq.iter (Buffer.add_char out) strm in
let fl_mo = concat tests.test_dir fl_mo in
let fl_dst = make_filename (tests.install_dir :: fl_dsts) in
assert_command
@@ -392,7 +392,7 @@ let compile_ocaml =
[]
in
let out = Buffer.create 13 in
- let capture_out strm = Stream.iter (Buffer.add_char out) strm in
+ let capture_out strm = Seq.iter (Buffer.add_char out) strm in
let match_exp_err = Str.regexp (".*"^(Str.quote exp_err)^".*") in
assert_command
~exit_code:(Unix.WEXITED exp_return_code)
--- ocaml-gettext-0.4.2/test/test-stub/dune.orig 2020-06-11 14:40:42.000000000 -0600
+++ ocaml-gettext-0.4.2/test/test-stub/dune 2023-06-22 13:34:43.239477852 -0600
@@ -4,6 +4,6 @@
(deps
(glob_files ../testdata/*)
(glob_files ../testdata/fr_FR/LC_MESSAGES/*))
- (libraries common gettext-stub oUnit)
+ (libraries common gettext-stub ounit2)
(action
(run %{test} -test-dir ../testdata)))

@ -1,52 +1,55 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) # OCaml packages not built on i686 since OCaml 5 / Fedora 39.
ExcludeArch: %{ix86}
# Optionally disable camomile dep on RHEL. # Optionally disable camomile dep on RHEL.
%if !0%{?rhel} %if !0%{?rhel}
%bcond_without camomile %bcond_without camomile
%bcond_without tests
%else %else
%bcond_with camomile %bcond_with camomile
%bcond_with tests
%endif %endif
Name: ocaml-gettext Name: ocaml-gettext
Version: 0.4.2 Version: 0.4.2
Release: 6%{?dist} Release: 23%{?dist}
Summary: OCaml library for i18n Summary: OCaml library for i18n
License: LGPLv2+ with exceptions License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception
URL: https://github.com/gildor478/ocaml-gettext URL: https://github.com/gildor478/ocaml-gettext
Source0: https://github.com/gildor478/%{name}/archive/v%{version}.tar.gz Source0: https://github.com/gildor478/%{name}/archive/v%{version}.tar.gz
BuildRequires: make # Updates for OCaml 5. Based in part on
BuildRequires: ocaml >= 4.00.1 # https://github.com/gildor478/ocaml-gettext/pull/24
BuildRequires: ocaml-findlib-devel >= 1.3.3-3 Patch0: %{name}-ocaml5.patch
BuildRequires: ocaml-compiler-libs # Adapt to changes in camomile 2.0
BuildRequires: ocaml-ocamldoc # https://github.com/gildor478/ocaml-gettext/pull/27
Patch1: %{name}-camomile2.patch
# Two tests that are supposed to fail raise different errors under OCaml 5.2.0
Patch2: %{name}-ocaml5.2.patch
BuildRequires: ocaml >= 4.03.0
BuildRequires: ocaml-fileutils-devel >= 0.4.4-4 BuildRequires: ocaml-fileutils-devel >= 0.4.4-4
BuildRequires: ocaml-dune-devel BuildRequires: ocaml-dune >= 1.11.0
BuildRequires: ocaml-dune-configurator-devel
BuildRequires: ocaml-cppo BuildRequires: ocaml-cppo
BuildRequires: docbook-style-xsl BuildRequires: docbook-style-xsl
BuildRequires: libxslt BuildRequires: libxslt
BuildRequires: libxml2 BuildRequires: libxml2
BuildRequires: chrpath %if %{with tests}
BuildRequires: autoconf
%if !0%{?rhel}
BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-ounit-devel
%endif %endif
%if %{with camomile} %if %{with camomile}
BuildRequires: ocaml-camomile-devel >= 0.8.6-3 BuildRequires: ocaml-camomile-devel >= 0.8.6-3
BuildRequires: ocaml-camomile-data BuildRequires: ocaml-camomile-data
%endif %endif
BuildRequires: autoconf, automake
%if %{with camomile} %if %{with camomile}
# ocaml-gettext program needs camomile data files # ocaml-gettext program needs camomile data files
Requires: ocaml-camomile-data Requires: ocaml-camomile-data
%endif %endif
%global __ocaml_requires_opts -i Asttypes -i Parsetree
%global __ocaml_provides_opts -i Pr_gettext
%description %description
Ocaml-gettext provides support for internationalization of Ocaml Ocaml-gettext provides support for internationalization of Ocaml
@ -62,10 +65,10 @@ Constraints :
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
# BZ 446919. # BZ 446919.
Requires: ocaml-fileutils-devel >= 0.4.0 Requires: ocaml-fileutils-devel%{?_isa} >= 0.4.0
%description devel %description devel
@ -76,7 +79,7 @@ developing applications that use %{name}.
%if %{with camomile} %if %{with camomile}
%package camomile %package camomile
Summary: Parts of %{name} which depend on Camomile Summary: Parts of %{name} which depend on Camomile
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description camomile %description camomile
@ -86,8 +89,9 @@ depend on Camomile.
%package camomile-devel %package camomile-devel
Summary: Development files for %{name}-camomile Summary: Development files for %{name}-camomile
Requires: %{name}-devel = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: %{name}-camomile = %{version}-%{release} Requires: %{name}-camomile%{?_isa} = %{version}-%{release}
Requires: ocaml-camomile-devel%{?_isa}
%description camomile-devel %description camomile-devel
@ -98,15 +102,11 @@ signature files for developing applications that use
%prep %prep
%setup -q -n %{name}-%{version} %autosetup -p1
%autopatch -p1
# Remove dependency on batteries.
sed -i -e 's/batteries//' test/dune
sed -i -e 's/batteries//' test/test-stub/dune
%if %{without camomile} %if %{without camomile}
# Remove dependency on camomile. # Remove dependency on camomile.
rm -f gettext-camomile.opam
rm -r src/lib/gettext-camomile rm -r src/lib/gettext-camomile
rm -r test/test-camomile rm -r test/test-camomile
sed -i -e 's/camomile//' `find -name dune` sed -i -e 's/camomile//' `find -name dune`
@ -114,63 +114,28 @@ sed -i -e 's/camomile//' `find -name dune`
%build %build
make build %dune_build
#check
# Tests require batteries, so they are disabled at present.
# Under discussion with upstream.
%install %install
mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml %dune_install -s
mkdir -p $RPM_BUILD_ROOT%{_bindir} sed -i '\@%{_bindir}@d;\@%{_mandir}@d' .ofiles-gettext
dune install --destdir=$RPM_BUILD_ROOT cat .ofiles-gettext-stub >> .ofiles-gettext
cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel
# Remove this, we will use our own rules for documentation.
rm -rf $RPM_BUILD_ROOT/usr/doc
%if %{without camomile} %if %{with tests}
# If you use --without camomile but happen to have the camomile %check
# packages installed then it will still build them. %dune_check
rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml/gettext-camomile
%endif %endif
%files %files -f .ofiles-gettext
%doc LICENSE.txt %license LICENSE.txt
%{_libdir}/ocaml/gettext
%{_libdir}/ocaml/gettext-stub
%if %opt
%exclude %{_libdir}/ocaml/gettext/*.cmxa
%exclude %{_libdir}/ocaml/gettext/*/*.a
%exclude %{_libdir}/ocaml/gettext/*/*.cmxa
%exclude %{_libdir}/ocaml/gettext/*/*.cmx
%exclude %{_libdir}/ocaml/gettext-stub/*.a
%exclude %{_libdir}/ocaml/gettext-stub/*.cmxa
%exclude %{_libdir}/ocaml/gettext-stub/*.cmx
%endif
%exclude %{_libdir}/ocaml/gettext/*/*.ml
%exclude %{_libdir}/ocaml/gettext/*/*.mli
%exclude %{_libdir}/ocaml/gettext-stub/*.ml
%{_libdir}/ocaml/stublibs/*.so
%files devel %files devel -f .ofiles-gettext-devel
%doc README.md CHANGES.md THANKS TODO.md %doc README.md CHANGES.md THANKS TODO.md
# %doc build/share/doc/html/*
%if %opt
%{_libdir}/ocaml/gettext/*.cmxa
%{_libdir}/ocaml/gettext/*/*.a
%{_libdir}/ocaml/gettext/*/*.cmxa
%{_libdir}/ocaml/gettext/*/*.cmx
%{_libdir}/ocaml/gettext-stub/*.a
%{_libdir}/ocaml/gettext-stub/*.cmxa
%{_libdir}/ocaml/gettext-stub/*.cmx
%endif
%{_libdir}/ocaml/gettext/*/*.ml
%{_libdir}/ocaml/gettext/*/*.mli
%{_libdir}/ocaml/gettext-stub/*.ml
%{_bindir}/ocaml-gettext %{_bindir}/ocaml-gettext
%{_bindir}/ocaml-xgettext %{_bindir}/ocaml-xgettext
%{_mandir}/man1/ocaml-gettext.1* %{_mandir}/man1/ocaml-gettext.1*
@ -179,43 +144,85 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml/gettext-camomile
%if %{with camomile} %if %{with camomile}
%files camomile %files camomile -f .ofiles-gettext-camomile
%doc LICENSE.txt %license LICENSE.txt
%{_libdir}/ocaml/gettext-camomile
%if %opt
%exclude %{_libdir}/ocaml/gettext-camomile/*.a
%exclude %{_libdir}/ocaml/gettext-camomile/*.cmxa
%exclude %{_libdir}/ocaml/gettext-camomile/*.cmx
%endif
%exclude %{_libdir}/ocaml/gettext-camomile/*.mli
%files camomile-devel %files camomile-devel -f .ofiles-gettext-camomile-devel
%doc README.md %doc README.md
%if %opt
%{_libdir}/ocaml/gettext-camomile/*.a
%{_libdir}/ocaml/gettext-camomile/*.cmxa
%{_libdir}/ocaml/gettext-camomile/*.cmx
%endif
%{_libdir}/ocaml/gettext-camomile/*.mli
%endif %endif
%changelog %changelog
* Fri Mar 11 2022 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-6 * Thu Oct 31 2024 Troy Dawson <tdawson@redhat.com> - 0.4.2-23
- Rebuild for EPEL - Bump release for October 2024 mass rebuild:
resolves: rhbz#2060850 Resolves: RHEL-64018
* Tue Jun 25 2024 Troy Dawson <tdawson@redhat.com> - 0.4.2-22
- Bump release for June 2024 mass rebuild
* Wed Jun 19 2024 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-21
- OCaml 5.2.0 ppc64le fix
* Wed May 29 2024 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-20
- OCaml 5.2.0 for Fedora 41
* Wed May 8 2024 Jerry James <loganjerry@gmail.com> - 0.4.2-19
- Add patch to fix tests with OCaml 5.2.0
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Dec 18 2023 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-17
- OCaml 5.1.1 + s390x code gen fix for Fedora 40
* Tue Dec 12 2023 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-16
- OCaml 5.1.1 rebuild for Fedora 40
* Thu Oct 05 2023 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-15
- OCaml 5.1 rebuild for Fedora 40
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-13
- OCaml 5.0 rebuild for Fedora 39
* Mon Jul 10 2023 Jerry James <loganjerry@gmail.com> - 0.4.2-12
- OCaml 5.0.0 rebuild
- Convert License tag to SPDX
- Enable tests
- Use new dune macros
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-11
- Rebuild OCaml packages for F38
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Jun 19 2022 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-8
- OCaml 4.14.0 rebuild
* Fri Feb 04 2022 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-7
- OCaml 4.13.1 rebuild to remove package notes
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.4.2-5 * Tue Oct 05 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - OCaml 4.13.1 build
Related: rhbz#1991688
* Wed Jun 23 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-4 * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-4
- Bump and rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
resolves: rhbz#1975309
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.4.2-3 * Tue Mar 30 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Bump and rebuild for ELN.
* Mon Mar 8 23:22:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-2 * 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. - Better handling of optional camomile subpackage.

Loading…
Cancel
Save