From 1a382b25a94ca823767bd71db29bbcf5aa3133cc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 8 Jun 2012 22:58:46 +0100 Subject: [PATCH] Patch for changes in ocamldoc in OCaml 4.00.0. --- lablgtk-2.14.2-ocaml-4.00.patch | 74 +++++++++++++++++++++++++++++++++ ocaml-lablgtk.spec | 16 ++++++- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 lablgtk-2.14.2-ocaml-4.00.patch diff --git a/lablgtk-2.14.2-ocaml-4.00.patch b/lablgtk-2.14.2-ocaml-4.00.patch new file mode 100644 index 0000000..a4d89d1 --- /dev/null +++ b/lablgtk-2.14.2-ocaml-4.00.patch @@ -0,0 +1,74 @@ +--- lablgtk-2.14.2.old/src/gtkdoc.ml 2007-06-20 08:40:34.000000000 +0100 ++++ lablgtk-2.14.2/src/gtkdoc.ml 2012-06-08 22:53:41.916362648 +0100 +@@ -63,6 +63,52 @@ + open Odoc_info.Value + open Odoc_info.Module + ++IFDEF OCAML_400 ++THEN ++module Generator (G : Odoc_html.Html_generator) = ++struct ++class html = ++ object (self) ++ inherit G.html as super ++ ++ method html_of_value b v = ++ v.val_code <- None ; ++ super#html_of_value b v ++ ++ method html_of_attribute b a = ++ a.att_value.val_code <- None ; ++ super#html_of_attribute b a ++ ++ method html_of_method b m = ++ m.met_value.val_code <- None ; ++ super#html_of_method b m ++ ++ method generate_for_module pre post modu = ++ modu.m_code <- None ; ++ super#generate_for_module pre post modu ++ ++ method prepare_header module_list = ++ header <- ++ make_prepare_header style self#index module_list ++ ++ method html_of_class b ?complete ?with_link c = ++ super#html_of_class b ?complete ?with_link c ; ++ Buffer.add_string b "
" ++ ++ initializer ++ tag_functions <- ("gtkdoc", gtkdoc) :: tag_functions ++ end ++end ++ ++let _ = ++ Odoc_args.add_option ++ ("-base-uri", Arg.String ((:=) base_uri), ++ "base URI of the GTK/GNOME documentation") ; ++ Odoc_args.extend_html_generator ++ (module Generator : Odoc_gen.Html_functor) ++ ++ELSE ++ + IFDEF OCAML_308 + THEN + class gtkdoc = +@@ -134,3 +180,5 @@ + "base URI of the GTK/GNOME documentation") ; + Odoc_info.Args.set_doc_generator + (Some (new gtkdoc :> Odoc_info.Args.doc_generator)) ++ ++END +--- lablgtk-2.14.2.old/configure.in 2009-09-22 22:39:32.000000000 +0100 ++++ lablgtk-2.14.2/configure.in 2012-06-08 22:52:01.175516146 +0100 +@@ -154,7 +154,9 @@ + AC_MSG_ERROR(Cannot find camlp4o.) + fi + +-if expr "$OCAMLVERSION" '>=' '3.08' > /dev/null ; then ++if expr "$OCAMLVERSION" '>=' '4' > /dev/null ; then ++ ODOC_DEF="-D OCAML_400" ++elif expr "$OCAMLVERSION" '>=' '3.08' > /dev/null ; then + ODOC_DEF="-D OCAML_308" + fi + AC_SUBST(ODOC_DEF) diff --git a/ocaml-lablgtk.spec b/ocaml-lablgtk.spec index 1eebee0..6ff0c40 100644 --- a/ocaml-lablgtk.spec +++ b/ocaml-lablgtk.spec @@ -2,7 +2,7 @@ Name: ocaml-lablgtk Version: 2.14.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Objective Caml interface to gtk+ @@ -15,6 +15,9 @@ Source: https://forge.ocamlcore.org/frs/download.php/561/lablgtk-%{versi # Patch sent upstream 2011-07-27 by RWMJ. Patch0: lablgtk-2.14.2-avoid-queue-empty-in-gtkThread.patch +# Patch sent upstream 2012-06-08 by RWMJ. +Patch1: lablgtk-2.14.2-ocaml-4.00.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x @@ -39,6 +42,9 @@ BuildRequires: zlib-devel BuildRequires: gtksourceview-devel BuildRequires: gtksourceview2-devel +# Temporarily required while we are patching configure.in: +BuildRequires: autoconf, automake + %global __ocaml_requires_opts -i GtkSourceView_types -i GtkSourceView2_types @@ -78,6 +84,11 @@ developing applications that use %{name}. perl -pi -e 's|version="1.3.1"|version="%{version}"|' META %patch0 -p1 +%patch1 -p1 + +# Patch1 updates configure.in, so: +aclocal +autoconf %build @@ -158,6 +169,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jun 8 2012 Richard W.M. Jones - 2.14.2-11 +- Patch for changes in ocamldoc in OCaml 4.00.0. + * Fri Jun 8 2012 Orion Poplawski - 2.14.2-10 - Rebuild for OCaml 4.00.0. - Updated URL.