public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ocaml-mdx] rawhide: OCaml 5.5.0 rebuild
@ 2026-07-09 23:37 Jerry James
0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-07-09 23:37 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ocaml-mdx
Branch : rawhide
Commit : 9d8fb9b4926c89b5170903e3c71c80f130887d5a
Author : Jerry James <loganjerry@gmail.com>
Date : 2026-07-09T17:36:50-06:00
Stats : +78/-12 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/ocaml-mdx/c/9d8fb9b4926c89b5170903e3c71c80f130887d5a?branch=rawhide
Log:
OCaml 5.5.0 rebuild
- Use the dune declarative buildsystem
- Add 2 patches to fix issues with dune 3.24
---
diff --git a/478.patch b/478.patch
new file mode 100644
index 0000000..3fadc34
--- /dev/null
+++ b/478.patch
@@ -0,0 +1,45 @@
+From 127de28a8ee4d6310573631d8ad86379ef38aa0e Mon Sep 17 00:00:00 2001
+From: Shon Feder <shon.feder@gmail.com>
+Date: Mon, 1 Jun 2026 21:50:57 -0400
+Subject: [PATCH 1/2] use setup-dune v2
+
+---
+ .github/workflows/dune-build.yml | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/.github/workflows/dune-build.yml b/.github/workflows/dune-build.yml
+index 53acfa6a..466dd12e 100644
+--- a/.github/workflows/dune-build.yml
++++ b/.github/workflows/dune-build.yml
+@@ -14,6 +14,4 @@ jobs:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Use dune
+- uses: ocaml-dune/setup-dune@v0.0.1
+- with:
+- automagic: true
++ uses: ocaml-dune/setup-dune@v2
+
+From b82392a21db33fd9d02e6d978dee0eeeef3d9317 Mon Sep 17 00:00:00 2001
+From: Shon Feder <shon.feder@gmail.com>
+Date: Thu, 28 May 2026 14:30:19 -0400
+Subject: [PATCH 2/2] Set arg 0 to the bytecode target
+
+As per https://github.com/ocaml/dune/issues/14724#issuecomment-4549904300
+---
+ bin/test.ml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/test.ml b/bin/test.ml
+index efeaefc5..5df06c31 100644
+--- a/bin/test.ml
++++ b/bin/test.ml
+@@ -30,7 +30,7 @@ let run (`Setup ()) _ _ _ _ _ _ _ _ _ _ =
+ let dir = Filename.dirname Sys.argv.(0) in
+ let cmd =
+ match base with
+- | "main.exe" -> dir / "test" / "main.exe"
++ | "main.exe" -> dir / "test" / "main.bc"
+ | x when String.length x > 6 && String.sub x 0 6 = "ocaml-" ->
+ let x_without_ext, x_ext = split_exe_extension x in
+ (dir / x_without_ext) ^ "-test" ^ x_ext
diff --git a/ocaml-mdx-dune-3.24.patch b/ocaml-mdx-dune-3.24.patch
new file mode 100644
index 0000000..13719ba
--- /dev/null
+++ b/ocaml-mdx-dune-3.24.patch
@@ -0,0 +1,25 @@
+--- mdx-2.5.2/bin/dune_gen.ml.orig 2026-03-23 09:36:09.000000000 -0600
++++ mdx-2.5.2/bin/dune_gen.ml 2026-07-09 08:52:46.209310440 -0600
+@@ -34,7 +34,7 @@ let run (`Setup ()) (`Prelude prelude) (
+ in
+
+ let pp_prelude ppf (env, filename) =
+- Fmt.pf ppf "(%a, %S)" pp_env env filename
++ Fmt.pf ppf "(%a, %S)" pp_env env (Filename.basename filename)
+ in
+
+ let pp_preludes ppf preludes =
+--- mdx-2.5.2/bin/pp.ml.orig 2026-03-23 09:36:09.000000000 -0600
++++ mdx-2.5.2/bin/pp.ml 2026-07-09 08:40:43.625271270 -0600
+@@ -30,7 +30,10 @@ let vpad_of_lines t =
+ in
+ aux 0 t
+
+-let pp_line_directive ppf (file, line) = Fmt.pf ppf "#%d %S" line file
++let pp_line_directive ppf (file, line) =
++ let len = String.length file in
++ let fixedfile = if String.starts_with ~prefix:"./" file then String.sub file 2 (len - 2) else file in
++ Fmt.pf ppf "#%d %S" line fixedfile
+
+ let rec add_semi_semi = function
+ | [] -> []
diff --git a/ocaml-mdx.spec b/ocaml-mdx.spec
index 48c8a2e..75a3a08 100644
--- a/ocaml-mdx.spec
+++ b/ocaml-mdx.spec
@@ -1,6 +1,3 @@
-# OCaml packages not built on i686 since OCaml 5 / Fedora 39.
-ExcludeArch: %{ix86}
-
%global giturl https://github.com/realworldocaml/mdx
Name: ocaml-mdx
@@ -12,7 +9,15 @@ License: ISC
URL: https://realworldocaml.github.io/mdx/
VCS: git:%{giturl}.git
Source: %{giturl}/releases/download/%{version}/mdx-%{version}.tbz
+# Fix the target called by the mdx test runner
+Patch: %{giturl}/pull/478.patch
+# Adapt to pathname changes in dune 3.24
+Patch: %{name}-dune-3.24.patch
+
+# OCaml packages not built on i686 since OCaml 5 / Fedora 39.
+ExcludeArch: %{ix86}
+BuildSystem: dune
BuildRequires: ocaml >= 4.08.0
BuildRequires: ocaml-alcotest-devel
BuildRequires: ocaml-astring-devel
@@ -68,15 +73,6 @@ developing applications that use %{name}.
%prep
%autosetup -n mdx-%{version} -p1
-%build
-%dune_build
-
-%install
-%dune_install
-
-%check
-%dune_check
-
%files -f .ofiles
%doc CHANGES.md README.md
%license LICENSE.md
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-09 23:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-09 23:37 [rpms/ocaml-mdx] rawhide: OCaml 5.5.0 rebuild Jerry James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox