Compare commits

..

85 commits

Author SHA1 Message Date
Jerry James
9d4fef37f2 Fix a changelog entry 2026-01-13 17:00:39 -07:00
Richard W.M. Jones
ae93d1cd1a Add downstream patch to fix build for OCaml 5.4 2025-10-15 09:27:18 +01:00
Richard W.M. Jones
638fbe8df7 OCaml 5.4.0 rebuild 2025-10-14 09:34:32 +01:00
Jerry James
bb2c1fb3b9 Rebuild for ocaml-dune 3.20.0 2025-08-22 10:25:10 -06:00
Fedora Release Engineering
62dce5fde3 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 23:11:16 +00:00
Jerry James
49fc534cfa Rebuild to fix OCaml dependencies 2025-07-12 14:33:40 -06:00
Richard W.M. Jones
b608fbccc4 Remove use of dune-site 2025-04-03 09:40:43 +01:00
Yaakov Selkowitz
dcbab4a420 Fix build without camomile
The top-level dune-project file now contains package-specific information,
requiring camomile to be removed there as well.
2025-03-03 23:01:05 -05:00
Richard W.M. Jones
a25aade807 Add dependency from devel to ocaml-dune-site-devel.
https://src.fedoraproject.org/rpms/ocaml-gettext/pull-request/3#comment-249424
2025-02-27 10:33:19 +00:00
Richard W.M. Jones
d38306b478 New version 0.5.0 2025-02-26 14:14:25 +00:00
Fedora Release Engineering
96d8727610 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 20:50:27 +00:00
Jerry James
b21859a1f1 OCaml 5.3.0 rebuild for Fedora 42
- Add patch for OCaml 5.3 support
2025-01-10 09:06:43 -07:00
Fedora Release Engineering
33098a872f Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 20:07:37 +00:00
Richard W.M. Jones
b27432ddc9 OCaml 5.2.0 ppc64le fix 2024-06-19 16:46:34 +01:00
Richard W.M. Jones
be0afda1af Add RHEL gating test 2024-06-19 09:26:45 +01:00
Richard W.M. Jones
82503be5b6 OCaml 5.2.0 for Fedora 41 2024-05-29 22:20:26 +01:00
Jerry James
3ab8c86605 Add patch to fix tests with OCaml 5.2.0 2024-05-23 12:05:28 -06:00
Fedora Release Engineering
9090b3d6bd Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 10:00:32 +00:00
Fedora Release Engineering
90824c17cb Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 10:16:52 +00:00
Richard W.M. Jones
c1c7052349 OCaml 5.1.1 + s390x code gen fix for Fedora 40 2023-12-18 15:20:07 +00:00
Richard W.M. Jones
3dac2eccaa OCaml 5.1.1 rebuild for Fedora 40 2023-12-12 15:00:38 +00:00
Richard W.M. Jones
cd788feb5b OCaml 5.1 rebuild for Fedora 40 2023-10-05 16:13:04 +01:00
Jerry James
48d8469dad Add PR URL for Patch1 2023-10-04 23:09:07 -06:00
Fedora Release Engineering
c95600ebb2 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 17:18:13 +00:00
Yaakov Selkowitz
99c808b007 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).
2023-07-13 23:26:11 -04:00
Richard W.M. Jones
03b60fb0d3 OCaml 5.0 rebuild for Fedora 39 2023-07-12 00:27:15 +01:00
Richard W.M. Jones
ae0d999089 ExcludeArch i686 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SPML7CUBSZNI36NLXGVHEG7DNHU3EWOJ/) 2023-07-11 11:36:23 +01:00
Jerry James
6e43115a41 OCaml 5.0.0 rebuild
Other changes:
- Convert License tag to SPDX
- Enable tests
- Use new dune macros
2023-07-10 22:27:54 -06:00
Richard W.M. Jones
dbaf614c0e Rebuild OCaml packages for F38 2023-01-24 17:53:58 +00:00
Fedora Release Engineering
0644491c2f Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 22:08:50 +00:00
Fedora Release Engineering
dcad2f9406 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 01:14:42 +00:00
Richard W.M. Jones
888ea3b3e4 OCaml 4.14.0 rebuild 2022-06-19 11:41:09 +01:00
Richard W.M. Jones
6e7db6b361 OCaml 4.13.1 rebuild to remove package notes 2022-02-04 16:27:00 +00:00
Fedora Release Engineering
f1a555e896 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 21:44:42 +00:00
Richard W.M. Jones
f4dba8412f OCaml 4.13.1 build 2021-10-05 10:43:15 +01:00
Fedora Release Engineering
e5a78c182a - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:38:20 +00:00
Richard W.M. Jones
e1fc634549 Bump and rebuild for ELN. 2021-03-30 16:18:37 +01:00
Richard W.M. Jones
ab4b47dc0d Better handling of optional camomile subpackage.
Remove camomile from dune files on RHEL.

Fixes: commit bdcd1e64d0
2021-03-08 12:08:41 +00:00
Richard W.M. Jones
88f69932ac Add BR cppo 2021-03-02 09:41:38 +00:00
Richard W.M. Jones
bbab508ca2 New upstream version 4.2
Remove patch now upstream.
2021-03-02 09:25:07 +00:00
Richard W.M. Jones
f897bfaf0f Remove *.a from %files, no longer built. 2021-03-02 09:23:41 +00:00
Richard W.M. Jones
de9a5f05d2 OCaml 4.12.0 build 2021-03-01 23:22:36 +00:00
Richard W.M. Jones
bdcd1e64d0 Remove ocaml-camomile dep on RHEL 9. 2021-02-24 17:10:54 +00:00
Richard W.M. Jones
886cd64b70 Revert "Minor conditional tweak for ELN"
Don't pull in camomile on RHEL 9.

This reverts commit 4c6ebb0d2c.
2021-02-24 17:10:14 +00:00
Richard W.M. Jones
62f14e30bb Bump and rebuild for updated ocaml-camomile. 2021-02-01 11:52:05 +00:00
Fedora Release Engineering
5a7f369f05 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:58:04 +00:00
Tom Stellard
760c114fb6 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-07 06:14:07 +00:00
Richard W.M. Jones
37a45eb371 OCaml 4.11.1 rebuild 2020-09-01 21:44:35 +01:00
Richard W.M. Jones
a5d8503b6c OCaml 4.11.0 rebuild 2020-08-21 19:25:17 +01:00
Fedora Release Engineering
63e8f0ee23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 12:10:22 +00:00
Troy Dawson
4c6ebb0d2c Minor conditional tweak for ELN
This minor conditional change allows the package to build in both Fedora Rawhide and ELN.

Signed-off-by: Troy Dawson tdawson@redhat.com
2020-07-14 13:38:48 +00:00
Richard W.M. Jones
abfbcaba98 OCaml 4.11.0+dev2-2020-04-22 rebuild 2020-05-05 19:28:36 +01:00
Richard W.M. Jones
983af03722 New upstream version 0.4.1.
Add small fix for OCaml 4.11.
2020-04-22 10:25:51 +01:00
Richard W.M. Jones
342bdb083f OCaml 4.11.0 pre-release attempt 2 2020-04-21 23:00:20 +01:00
Richard W.M. Jones
5cdc437ef6 Update all OCaml dependencies for RPM 4.16. 2020-04-04 12:38:37 +01:00
Richard W.M. Jones
1585f8ab3f OCaml 4.10.0 final. 2020-02-27 09:09:16 +00:00
Fedora Release Engineering
315b85f79d - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 19:36:05 +00:00
Richard W.M. Jones
adc12ba962 OCaml 4.10.0+beta1 rebuild. 2020-01-19 16:14:28 +00:00
Richard W.M. Jones
444987857a OCaml 4.09.0 (final) rebuild. 2019-12-06 13:15:11 +00:00
Richard W.M. Jones
90d5b1884b Move to pre-release of 0.3.8.
Requires dune.
2019-10-01 10:35:10 +01:00
Richard W.M. Jones
4bcc0d82b6 Bump release and rebuild. 2019-08-16 16:11:26 +01:00
Richard W.M. Jones
fe6194206e OCaml 4.08.1 (final) rebuild. 2019-08-16 15:59:33 +01:00
Richard W.M. Jones
c23e8f8798 OCaml 4.08.1 (rc2) rebuild. 2019-08-01 00:00:58 +01:00
Fedora Release Engineering
0dd81cfb77 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 22:53:06 +00:00
Richard W.M. Jones
615f06a9be Add https://github.com/gildor478/ocaml-gettext/pull/5 2019-07-19 11:39:22 +01:00
Richard W.M. Jones
bf0bebee85 Remove camlp4 dependency.
Add all upstream patches since 0.3.7.
2019-07-19 10:54:04 +01:00
Fedora Release Engineering
85e0c7b354 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 16:50:24 +00:00
Fedora Release Engineering
8cce454a57 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 14:43:43 +00:00
Richard W.M. Jones
481f08f63f OCaml 4.07.0 (final) rebuild. 2018-07-11 16:28:08 +01:00
Richard W.M. Jones
6f73f218aa OCaml 4.07.0-rc1 rebuild. 2018-06-20 10:07:26 +01:00
Fedora Release Engineering
5a3b9f1e1a - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-08 08:50:40 +00:00
Richard W.M. Jones
6d3a5618f8 Build requires fixed ocaml camomile package. 2017-11-08 18:53:01 +00:00
Richard W.M. Jones
f816b4f5cb Add fix for immutable strings. 2017-11-08 18:34:34 +00:00
Richard W.M. Jones
67ee8833b4 OCaml 4.06.0 rebuild. 2017-11-08 18:17:15 +00:00
Richard W.M. Jones
568eb7d26c Update to new upstream version 0.3.7.
New URL.
Include upstream patches since 0.3.7 was released.
2017-09-23 10:22:01 +01:00
Richard W.M. Jones
47d5341297 Subpackage ocaml-gettext-camomile-devel should depend on ocaml-gettext-camomile (thanks: Pino Toscano). 2017-08-30 10:16:28 +01:00
Richard W.M. Jones
f33d7cf5d9 OCaml 4.05.0 rebuild. 2017-08-07 23:37:40 +01:00
Fedora Release Engineering
d889868337 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 04:15:57 +00:00
Fedora Release Engineering
07e39c47b7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 01:28:18 +00:00
Richard W.M. Jones
beefcb4114 Bump release and rebuild. 2017-06-26 21:45:52 +01:00
Richard W.M. Jones
a5f3466f1a OCaml 4.04.2 rebuild. 2017-06-26 21:06:58 +01:00
Richard W.M. Jones
3ccc5068b0 Bump release and rebuild. 2017-05-12 14:29:04 +01:00
Richard W.M. Jones
b4f5f8e9e1 OCaml 4.04.1 rebuild. 2017-05-12 13:18:28 +01:00
Fedora Release Engineering
74c391f4ad - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 00:31:55 +00:00
Richard W.M. Jones
f405b508d2 Disable a warning produced with OCaml 4.04. 2016-11-04 16:50:26 +00:00
9 changed files with 537 additions and 150 deletions

5
.gitignore vendored
View file

@ -1,3 +1,8 @@
ocaml-gettext-0.3.3.tar.gz
/ocaml-gettext-0.3.4.tar.gz
/ocaml-gettext-0.3.5.tar.gz
/0.3.7.tar.gz
/ocaml-gettext-0.3.8-3aecf8e5350f.tar.gz
/v0.4.1.tar.gz
/v0.4.2.tar.gz
/v0.5.0.tar.gz

View file

@ -0,0 +1,27 @@
From 5d521981e39dcaeada6bbe7b15c5432d6de5d33c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
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 <rjones@redhat.com>
---
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

160
37.patch Normal file
View file

@ -0,0 +1,160 @@
From 5462396bee53cb13d8d6fde4c6d430412a17b64d Mon Sep 17 00:00:00 2001
From: Stephane Glondu <steph@glondu.net>
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 = ""

6
gating.yaml Executable file
View file

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View file

@ -1,33 +0,0 @@
--- ocaml-gettext-0.3.4/TopMakefile.old 2013-09-14 08:54:04.713986462 +0100
+++ ocaml-gettext-0.3.4/TopMakefile 2013-09-14 08:54:18.319006115 +0100
@@ -102,7 +102,7 @@
%.cmxa %.a %.so:
$(if $(STUBSOBJS), \
$(OCAMLMKLIB) -o $* $^ $(OCAMLMKLIB_FLAGS), \
- $(OCAMLOPT) -a -o $*.cmxa $^ \
+ $(OCAMLOPT) -g -a -o $*.cmxa $^ \
)
%.cma %.a %.so:
@@ -161,7 +161,7 @@
OLIBS = $(addsuffix .cmxa,$(LIBS))
install-buildprog-opt: $(CMX)
- $(OCAMLOPT) -o $(NAME) $(INCLUDES) -package "$(REQUIRES)" -linkpkg \
+ $(OCAMLOPT) -g -o $(NAME) $(INCLUDES) -package "$(REQUIRES)" -linkpkg \
-predicates "$(PREDICATES)" $(OLIBS) $(CMX)
$(INSTALL) -d $(BUILDBIN)
$(INSTALL_SCRIPT) -t $(BUILDBIN) $(NAME)
@@ -300,10 +300,10 @@
$(OCAMLC) $(INCLUDES) $(CLI_OCAMLFIND) -c $<
.ml.o:
- $(OCAMLOPT) $(INCLUDES) $(CLI_OCAMLFIND) -c $<
+ $(OCAMLOPT) -g $(INCLUDES) $(CLI_OCAMLFIND) -c $<
.ml.cmx:
- $(OCAMLOPT) $(INCLUDES) $(CLI_OCAMLFIND) -c $<
+ $(OCAMLOPT) -g $(INCLUDES) $(CLI_OCAMLFIND) -c $<
.mll.ml:
$(OCAMLLEX) $<

View file

@ -1,41 +1,61 @@
%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.
%if !0%{?rhel}
%bcond_without camomile
%bcond_without tests
%else
%bcond_with camomile
%bcond_with tests
%endif
Name: ocaml-gettext
Version: 0.3.5
Release: 8%{?dist}
Version: 0.5.0
Release: 7%{?dist}
Summary: OCaml library for i18n
License: LGPLv2+ with exceptions
URL: http://forge.ocamlcore.org/projects/ocaml-gettext
License: LGPL-2.1-or-later with OCaml-LGPL-linking-exception
URL: https://github.com/gildor478/ocaml-gettext
VCS: git:%{url}.git
Source0: https://forge.ocamlcore.org/frs/download.php/1433/%{name}-%{version}.tar.gz
Source0: %{url}/archive/v%{version}.tar.gz
Patch1: ocaml-gettext-0.3.4-use-ocamlopt-g.patch
# 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.00.1
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-camlp4-devel
BuildRequires: ocaml-fileutils-devel >= 0.4.4-4
# 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
BuildRequires: ocaml-dune-configurator-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
BuildRequires: chrpath
BuildRequires: autoconf
%if !0%{?rhel}
%if %{with tests}
BuildRequires: ocaml-ounit-devel
BuildRequires: ocaml-camomile-devel >= 0.8.1
%endif
%if %{with camomile}
BuildRequires: ocaml-camomile-devel >= 0.8.6-3
BuildRequires: ocaml-camomile-data
%endif
%if !0%{?rhel}
%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
@ -51,10 +71,8 @@ Constraints :
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
# BZ 446919.
Requires: ocaml-fileutils-devel >= 0.4.0
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: ocaml-fileutils-devel%{?_isa} >= 0.6.6
%description devel
@ -62,10 +80,10 @@ The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%if !0%{?rhel}
%if %{with camomile}
%package camomile
Summary: Parts of %{name} which depend on Camomile
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description camomile
@ -75,7 +93,9 @@ depend on Camomile.
%package camomile-devel
Summary: Development files for %{name}-camomile
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: %{name}-camomile%{?_isa} = %{version}-%{release}
Requires: ocaml-camomile-devel%{?_isa}
%description camomile-devel
@ -86,119 +106,289 @@ signature files for developing applications that use
%prep
%setup -q
%autosetup -p1
%patch1 -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
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
%build
# Parallel builds don't work.
unset MAKEFLAGS
CFLAGS="$RPM_OPT_FLAGS" \
./configure \
--libdir=%{_libdir} \
%if 0%{?rhel}
--disable-camomile \
%else
--enable-test \
%endif
--with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
make all
%check
%if %opt
%if !0%{?rhel}
pushd test
../_build/bin/test
popd
%endif
%endif
%dune_build
%install
# make install in the package is screwed up completely. Install
# by hand instead.
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
mkdir -p $RPM_BUILD_ROOT%{_bindir}
%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
# Remove *.o files - these shouldn't be distributed.
find _build -name '*.o' -exec rm {} \;
ocamlfind install gettext _build/lib/gettext/*
ocamlfind install gettext-stub _build/lib/gettext-stub/*
%if !0%{?rhel}
ocamlfind install gettext-camomile _build/lib/gettext-camomile/*
%if %{with tests}
%check
%dune_check
%endif
install -m 0755 _build/bin/ocaml-gettext $RPM_BUILD_ROOT%{_bindir}/
install -m 0755 _build/bin/ocaml-xgettext $RPM_BUILD_ROOT%{_bindir}/
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
%files
%doc COPYING
%{_libdir}/ocaml/gettext
%{_libdir}/ocaml/gettext-stub
%if %opt
%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
%{_libdir}/ocaml/stublibs/*.so.owner
%files -f .ofiles-gettext
%license LICENSE.txt
%files devel
%doc README CHANGELOG TODO
# %doc build/share/doc/html/*
%if %opt
%{_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
%files devel -f .ofiles-gettext-devel
%doc README.md CHANGES.md THANKS TODO.md
%{_bindir}/ocaml-gettext
%{_bindir}/ocaml-xgettext
%{_mandir}/man1/ocaml-gettext.1*
%{_mandir}/man1/ocaml-xgettext.1*
%{_mandir}/man5/ocaml-gettext.5*
%if !0%{?rhel}
%files camomile
%doc COPYING
%{_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
%if %{with camomile}
%files camomile -f .ofiles-gettext-camomile
%license LICENSE.txt
%files camomile-devel
%doc README
%if %opt
%{_libdir}/ocaml/gettext-camomile/*.a
%{_libdir}/ocaml/gettext-camomile/*.cmxa
%{_libdir}/ocaml/gettext-camomile/*.cmx
%endif
%{_libdir}/ocaml/gettext-camomile/*.mli
%files camomile-devel -f .ofiles-gettext-camomile-devel
%doc README.md
%endif
%changelog
* Tue Oct 14 2025 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-7
- OCaml 5.4.0 rebuild
* Fri Aug 22 2025 Jerry James <loganjerry@gmail.com> - 0.5.0-6
- Rebuild for ocaml-dune 3.20.0
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Jul 12 2025 Jerry James <loganjerry@gmail.com> - 0.5.0-4
- Rebuild to fix OCaml dependencies
* Thu Apr 03 2025 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-3
- Remove use of dune-site
* Thu Feb 27 2025 Richard W.M. Jones <rjones@redhat.com> - 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 <rjones@redhat.com> - 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 <releng@fedoraproject.org> - 0.4.2-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Jan 10 2025 Jerry James <loganjerry@gmail.com> - 0.4.2-23
- OCaml 5.3.0 rebuild for Fedora 42
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_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
* Tue Oct 05 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-5
- OCaml 4.13.1 build
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Mar 30 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-3
- Bump and rebuild for ELN.
* 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.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-5
- OCaml 4.11.1 rebuild
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-4
- OCaml 4.11.0 rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-2
- OCaml 4.11.0+dev2-2020-04-22 rebuild
* Wed Apr 22 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-1
- New upstream version 0.4.1.
- Add small fix for OCaml 4.11.
- Package the man pages.
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.7.git3aecf8e5350f
- OCaml 4.11.0 pre-release attempt 2
* Sat Apr 04 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.6.git3aecf8e5350f
- Update all OCaml dependencies for RPM 4.16.
* Thu Feb 27 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.5.git3aecf8e5350f
- OCaml 4.10.0 final.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-0.4.git3aecf8e5350f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.3.git3aecf8e5350f
- OCaml 4.10.0+beta1 rebuild.
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.2.git3aecf8e5350f
- OCaml 4.09.0 (final) rebuild.
* Tue Oct 1 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.1
- Move to pre-release of 0.3.8.
- Requires dune.
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-13
- Bump release and rebuild.
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-12
- OCaml 4.08.1 (final) rebuild.
* Wed Jul 31 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-11
- OCaml 4.08.1 (rc2) rebuild.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jul 19 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-9
- Remove camlp4 dependency.
- Add all upstream patches since 0.3.7.
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-5
- OCaml 4.07.0 (final) rebuild.
* Wed Jun 20 2018 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-4
- OCaml 4.07.0-rc1 rebuild.
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Nov 08 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-2
- OCaml 4.06.0 rebuild.
- Add fix for immutable strings.
* Sat Sep 23 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-1
- Update to new upstream version 0.3.7.
- New URL.
- Include upstream patches since 0.3.7 was released.
* Wed Aug 30 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-18
- Subpackage ocaml-gettext-camomile-devel should depend on
ocaml-gettext-camomile (thanks: Pino Toscano).
* Mon Aug 07 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-17
- OCaml 4.05.0 rebuild.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-14
- Bump release and rebuild.
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-13
- OCaml 4.04.2 rebuild.
* Fri May 12 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-12
- Bump release and rebuild.
* Fri May 12 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-11
- OCaml 4.04.1 rebuild.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Nov 04 2016 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-9
- Disable a warning produced with OCaml 4.04.
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View file

@ -1 +1 @@
3c3c5156578104819b486584aa14f807 ocaml-gettext-0.3.5.tar.gz
SHA512 (v0.5.0.tar.gz) = f55505bbe0da2a06053d94ee895a3e610a8d4ab5a2283ccff6a5a0c6a8ec011f5f286ab93e117cc340f55f056c7cdcb5752cc798e9d8e18fb5ab17f27f4a64c2

19
tests/basic-test.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash -
set -e
set -x
# Compile trivial gettext program.
cat <<EOF > 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

13
tests/tests.yml Executable file
View file

@ -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