[96555] trunk/dports/x11/lablgtk2

ryandesign at macports.org ryandesign at macports.org
Tue Aug 14 00:12:26 PDT 2012


Revision: 96555
          https://trac.macports.org/changeset/96555
Author:   ryandesign at macports.org
Date:     2012-08-14 00:12:24 -0700 (Tue, 14 Aug 2012)
Log Message:
-----------
lablgtk2: fix build with ocaml 4 (#35646)

Modified Paths:
--------------
    trunk/dports/x11/lablgtk2/Portfile

Added Paths:
-----------
    trunk/dports/x11/lablgtk2/files/patch-ocaml-4.diff

Modified: trunk/dports/x11/lablgtk2/Portfile
===================================================================
--- trunk/dports/x11/lablgtk2/Portfile	2012-08-14 06:56:03 UTC (rev 96554)
+++ trunk/dports/x11/lablgtk2/Portfile	2012-08-14 07:12:24 UTC (rev 96555)
@@ -37,7 +37,8 @@
                     port:libgnomecanvas \
                     port:libgnomeui
 
-patchfiles          patch-META
+patchfiles          patch-META \
+                    patch-ocaml-4.diff
 
 configure.args      --without-gl \
                     --without-rsvg \

Added: trunk/dports/x11/lablgtk2/files/patch-ocaml-4.diff
===================================================================
--- trunk/dports/x11/lablgtk2/files/patch-ocaml-4.diff	                        (rev 0)
+++ trunk/dports/x11/lablgtk2/files/patch-ocaml-4.diff	2012-08-14 07:12:24 UTC (rev 96555)
@@ -0,0 +1,75 @@
+https://lists.forge.ocamlcore.org/pipermail/lablgtk-list/2012-June/001951.html
+--- src/gtkdoc.ml.orig	2007-06-20 08:40:34.000000000 +0100
++++ 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 "<br>"
++
++    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
+--- configure.orig	2009-09-22 16:39:32.000000000 -0500
++++ configure	2012-08-14 02:07:09.000000000 -0500
+@@ -2477,7 +2477,9 @@
+    { (exit 1); exit 1; }; }
+ 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
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120814/92f61dc1/attachment.html>


More information about the macports-changes mailing list