Rebuild for OCaml 4.00.0.

This commit is contained in:
Richard W.M. Jones 2012-06-09 23:45:13 +01:00
parent cc03c142ff
commit 9a27d51040
2 changed files with 56 additions and 1 deletions

View File

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

View File

@ -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@redhat.com> - 2.03.1-4
- Rebuild for OCaml 4.00.0.
* Sat Apr 28 2012 Richard W.M. Jones <rjones@redhat.com> - 2.03.1-2
- Bump and rebuild against new OCaml compiler in ARM.