diff --git a/1a9bd729b97db408022995f93b19678706a79ca7.patch b/1a9bd729b97db408022995f93b19678706a79ca7.patch deleted file mode 100644 index 6cb6983..0000000 --- a/1a9bd729b97db408022995f93b19678706a79ca7.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 1a9bd729b97db408022995f93b19678706a79ca7 Mon Sep 17 00:00:00 2001 -From: Rudi Grinberg -Date: Mon, 24 Aug 2020 02:39:59 -0700 -Subject: [PATCH] [configurator] more workaround for extracting #define - -allow duplicate values if they are the same _after_ conversion - -Signed-off-by: Rudi Grinberg ---- - otherlibs/configurator/src/v1.ml | 46 ++++++++++++++++++-------------- - 1 file changed, 26 insertions(+), 20 deletions(-) - -diff --git a/otherlibs/configurator/src/v1.ml b/otherlibs/configurator/src/v1.ml -index 721c0e7384..7e5dc19883 100644 ---- a/otherlibs/configurator/src/v1.ml -+++ b/otherlibs/configurator/src/v1.ml -@@ -466,10 +466,6 @@ module C_define = struct - | Switch of bool - | Int of int - | String of string -- -- let switch b = Switch b -- -- let int i = Int i - end - - let extract_program ?prelude includes vars = -@@ -544,29 +540,39 @@ const char *s%i = "BEGIN-%i-false-END"; - Error [ v; v' ] ))) - in - List.mapi vars ~f:(fun i (name, t) -> -- let raw_val = -+ let raw_vals = - match Int.Map.find values i with -+ | Some (Ok v) -> [ v ] -+ | Some (Error vs) -> vs - | None -> die "Unable to get value for %s" name -- | Some (Ok v) -> v -- | Some (Error vs) -> -- let vs = List.sort_uniq ~cmp:compare vs in -+ in -+ let parse_val_or_exn f = -+ let f x = -+ match f x with -+ | Some s -> s -+ | None -> -+ die -+ "Unable to read variable %S of type %s. Invalid value %S in %s \ -+ found" -+ name (Type.name t) x obj_file -+ in -+ let vs = -+ List.map ~f:(fun x -> (x, f x)) raw_vals -+ |> List.sort_uniq ~cmp:(fun (_, x) (_, y) -> compare x y) -+ in -+ match vs with -+ | [] -> assert false -+ | [ (_, v) ] -> v -+ | vs -> -+ let vs = List.map ~f:fst vs in - die "Duplicate values for %s:\n%s" name - (vs |> List.map ~f:(sprintf "- %s") |> String.concat ~sep:"\n") - in - let value = - match t with -- | Type.Switch -> Bool.of_string raw_val |> Option.map ~f:Value.switch -- | Int -> Int.of_string raw_val |> Option.map ~f:Value.int -- | String -> Some (String raw_val) -- in -- let value = -- match value with -- | Some v -> v -- | None -> -- die -- "Unable to read variable %S of type %s. Invalid value %S in %s \ -- found" -- name (Type.name t) raw_val obj_file -+ | Type.Switch -> Value.Switch (parse_val_or_exn Bool.of_string) -+ | Int -> Value.Int (parse_val_or_exn Int.of_string) -+ | String -> String (parse_val_or_exn (fun x -> Some x)) - in - (name, value)) - diff --git a/3739.patch b/3739.patch deleted file mode 100644 index 55e47d1..0000000 --- a/3739.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 4a1fee49b97e7bd4da368c83c5a28cdbde9e140d Mon Sep 17 00:00:00 2001 -From: Rudi Grinberg -Date: Sat, 22 Aug 2020 20:56:56 -0700 -Subject: [PATCH] [configurator] more flexible #define parsing - -Allow duplicate values for the same key as long as they are the same. - -Signed-off-by: Rudi Grinberg ---- - otherlibs/configurator/src/v1.ml | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/otherlibs/configurator/src/v1.ml b/otherlibs/configurator/src/v1.ml -index 1cdc5c5672..721c0e7384 100644 ---- a/otherlibs/configurator/src/v1.ml -+++ b/otherlibs/configurator/src/v1.ml -@@ -532,13 +532,26 @@ const char *s%i = "BEGIN-%i-false-END"; - let extract_values obj_file vars = - let values = - Io.with_lexbuf_from_file obj_file ~f:(Extract_obj.extract []) -- |> Int.Map.of_list_exn -+ |> List.fold_left ~init:Int.Map.empty ~f:(fun acc (key, v) -> -+ Int.Map.update acc ~key ~f:(function -+ | None -> Some (Ok v) -+ | Some (Error vs) -> Some (Error (v :: vs)) -+ | Some (Ok v') -> -+ Some -+ ( if v = v' then -+ Ok v' -+ else -+ Error [ v; v' ] ))) - in - List.mapi vars ~f:(fun i (name, t) -> - let raw_val = - match Int.Map.find values i with - | None -> die "Unable to get value for %s" name -- | Some v -> v -+ | Some (Ok v) -> v -+ | Some (Error vs) -> -+ let vs = List.sort_uniq ~cmp:compare vs in -+ die "Duplicate values for %s:\n%s" name -+ (vs |> List.map ~f:(sprintf "- %s") |> String.concat ~sep:"\n") - in - let value = - match t with diff --git a/9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch b/9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch new file mode 100644 index 0000000..5f3c1df --- /dev/null +++ b/9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch @@ -0,0 +1,42 @@ +From 8a3d7f2f2015b71384caa07226d1a89dba9d6c25 Mon Sep 17 00:00:00 2001 +From: Mario Rodas +Date: Wed, 2 Sep 2020 20:00:00 -0500 +Subject: [PATCH] src/dune/setup.ml is now src/dune_rules/setup.ml + +src/dune/setup.ml was renamed in bebb7a9432b149fce95ac820757216372afb8f0f + +Signed-off-by: Mario Rodas +--- + Makefile | 2 +- + configure.ml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 4ae969a9..52d5d20a 100644 +--- a/Makefile ++++ b/Makefile +@@ -103,7 +103,7 @@ clean: $(BIN) + rm -rf _boot dune.exe + + distclean: clean +- rm -f src/dune/setup.ml ++ rm -f src/dune_rules/setup.ml + + doc: + cd doc && sphinx-build . _build +diff --git a/configure.ml b/configure.ml +index f5366f17..c1fe8d30 100644 +--- a/configure.ml ++++ b/configure.ml +@@ -44,7 +44,7 @@ let () = + let anon s = bad "Don't know what to do with %s" s in + Arg.parse (Arg.align args) anon + "Usage: ocaml configure.ml [OPTRIONS]]\nOptions are:"; +- let oc = open_out "src/dune/setup.ml" in ++ let oc = open_out "src/dune_rules/setup.ml" in + let pr fmt = fprintf oc (fmt ^^ "\n") in + pr "let library_path = %s" (option (list string) !library_path); + pr "let library_destdir = %s" (option string !library_destdir); +-- +2.26.2 + diff --git a/ocaml-dune.spec b/ocaml-dune.spec index 748b8fe..18cf0b9 100644 --- a/ocaml-dune.spec +++ b/ocaml-dune.spec @@ -5,8 +5,8 @@ %bcond_without menhir Name: ocaml-%{libname} -Version: 2.7.0 -Release: 6%{?dist} +Version: 2.7.1 +Release: 1%{?dist} Summary: A composable build system for OCaml # Dune itself is MIT. Some bundled libraries have a different license: @@ -22,13 +22,13 @@ License: MIT and LGPLv2 and LGPLv2 with exceptions and ISC URL: https://dune.build Source0: https://github.com/ocaml/%{libname}/archive/%{version}/%{libname}-%{version}.tar.gz -# https://github.com/ocaml/dune/issues/3736 -# https://github.com/ocaml/dune/pull/3739 -Patch1: 3739.patch -Patch2: 1a9bd729b97db408022995f93b19678706a79ca7.patch +# Fix path to the configuration file +# https://github.com/ocaml/dune/pull/3757 +Patch0: 9749697c9f6cd5848d2083faa84836b7dd8fbd4b.patch BuildRequires: emacs BuildRequires: ocaml >= 4.08 +BuildRequires: ocaml-csexp-devel BuildRequires: ocaml-findlib BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinx-rtd-theme} @@ -44,7 +44,6 @@ BuildRequires: ocaml-menhir # doesn't seem to be able to detect libraries installed systemwide. # https://github.com/ocaml/dune/issues/220 Provides: bundled(ocaml-build-path-prefix-map) = 0.2 -Provides: bundled(ocaml-csexp) = 1.0.0 Provides: bundled(ocaml-opam-file-format) = 2.0.0 Provides: bundled(ocaml-cmdliner) = 1.0.3 Provides: bundled(ocaml-re) = 1.7.1 @@ -196,6 +195,12 @@ cp -ar README.md CHANGES.md MIGRATION.md doc/_build/* %{buildroot}%{_pkgdocdir}/ %{_emacs_sitelispdir}/dune* %changelog +* Mon Sep 14 2020 Jerry James - 2.7.1-1 +- Version 2.7.1 +- Csexp is no longer vendored in +- Drop upstreamed patches for issue 3736 and pull request 3739 +- Fix configuration with patch from pull request 3757 + * Tue Sep 01 2020 Richard W.M. Jones - 2.7.0-6 - OCaml 4.11.1 rebuild diff --git a/sources b/sources index c26d54c..59bcf76 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dune-2.7.0.tar.gz) = 6063010f7e9d34846df878d94d12517e88a376ab67372ceac9411f4a83ba6eeaf487b8809c1fcc150e0d150ce8f7b925438780920c1883aee4ea242653b4cdb8 +SHA512 (dune-2.7.1.tar.gz) = b77d0e207263107365e5a6e94423e8ab4ddbab1f920872d915e4014b7cc69915274b53fe946bb4b29dfe3de2bf5573ab3b2bffb4db8eb50b472e7dfb6cab88b7