From 0644491c2fd837f949f8f84b060bd322ed07b446 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 22:08:50 +0000 Subject: [PATCH 01/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 8b0f0e6..f254a12 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -10,7 +10,7 @@ Name: ocaml-gettext Version: 0.4.2 -Release: 9%{?dist} +Release: 10%{?dist} Summary: OCaml library for i18n License: LGPLv2+ with exceptions @@ -203,6 +203,9 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml/gettext-camomile %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 0.4.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jul 22 2022 Fedora Release Engineering - 0.4.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From dbaf614c0e98be32e884bbf032925cb15a8e41c7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jan 2023 17:53:58 +0000 Subject: [PATCH 02/30] Rebuild OCaml packages for F38 --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index f254a12..595810d 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -10,7 +10,7 @@ Name: ocaml-gettext Version: 0.4.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: OCaml library for i18n License: LGPLv2+ with exceptions @@ -203,6 +203,9 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml/gettext-camomile %changelog +* Tue Jan 24 2023 Richard W.M. Jones - 0.4.2-11 +- Rebuild OCaml packages for F38 + * Thu Jan 19 2023 Fedora Release Engineering - 0.4.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 6e43115a41efe6e039ce4b6064edbdc8300b433d Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 10 Jul 2023 22:27:54 -0600 Subject: [PATCH 03/30] OCaml 5.0.0 rebuild Other changes: - Convert License tag to SPDX - Enable tests - Use new dune macros --- ocaml-gettext-camomile2.patch | 11 +++ ocaml-gettext-ocaml5.patch | 152 ++++++++++++++++++++++++++++++++++ ocaml-gettext.spec | 132 +++++++++-------------------- 3 files changed, 202 insertions(+), 93 deletions(-) create mode 100644 ocaml-gettext-camomile2.patch create mode 100644 ocaml-gettext-ocaml5.patch diff --git a/ocaml-gettext-camomile2.patch b/ocaml-gettext-camomile2.patch new file mode 100644 index 0000000..a5ffd39 --- /dev/null +++ b/ocaml-gettext-camomile2.patch @@ -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. diff --git a/ocaml-gettext-ocaml5.patch b/ocaml-gettext-ocaml5.patch new file mode 100644 index 0000000..cbdf21b --- /dev/null +++ b/ocaml-gettext-ocaml5.patch @@ -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))) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 595810d..79be2a3 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -1,6 +1,3 @@ -%undefine _package_note_flags -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) - # Optionally disable camomile dep on RHEL. %if !0%{?rhel} %bcond_without camomile @@ -10,27 +7,28 @@ Name: ocaml-gettext Version: 0.4.2 -Release: 11%{?dist} +Release: 12%{?dist} 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 Source0: https://github.com/gildor478/%{name}/archive/v%{version}.tar.gz -BuildRequires: make -BuildRequires: ocaml >= 4.00.1 -BuildRequires: ocaml-findlib-devel >= 1.3.3-3 -BuildRequires: ocaml-compiler-libs -BuildRequires: ocaml-ocamldoc +# Updates for OCaml 5. Based in part on +# https://github.com/gildor478/ocaml-gettext/pull/24 +Patch0: %{name}-ocaml5.patch +# Adapt to changes in camomile 2.0 +Patch1: %{name}-camomile2.patch + +BuildRequires: ocaml >= 4.03.0 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: docbook-style-xsl BuildRequires: libxslt BuildRequires: libxml2 -BuildRequires: chrpath -BuildRequires: autoconf %if !0%{?rhel} BuildRequires: ocaml-ounit-devel %endif @@ -38,16 +36,12 @@ BuildRequires: ocaml-ounit-devel BuildRequires: ocaml-camomile-devel >= 0.8.6-3 BuildRequires: ocaml-camomile-data %endif -BuildRequires: autoconf, automake %if %{with camomile} # ocaml-gettext program needs camomile data files Requires: ocaml-camomile-data %endif -%global __ocaml_requires_opts -i Asttypes -i Parsetree -%global __ocaml_provides_opts -i Pr_gettext - %description Ocaml-gettext provides support for internationalization of Ocaml @@ -63,10 +57,10 @@ Constraints : %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} # BZ 446919. -Requires: ocaml-fileutils-devel >= 0.4.0 +Requires: ocaml-fileutils-devel%{?_isa} >= 0.4.0 %description devel @@ -77,7 +71,7 @@ developing applications that use %{name}. %if %{with camomile} %package camomile Summary: Parts of %{name} which depend on Camomile -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description camomile @@ -87,8 +81,9 @@ depend on Camomile. %package camomile-devel Summary: Development files for %{name}-camomile -Requires: %{name}-devel = %{version}-%{release} -Requires: %{name}-camomile = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-camomile%{?_isa} = %{version}-%{release} +Requires: ocaml-camomile-devel%{?_isa} %description camomile-devel @@ -99,12 +94,7 @@ signature files for developing applications that use %prep -%setup -q -n %{name}-%{version} -%autopatch -p1 - -# Remove dependency on batteries. -sed -i -e 's/batteries//' test/dune -sed -i -e 's/batteries//' test/test-stub/dune +%autosetup -p1 %if %{without camomile} # Remove dependency on camomile. @@ -115,63 +105,26 @@ sed -i -e 's/camomile//' `find -name dune` %build -make build - - -#check -# Tests require batteries, so they are disabled at present. -# Under discussion with upstream. +%dune_build %install -mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml -mkdir -p $RPM_BUILD_ROOT%{_bindir} -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 +%dune_install -s +sed -i '\@%{_bindir}@d;\@%{_mandir}@d' .ofiles-gettext +cat .ofiles-gettext-stub >> .ofiles-gettext +cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel -%files -%doc 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 +%check +%dune_check -%files devel +%files -f .ofiles-gettext +%license LICENSE.txt + + +%files devel -f .ofiles-gettext-devel %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-xgettext %{_mandir}/man1/ocaml-gettext.1* @@ -180,29 +133,22 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml/gettext-camomile %if %{with camomile} -%files camomile -%doc 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 -f .ofiles-gettext-camomile +%license LICENSE.txt -%files camomile-devel +%files camomile-devel -f .ofiles-gettext-camomile-devel %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 %changelog +* Mon Jul 10 2023 Jerry James - 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 - 0.4.2-11 - Rebuild OCaml packages for F38 From ae0d99908986442c9514b27a9edbb2b8c06b2bac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Jul 2023 11:36:23 +0100 Subject: [PATCH 04/30] ExcludeArch i686 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SPML7CUBSZNI36NLXGVHEG7DNHU3EWOJ/) --- ocaml-gettext.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 79be2a3..5bcee86 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -1,3 +1,6 @@ +# OCaml packages not built on i686 since OCaml 5 / Fedora 39. +ExcludeArch: %{ix86} + # Optionally disable camomile dep on RHEL. %if !0%{?rhel} %bcond_without camomile From 03b60fb0d3f74dd5cd4566b99cbf51fa14330b4f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 00:27:15 +0100 Subject: [PATCH 05/30] OCaml 5.0 rebuild for Fedora 39 --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 5bcee86..555ebb7 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -10,7 +10,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 12%{?dist} +Release: 13%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -146,6 +146,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Tue Jul 11 2023 Richard W.M. Jones - 0.4.2-13 +- OCaml 5.0 rebuild for Fedora 39 + * Mon Jul 10 2023 Jerry James - 0.4.2-12 - OCaml 5.0.0 rebuild - Convert License tag to SPDX From 99c808b007577741baddf807d35cdbd61fa468ca Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 13 Jul 2023 23:26:11 -0400 Subject: [PATCH 06/30] Fix ELN build * When ounit2 is not present, %check must be skipped. Use a bcond to keep these in sync. * Remove the camomile OPAM file to prevent findlib from creating gettext-camomile META files (even though the package is not built). --- ocaml-gettext.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 555ebb7..8740fa1 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -4,8 +4,10 @@ ExcludeArch: %{ix86} # Optionally disable camomile dep on RHEL. %if !0%{?rhel} %bcond_without camomile +%bcond_without tests %else %bcond_with camomile +%bcond_with tests %endif Name: ocaml-gettext @@ -32,7 +34,7 @@ BuildRequires: ocaml-cppo BuildRequires: docbook-style-xsl BuildRequires: libxslt BuildRequires: libxml2 -%if !0%{?rhel} +%if %{with tests} BuildRequires: ocaml-ounit-devel %endif %if %{with camomile} @@ -101,6 +103,7 @@ signature files for developing applications that use %if %{without camomile} # Remove dependency on camomile. +rm -f gettext-camomile.opam rm -r src/lib/gettext-camomile rm -r test/test-camomile sed -i -e 's/camomile//' `find -name dune` @@ -118,8 +121,10 @@ cat .ofiles-gettext-stub >> .ofiles-gettext cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel +%if %{with tests} %check %dune_check +%endif %files -f .ofiles-gettext From c95600ebb20323c74250379b6f950474e3393336 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 17:18:13 +0000 Subject: [PATCH 07/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 8740fa1..d8b5b60 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 13%{?dist} +Release: 14%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -151,6 +151,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 0.4.2-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 Richard W.M. Jones - 0.4.2-13 - OCaml 5.0 rebuild for Fedora 39 From 48d8469dad67b582f3a180c204d357efafa17813 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 4 Oct 2023 23:09:07 -0600 Subject: [PATCH 08/30] Add PR URL for Patch1 --- ocaml-gettext.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index d8b5b60..d13ac48 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -24,6 +24,7 @@ Source0: https://github.com/gildor478/%{name}/archive/v%{version}.tar.gz # https://github.com/gildor478/ocaml-gettext/pull/24 Patch0: %{name}-ocaml5.patch # Adapt to changes in camomile 2.0 +# https://github.com/gildor478/ocaml-gettext/pull/27 Patch1: %{name}-camomile2.patch BuildRequires: ocaml >= 4.03.0 From cd788feb5b1f11b27e8fdcd12d8bf83e583b5426 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 5 Oct 2023 16:13:04 +0100 Subject: [PATCH 09/30] OCaml 5.1 rebuild for Fedora 40 --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index d13ac48..d3aaaad 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 14%{?dist} +Release: 15%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -152,6 +152,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Thu Oct 05 2023 Richard W.M. Jones - 0.4.2-15 +- OCaml 5.1 rebuild for Fedora 40 + * Thu Jul 20 2023 Fedora Release Engineering - 0.4.2-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 3dac2eccaa78848306249c4e1511e08200460719 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Dec 2023 15:00:38 +0000 Subject: [PATCH 10/30] OCaml 5.1.1 rebuild for Fedora 40 --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index d3aaaad..7519ef1 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 15%{?dist} +Release: 16%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -152,6 +152,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Tue Dec 12 2023 Richard W.M. Jones - 0.4.2-16 +- OCaml 5.1.1 rebuild for Fedora 40 + * Thu Oct 05 2023 Richard W.M. Jones - 0.4.2-15 - OCaml 5.1 rebuild for Fedora 40 From c1c705234975a171a50a7ed9782e106cbb80add9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Dec 2023 15:20:07 +0000 Subject: [PATCH 11/30] OCaml 5.1.1 + s390x code gen fix for Fedora 40 --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 7519ef1..ea9eec0 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 16%{?dist} +Release: 17%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -152,6 +152,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Mon Dec 18 2023 Richard W.M. Jones - 0.4.2-17 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + * Tue Dec 12 2023 Richard W.M. Jones - 0.4.2-16 - OCaml 5.1.1 rebuild for Fedora 40 From 90824c17cb6450c5997f2792648f818b230158f1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 10:16:52 +0000 Subject: [PATCH 12/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index ea9eec0..f933ba2 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 17%{?dist} +Release: 18%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -152,6 +152,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 0.4.2-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Dec 18 2023 Richard W.M. Jones - 0.4.2-17 - OCaml 5.1.1 + s390x code gen fix for Fedora 40 From 9090b3d6bd38b7a592fc8f72976d6277c878148b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 10:00:32 +0000 Subject: [PATCH 13/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index f933ba2..10db8ef 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 18%{?dist} +Release: 19%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -152,6 +152,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 0.4.2-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 0.4.2-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 3ab8c86605bbc6b845ab0f9de465c455649beaab Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 23 May 2024 12:05:28 -0600 Subject: [PATCH 14/30] Add patch to fix tests with OCaml 5.2.0 --- ocaml-gettext-ocaml5.2.patch | 13 +++++++++++++ ocaml-gettext.spec | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 ocaml-gettext-ocaml5.2.patch diff --git a/ocaml-gettext-ocaml5.2.patch b/ocaml-gettext-ocaml5.2.patch new file mode 100644 index 0000000..4695709 --- /dev/null +++ b/ocaml-gettext-ocaml5.2.patch @@ -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 + [ diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 10db8ef..3689b29 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -26,6 +26,8 @@ Patch0: %{name}-ocaml5.patch # Adapt to changes in camomile 2.0 # 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 @@ -152,6 +154,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Wed May 8 2024 Jerry James - 0.4.2-19 +- Add patch to fix tests with OCaml 5.2.0 + * Thu Jan 25 2024 Fedora Release Engineering - 0.4.2-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 82503be5b6d3280f51753333207793c4ca788c18 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 29 May 2024 22:20:26 +0100 Subject: [PATCH 15/30] OCaml 5.2.0 for Fedora 41 --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 3689b29..8e19fa2 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 19%{?dist} +Release: 20%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -154,6 +154,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Wed May 29 2024 Richard W.M. Jones - 0.4.2-20 +- OCaml 5.2.0 for Fedora 41 + * Wed May 8 2024 Jerry James - 0.4.2-19 - Add patch to fix tests with OCaml 5.2.0 From be0afda1af6deb925bc96105c79bd1d4f9ee38f5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Jun 2024 09:26:45 +0100 Subject: [PATCH 16/30] Add RHEL gating test --- gating.yaml | 6 ++++++ tests/basic-test.sh | 19 +++++++++++++++++++ tests/tests.yml | 13 +++++++++++++ 3 files changed, 38 insertions(+) create mode 100755 gating.yaml create mode 100755 tests/basic-test.sh create mode 100755 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100755 index 0000000..2c7ed80 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-* +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..8fdac2a --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,19 @@ +#!/bin/bash - +set -e +set -x + +# Compile trivial gettext program. +cat < gettexttest.ml +module Gettext = Gettext.Program ( + struct + let textdomain = "test" + let codeset = None + let dir = None + let dependencies = [] + end +) (GettextStub.Native) ;; +open Gettext ;; +print_endline (s_ "Hello world") +EOF +ocamlfind ocamlopt -package gettext,gettext-stub gettexttest.ml -linkpkg -o gettexttest +./gettexttest diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100755 index 0000000..eea186d --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - ocaml + - ocaml-findlib + - ocaml-gettext-devel + tests: + - simple: + dir: . + run: ./basic-test.sh From b27432ddc92f7c977ea06a7f00b6f2843dff1a2c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Jun 2024 16:46:34 +0100 Subject: [PATCH 17/30] OCaml 5.2.0 ppc64le fix --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 8e19fa2..673593d 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 20%{?dist} +Release: 21%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -154,6 +154,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Wed Jun 19 2024 Richard W.M. Jones - 0.4.2-21 +- OCaml 5.2.0 ppc64le fix + * Wed May 29 2024 Richard W.M. Jones - 0.4.2-20 - OCaml 5.2.0 for Fedora 41 From 33098a872fe441406c86eced28d598d69eecd036 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 20:07:37 +0000 Subject: [PATCH 18/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 673593d..21dafa7 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 21%{?dist} +Release: 22%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -154,6 +154,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 0.4.2-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jun 19 2024 Richard W.M. Jones - 0.4.2-21 - OCaml 5.2.0 ppc64le fix From b21859a1f1dd0c3544113c1c65df77056c5bf3d4 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 10 Jan 2025 09:06:43 -0700 Subject: [PATCH 19/30] OCaml 5.3.0 rebuild for Fedora 42 - Add patch for OCaml 5.3 support --- ocaml-gettext-ocaml5.3.patch | 114 +++++++++++++++++++++++++++++++++++ ocaml-gettext.spec | 11 +++- 2 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 ocaml-gettext-ocaml5.3.patch diff --git a/ocaml-gettext-ocaml5.3.patch b/ocaml-gettext-ocaml5.3.patch new file mode 100644 index 0000000..bf39466 --- /dev/null +++ b/ocaml-gettext-ocaml5.3.patch @@ -0,0 +1,114 @@ +--- ocaml-gettext-0.4.2/src/bin/ocaml-xgettext/xgettext.ml.orig 2020-06-11 14:40:42.000000000 -0600 ++++ ocaml-gettext-0.4.2/src/bin/ocaml-xgettext/xgettext.ml 2024-12-14 14:41:51.238374359 -0700 +@@ -121,7 +121,9 @@ let visit_expr (iterator : Ast_iterator. + | 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. + | 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. + ( { 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. + ( { 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. + ( { 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. + ( { 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, _)); _ } diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 21dafa7..026c0da 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,13 +12,14 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 22%{?dist} +Release: 23%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception URL: https://github.com/gildor478/ocaml-gettext +VCS: git:%{url}.git -Source0: https://github.com/gildor478/%{name}/archive/v%{version}.tar.gz +Source0: %{url}/archive/v%{version}.tar.gz # Updates for OCaml 5. Based in part on # https://github.com/gildor478/ocaml-gettext/pull/24 @@ -28,6 +29,9 @@ Patch0: %{name}-ocaml5.patch Patch1: %{name}-camomile2.patch # Two tests that are supposed to fail raise different errors under OCaml 5.2.0 Patch2: %{name}-ocaml5.2.patch +# Updates for OCaml 5.3 +# https://github.com/gildor478/ocaml-gettext/pull/29 +Patch3: %{name}-ocaml5.3.patch BuildRequires: ocaml >= 4.03.0 BuildRequires: ocaml-fileutils-devel >= 0.4.4-4 @@ -154,6 +158,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Fri Jan 10 2025 Jerry James - 0.4.2-23 +- OCaml 5.3.0 rebuild for Fedora 42 + * Thu Jul 18 2024 Fedora Release Engineering - 0.4.2-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 96d8727610b3c589cef1f16a5c83080a7b811398 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 20:50:27 +0000 Subject: [PATCH 20/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 026c0da..add99d3 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.4.2 -Release: 23%{?dist} +Release: 24%{?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 +* Fri Jan 17 2025 Fedora Release Engineering - 0.4.2-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jan 10 2025 Jerry James - 0.4.2-23 - OCaml 5.3.0 rebuild for Fedora 42 From d38306b47872aa99ef1e1652330ddeb962368a1b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 26 Feb 2025 13:57:08 +0000 Subject: [PATCH 21/30] New version 0.5.0 --- .gitignore | 1 + ocaml-gettext-camomile2.patch | 11 --- ocaml-gettext-ocaml5.2.patch | 13 --- ocaml-gettext-ocaml5.3.patch | 114 ------------------------- ocaml-gettext-ocaml5.patch | 152 ---------------------------------- ocaml-gettext.spec | 35 ++++---- sources | 2 +- 7 files changed, 19 insertions(+), 309 deletions(-) delete mode 100644 ocaml-gettext-camomile2.patch delete mode 100644 ocaml-gettext-ocaml5.2.patch delete mode 100644 ocaml-gettext-ocaml5.3.patch delete mode 100644 ocaml-gettext-ocaml5.patch diff --git a/.gitignore b/.gitignore index 9bcf330..8fe92f1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ ocaml-gettext-0.3.3.tar.gz /ocaml-gettext-0.3.8-3aecf8e5350f.tar.gz /v0.4.1.tar.gz /v0.4.2.tar.gz +/v0.5.0.tar.gz diff --git a/ocaml-gettext-camomile2.patch b/ocaml-gettext-camomile2.patch deleted file mode 100644 index a5ffd39..0000000 --- a/ocaml-gettext-camomile2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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. diff --git a/ocaml-gettext-ocaml5.2.patch b/ocaml-gettext-ocaml5.2.patch deleted file mode 100644 index 4695709..0000000 --- a/ocaml-gettext-ocaml5.2.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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 - [ diff --git a/ocaml-gettext-ocaml5.3.patch b/ocaml-gettext-ocaml5.3.patch deleted file mode 100644 index bf39466..0000000 --- a/ocaml-gettext-ocaml5.3.patch +++ /dev/null @@ -1,114 +0,0 @@ ---- ocaml-gettext-0.4.2/src/bin/ocaml-xgettext/xgettext.ml.orig 2020-06-11 14:40:42.000000000 -0600 -+++ ocaml-gettext-0.4.2/src/bin/ocaml-xgettext/xgettext.ml 2024-12-14 14:41:51.238374359 -0700 -@@ -121,7 +121,9 @@ let visit_expr (iterator : Ast_iterator. - | 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. - | 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. - ( { 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. - ( { 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. - ( { 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. - ( { 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, _)); _ } diff --git a/ocaml-gettext-ocaml5.patch b/ocaml-gettext-ocaml5.patch deleted file mode 100644 index cbdf21b..0000000 --- a/ocaml-gettext-ocaml5.patch +++ /dev/null @@ -1,152 +0,0 @@ ---- 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))) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index add99d3..5a3279c 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -11,8 +11,8 @@ ExcludeArch: %{ix86} %endif Name: ocaml-gettext -Version: 0.4.2 -Release: 24%{?dist} +Version: 0.5.0 +Release: 1%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -21,23 +21,16 @@ VCS: git:%{url}.git Source0: %{url}/archive/v%{version}.tar.gz -# Updates for OCaml 5. Based in part on -# https://github.com/gildor478/ocaml-gettext/pull/24 -Patch0: %{name}-ocaml5.patch -# Adapt to changes in camomile 2.0 -# 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 -# Updates for OCaml 5.3 -# https://github.com/gildor478/ocaml-gettext/pull/29 -Patch3: %{name}-ocaml5.3.patch - BuildRequires: ocaml >= 4.03.0 -BuildRequires: ocaml-fileutils-devel >= 0.4.4-4 +BuildRequires: ocaml-fileutils-devel >= 0.6.6-1 BuildRequires: ocaml-dune >= 1.11.0 BuildRequires: ocaml-dune-configurator-devel +BuildRequires: ocaml-dune-site-devel BuildRequires: ocaml-cppo +# This was orphaned and dropped from Fedora back in 2023, but may be +# needed to run the tests. +# https://github.com/gildor478/ocaml-gettext/issues/35 +#BuildRequires: ocaml-seq-devel BuildRequires: docbook-style-xsl BuildRequires: libxslt BuildRequires: libxml2 @@ -70,9 +63,7 @@ Constraints : %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} - -# BZ 446919. -Requires: ocaml-fileutils-devel%{?_isa} >= 0.4.0 +Requires: ocaml-fileutils-devel%{?_isa} >= 0.6.6 %description devel @@ -108,6 +99,9 @@ signature files for developing applications that use %prep %autosetup -p1 +# Remove ocaml-seq dependency. See note above. +sed -i 's/ seq / /' test/dune + %if %{without camomile} # Remove dependency on camomile. rm -f gettext-camomile.opam @@ -158,6 +152,11 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Wed Feb 26 2025 Richard W.M. Jones - 0.5.0-1 +- New version 0.5.0 +- New dependency ocaml-dune-site-devel (copied from opam). +- Remove upstream patches. + * Fri Jan 17 2025 Fedora Release Engineering - 0.4.2-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 7317e8d..85cd65b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.4.2.tar.gz) = fb89be8d8d9e0ed9327b81a0c81c884ff3f1a97e46b475ef8084abded5c84a256de05d5aa0f42be94f43ab438276a4506af726b6950e4161359a9616fb5832ec +SHA512 (v0.5.0.tar.gz) = f55505bbe0da2a06053d94ee895a3e610a8d4ab5a2283ccff6a5a0c6a8ec011f5f286ab93e117cc340f55f056c7cdcb5752cc798e9d8e18fb5ab17f27f4a64c2 From a25aade80732fa7bf3c9aeccd25cad7dc65cd9a7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 Feb 2025 10:33:16 +0000 Subject: [PATCH 22/30] Add dependency from devel to ocaml-dune-site-devel. https://src.fedoraproject.org/rpms/ocaml-gettext/pull-request/3#comment-249424 --- ocaml-gettext.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 5a3279c..6c22be7 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -64,6 +64,7 @@ Constraints : Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: ocaml-fileutils-devel%{?_isa} >= 0.6.6 +Requires: ocaml-dune-site-devel%{?_isa} %description devel @@ -152,6 +153,10 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Thu Feb 27 2025 Richard W.M. Jones - 0.5.0-2 +- Add dependency from devel to ocaml-dune-site-devel. + https://src.fedoraproject.org/rpms/ocaml-gettext/pull-request/3#comment-249424 + * Wed Feb 26 2025 Richard W.M. Jones - 0.5.0-1 - New version 0.5.0 - New dependency ocaml-dune-site-devel (copied from opam). From dcbab4a42077edefba9c5ecd358b3d267d02cb02 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 3 Mar 2025 23:01:05 -0500 Subject: [PATCH 23/30] Fix build without camomile The top-level dune-project file now contains package-specific information, requiring camomile to be removed there as well. --- ocaml-gettext.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 6c22be7..776b239 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -109,6 +109,8 @@ rm -f gettext-camomile.opam rm -r src/lib/gettext-camomile rm -r test/test-camomile sed -i -e 's/camomile//' `find -name dune` +awk -i inplace -v RS='^\\(package' -v ORS= \ + '{while(sub(/\(package\n *\(name gettext-camomile\).*\)\)\)\)/,""));} {print}' dune-project %endif From b608fbccc457b0721fc267804db287e645cd81ac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Apr 2025 09:31:45 +0100 Subject: [PATCH 24/30] Remove use of dune-site --- 37.patch | 160 +++++++++++++++++++++++++++++++++++++++++++++ ocaml-gettext.spec | 12 +++- 2 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 37.patch diff --git a/37.patch b/37.patch new file mode 100644 index 0000000..2616f40 --- /dev/null +++ b/37.patch @@ -0,0 +1,160 @@ +From 5462396bee53cb13d8d6fde4c6d430412a17b64d Mon Sep 17 00:00:00 2001 +From: Stephane Glondu +Date: Thu, 3 Apr 2025 09:52:20 +0200 +Subject: [PATCH] Do not use dune sites + +Using dune-site forces use of dune in all reverse-dependencies: + + https://github.com/gildor478/ocaml-gettext/issues/36 + +The use here is to add an ocaml-gettext-specific directory to the +default MO search path. Remove this directory altogether. (This may +break reverse dependencies.) +--- + dune-project | 2 -- + gettext-camomile.opam | 2 -- + gettext-stub.opam | 2 -- + gettext.opam | 3 --- + src/lib/gettext/base/.keep-directory | 1 - + src/lib/gettext/base/dune | 13 +------------ + src/lib/gettext/base/gettextConfig.ml | 9 +-------- + 7 files changed, 2 insertions(+), 30 deletions(-) + delete mode 100644 src/lib/gettext/base/.keep-directory + +diff --git a/dune-project b/dune-project +index 2ee85d7..ef2b58e 100644 +--- a/dune-project ++++ b/dune-project +@@ -2,7 +2,6 @@ + (name gettext) + + (explicit_js_mode) +-(using dune_site 0.1) + (generate_opam_files) + + (source (github gildor478/ocaml-gettext)) +@@ -25,7 +24,6 @@ + "\| + ) + (depends +- dune-site + (ocaml (>= "4.14.0")) + (cppo (and (>= 1.8.0) :build)) + (seq (and (>= "base") :with-test)) +diff --git a/gettext-camomile.opam b/gettext-camomile.opam +index 1fde721..05c96d1 100644 +--- a/gettext-camomile.opam ++++ b/gettext-camomile.opam +@@ -25,11 +25,9 @@ build: [ + name + "-j" + jobs +- "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +- ["dune" "install" "-p" name "--create-install-files" name] + ] + dev-repo: "git+https://github.com/gildor478/ocaml-gettext.git" +diff --git a/gettext-stub.opam b/gettext-stub.opam +index 2463a70..980a584 100644 +--- a/gettext-stub.opam ++++ b/gettext-stub.opam +@@ -24,12 +24,10 @@ build: [ + name + "-j" + jobs +- "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +- ["dune" "install" "-p" name "--create-install-files" name] + ] + dev-repo: "git+https://github.com/gildor478/ocaml-gettext.git" + depexts: [ +diff --git a/gettext.opam b/gettext.opam +index 50a0933..d2f6490 100644 +--- a/gettext.opam ++++ b/gettext.opam +@@ -19,7 +19,6 @@ doc: "https://gildor478.github.io/ocaml-gettext/" + bug-reports: "https://github.com/gildor478/ocaml-gettext/issues" + depends: [ + "dune" {>= "3.17"} +- "dune-site" + "ocaml" {>= "4.14.0"} + "cppo" {>= "1.8.0" & build} + "seq" {>= "base" & with-test} +@@ -36,11 +35,9 @@ build: [ + name + "-j" + jobs +- "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +- ["dune" "install" "-p" name "--create-install-files" name] + ] + dev-repo: "git+https://github.com/gildor478/ocaml-gettext.git" +diff --git a/src/lib/gettext/base/.keep-directory b/src/lib/gettext/base/.keep-directory +deleted file mode 100644 +index f1eab5f..0000000 +--- a/src/lib/gettext/base/.keep-directory ++++ /dev/null +@@ -1 +0,0 @@ +-# This directory contains MO files. +diff --git a/src/lib/gettext/base/dune b/src/lib/gettext/base/dune +index 2eae0c5..7b98bb7 100644 +--- a/src/lib/gettext/base/dune ++++ b/src/lib/gettext/base/dune +@@ -4,17 +4,6 @@ + (ocamlyacc + (modules gettextFormat_parser gettextMo_parser)) + +-(generate_sites_module +- (module gettextConfigDune) +- (sites gettext)) +- +-(install +- (package gettext) +- (section +- (site +- (gettext locale))) +- (files .keep-directory)) +- + (rule + (target gettextConfigGen.ml) + (action +@@ -33,4 +22,4 @@ + GettextMo_int32 + GettextMo_lexer + GettextMo_parser) +- (libraries dune-site fileutils)) ++ (libraries fileutils)) +diff --git a/src/lib/gettext/base/gettextConfig.ml b/src/lib/gettext/base/gettextConfig.ml +index 9d5d986..fe8963b 100644 +--- a/src/lib/gettext/base/gettextConfig.ml ++++ b/src/lib/gettext/base/gettextConfig.ml +@@ -23,19 +23,12 @@ + let default_dir = GettextConfigGen.default_localedir + + let default_path () = +- let dunepath = +- match GettextConfigDune.Sites.locale with +- | [ path ] -> [ path ] +- | [] -> [] +- | _ -> assert false +- in + let envpath = + match Sys.getenv "OCAML_LOCALEPATH" with + | s -> String.split_on_char ':' s + | exception Not_found -> [] + in +- envpath @ dunepath +- @ [ GettextConfigGen.localedir; GettextConfigGen.default_localedir ] ++ envpath @ [ GettextConfigGen.localedir; GettextConfigGen.default_localedir ] + + let default_codeset = "" + diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 776b239..a1ff51e 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.5.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: OCaml library for i18n License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception @@ -21,11 +21,15 @@ VCS: git:%{url}.git Source0: %{url}/archive/v%{version}.tar.gz +# Fix to stop using dune-site +# https://github.com/gildor478/ocaml-gettext/issues/36 +# https://github.com/gildor478/ocaml-gettext/pull/37 +Patch: https://github.com/gildor478/ocaml-gettext/pull/37.patch + BuildRequires: ocaml >= 4.03.0 BuildRequires: ocaml-fileutils-devel >= 0.6.6-1 BuildRequires: ocaml-dune >= 1.11.0 BuildRequires: ocaml-dune-configurator-devel -BuildRequires: ocaml-dune-site-devel BuildRequires: ocaml-cppo # This was orphaned and dropped from Fedora back in 2023, but may be # needed to run the tests. @@ -64,7 +68,6 @@ Constraints : Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: ocaml-fileutils-devel%{?_isa} >= 0.6.6 -Requires: ocaml-dune-site-devel%{?_isa} %description devel @@ -155,6 +158,9 @@ cat .ofiles-gettext-stub-devel >> .ofiles-gettext-devel %changelog +* Thu Apr 03 2025 Richard W.M. Jones - 0.5.0-3 +- Remove use of dune-site + * Thu Feb 27 2025 Richard W.M. Jones - 0.5.0-2 - Add dependency from devel to ocaml-dune-site-devel. https://src.fedoraproject.org/rpms/ocaml-gettext/pull-request/3#comment-249424 From 49fc534cfa6f1611b60ce325e4577a60bb1d2201 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 12 Jul 2025 14:33:40 -0600 Subject: [PATCH 25/30] Rebuild to fix OCaml dependencies --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index a1ff51e..99fa400 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.5.0 -Release: 3%{?dist} +Release: 4%{?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 +* 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 - Remove use of dune-site From 62dce5fde305043504ae54a3025dfd3189f98418 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 23:11:16 +0000 Subject: [PATCH 26/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 99fa400..75edf18 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.5.0 -Release: 4%{?dist} +Release: 5%{?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 +* 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 - Rebuild to fix OCaml dependencies From bb2c1fb3b9657fe4ae80607a010b280fe9490705 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 22 Aug 2025 10:25:10 -0600 Subject: [PATCH 27/30] Rebuild for ocaml-dune 3.20.0 --- ocaml-gettext.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec index 75edf18..8ed0878 100644 --- a/ocaml-gettext.spec +++ b/ocaml-gettext.spec @@ -12,7 +12,7 @@ ExcludeArch: %{ix86} Name: ocaml-gettext Version: 0.5.0 -Release: 5%{?dist} +Release: 6%{?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 +* Fri Aug 22 2025 Jerry James - 0.5.0-6 +- Rebuild for ocaml-dune 3.20.0 + * Thu Jul 24 2025 Fedora Release Engineering - 0.5.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 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 28/30] 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 29/30] 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 30/30] 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