From d70465ba77c4bcbc8825c3014ce38b1dce2026d8 Mon Sep 17 00:00:00 2001 From: cherry530 Date: Thu, 20 Jan 2022 16:50:30 +0800 Subject: [PATCH] fix build error due to `Format.dprintf` does not shadow `Log.dprintf` Signed-off-by: cherry530 --- ...-of-open-s-so-that-Format.dprintf-do.patch | 43 +++++++++++++++++++ ocaml-ocamlbuild.spec | 8 +++- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 0001-Change-the-order-of-open-s-so-that-Format.dprintf-do.patch diff --git a/0001-Change-the-order-of-open-s-so-that-Format.dprintf-do.patch b/0001-Change-the-order-of-open-s-so-that-Format.dprintf-do.patch new file mode 100644 index 0000000..b65ef6f --- /dev/null +++ b/0001-Change-the-order-of-open-s-so-that-Format.dprintf-do.patch @@ -0,0 +1,43 @@ +From 70a33ab6500b35c3d73662ece8de32126f3572ac Mon Sep 17 00:00:00 2001 +From: Xavier Clerc +Date: Mon, 13 Aug 2018 12:56:37 +0100 +Subject: [PATCH] Change the order of `open`s so that `Format.dprintf` does not + shadow `Log.dprintf`. + +--- + src/main.ml | 2 +- + src/solver.ml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main.ml b/src/main.ml +index 55155a7..c0b8772 100644 +--- a/src/main.ml ++++ b/src/main.ml +@@ -14,12 +14,12 @@ + + (* Original author: Berke Durak *) + open My_std ++open Format + open Log + open Pathname.Operators + open Command + open Tools + open Ocaml_specific +-open Format + ;; + + exception Exit_build_error of string +diff --git a/src/solver.ml b/src/solver.ml +index 9895a11..c0b7d06 100644 +--- a/src/solver.ml ++++ b/src/solver.ml +@@ -14,8 +14,8 @@ + + (* Original author: Nicolas Pouillard *) + open My_std +-open Log + open Format ++open Log + open Outcome + + type backtrace = diff --git a/ocaml-ocamlbuild.spec b/ocaml-ocamlbuild.spec index 84a89f8..0a9d38a 100644 --- a/ocaml-ocamlbuild.spec +++ b/ocaml-ocamlbuild.spec @@ -3,11 +3,12 @@ %endif Name: ocaml-ocamlbuild Version: 0.12.0 -Release: 1 +Release: 2 Summary: Build tool for OCaml libraries and programs License: LGPLv2+ with exceptions URL: https://github.com/ocaml/ocamlbuild Source0: https://github.com/ocaml/ocamlbuild/archive/%{version}/%{name}-%{version}.tar.gz +Patch0000: 0001-Change-the-order-of-open-s-so-that-Format.dprintf-do.patch BuildRequires: ocaml >= 4.04.0 %description OCamlbuild is a build tool for building OCaml libraries and programs. @@ -25,7 +26,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} This package contains the manual for %{name}. %prep -%setup -q -n ocamlbuild-%{version} +%autosetup -n ocamlbuild-%{version} -p1 %build make configure \ @@ -94,5 +95,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild/META %doc manual/* %changelog +* Thu Jan 20 2022 xu_ping - 0.12.0-2 +- fix build error due to `Format.dprintf` does not shadow `Log.dprintf` + * Fri Oct 9 2020 maminjie - 0.12.0-1 - package init