[ocaml-calendar] Rebuild for OCaml 4.00.0.
Richard W.M. Jones
rjones at fedoraproject.org
Sat Jun 9 22:53:01 UTC 2012
commit 9a27d51040a7d107261f643dd54cf02021bdcc84
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Jun 9 23:45:13 2012 +0100
Rebuild for OCaml 4.00.0.
calendar-2.03.1-ocaml-4.patch | 45 +++++++++++++++++++++++++++++++++++++++++
ocaml-calendar.spec | 12 ++++++++++-
2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/calendar-2.03.1-ocaml-4.patch b/calendar-2.03.1-ocaml-4.patch
new file mode 100644
index 0000000..9180ca5
--- /dev/null
+++ b/calendar-2.03.1-ocaml-4.patch
@@ -0,0 +1,45 @@
+--- calendar-2.03.1/configure.in 2011-03-24 16:28:22.000000000 +0000
++++ calendar-2.03.1.ocaml4/configure.in 2012-06-09 23:46:15.564638844 +0100
+@@ -55,6 +55,7 @@
+ 3.09*) echo "${ECHO_T}Warning: unsupported version. Compile at your own risks";;
+ 3.0*) echo "${ECHO_T}Unsupported version!"; exit 2;;
+ 3.*) echo "${ECHO_T}Good!";;
++ 4.*) echo "${ECHO_T}Good!";;
+ *) echo "${ECHO_T}Unsupported version!"; exit 2;;
+ esac
+
+--- calendar-2.03.1.old/utils/example.ml 2011-03-24 16:28:22.000000000 +0000
++++ calendar-2.03.1/utils/example.ml 2012-06-09 23:51:24.188610783 +0100
+@@ -23,15 +23,18 @@
+ (* $Id: example.ml 242 2011-03-24 16:26:50Z signoles $ *)
+
+ (** Add a tag @example *)
+-class example = object (self)
+- inherit Odoc_html.html as super
+
+- method html_of_example txt =
++module Generator (G : Odoc_html.Html_generator) =
++struct
++class html = object (self)
++ inherit G.html as super
++
++ method private html_of_example txt =
+ let buf = Buffer.create 97 in
+ self#html_of_text buf txt;
+ Format.sprintf "%s<br>\n" (Buffer.contents buf);
+
+- method html_of_examples = function
++ method private html_of_examples = function
+ | [] -> ""
+ | [ txt ] -> Format.sprintf "<b>Example:</b> %s" (self#html_of_example txt)
+ | examples ->
+@@ -64,6 +67,8 @@
+ initializer
+ tag_functions <- ("example", self#html_of_example) :: tag_functions
+ end
++end
+
+ let () =
+- Odoc_args.set_doc_generator (Some ((new example) :> Odoc_args.doc_generator))
++ Odoc_args.extend_html_generator
++ (module Generator : Odoc_gen.Html_functor)
diff --git a/ocaml-calendar.spec b/ocaml-calendar.spec
index 22e2a2c..145882f 100644
--- a/ocaml-calendar.spec
+++ b/ocaml-calendar.spec
@@ -3,7 +3,7 @@
Name: ocaml-calendar
Version: 2.03.1
-Release: 2%{?dist}
+Release: 4%{?dist}
Summary: Objective Caml library for managing dates and times
Group: Development/Libraries
@@ -17,6 +17,10 @@ BuildRequires: ocaml >= 3.12.1-3
BuildRequires: ocaml-findlib-devel, ocaml-ocamldoc
BuildRequires: gawk
+# Patch for OCaml 4 + BR autoconf because we update configure.in.
+Patch0: calendar-2.03.1-ocaml-4.patch
+BuildRequires: autoconf
+
# Ignore all generated modules *except* CalendarLib, since everything
# now appears in that namespace.
%global __ocaml_requires_opts -i Calendar_builder -i Calendar_sig -i Date -i Date_sig -i Fcalendar -i Ftime -i Period -i Printer -i Time -i Time_sig -i Time_Zone -i Utils -i Version
@@ -41,6 +45,9 @@ developing applications that use %{name}.
%prep
%setup -q -n calendar-%{version}
+%patch0 -p1
+autoconf
+
%build
./configure --libdir=%{_libdir}
@@ -83,6 +90,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Jun 09 2012 Richard W.M. Jones <rjones at redhat.com> - 2.03.1-4
+- Rebuild for OCaml 4.00.0.
+
* Sat Apr 28 2012 Richard W.M. Jones <rjones at redhat.com> - 2.03.1-2
- Bump and rebuild against new OCaml compiler in ARM.
More information about the scm-commits
mailing list