From 32979e040b3dc7141de2323645bc2d7955a5ce26 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Fri, 12 Aug 2016 14:46:21 +0200 Subject: [PATCH] dev-ml/eliom: fix build with tyxml4 Package-Manager: portage-2.3.0 --- dev-ml/eliom/eliom-5.0.0-r1.ebuild | 1 + dev-ml/eliom/files/tyxml4.patch | 1642 ++++++++++++++++++++++++++++ 2 files changed, 1643 insertions(+) create mode 100644 dev-ml/eliom/files/tyxml4.patch diff --git a/dev-ml/eliom/eliom-5.0.0-r1.ebuild b/dev-ml/eliom/eliom-5.0.0-r1.ebuild index b5103a315483..8aaec1f4701e 100644 --- a/dev-ml/eliom/eliom-5.0.0-r1.ebuild +++ b/dev-ml/eliom/eliom-5.0.0-r1.ebuild @@ -36,6 +36,7 @@ src_prepare() { if has_version '>=dev-lang/ocaml-4.03' ; then epatch "${FILESDIR}/"{camlp4,oc43}.patch fi + has_version '>=dev-ml/tyxml-4' && epatch "${FILESDIR}/tyxml4.patch" } src_compile() { diff --git a/dev-ml/eliom/files/tyxml4.patch b/dev-ml/eliom/files/tyxml4.patch new file mode 100644 index 000000000000..bf749e4f3ad0 --- /dev/null +++ b/dev-ml/eliom/files/tyxml4.patch @@ -0,0 +1,1642 @@ +Index: eliom-5.0.0/src/lib/eliom_content.client.mli +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_content.client.mli ++++ eliom-5.0.0/src/lib/eliom_content.client.mli +@@ -292,7 +292,7 @@ module Html5 : sig + See {% <> %} *) + + (** Cf. {% <> %}. *) +- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -313,7 +313,7 @@ module Html5 : sig + See {% <> %} *) + + (** Cf. {% <> %}. *) +- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -352,7 +352,7 @@ module Html5 : sig + val filter_attrib : 'a attrib -> bool React.signal -> 'a attrib + + (** Cf. {% <> %}. *) +- module Raw : Html5_sigs.Make(Eliom_content_core.Xml_wed)(Svg.R.Raw).T ++ module Raw : Html_sigs.Make(Eliom_content_core.Xml_wed)(Svg.R.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +Index: eliom-5.0.0/src/lib/eliom_content.server.mli +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_content.server.mli ++++ eliom-5.0.0/src/lib/eliom_content.server.mli +@@ -309,7 +309,7 @@ module Html5 : sig + {{:http://ocsigen.org/howto/forms/}"how to make forms"} *) + + (** See {% <> %}. *) +- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -337,7 +337,7 @@ module Html5 : sig + {{:http://ocsigen.org/howto/forms/}"how to make forms"} *) + + (** See {% <> %}. *) +- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -406,7 +406,7 @@ module Html5 : sig + {% <> %}. *) + module R : sig + +- include Html5_sigs.Make(Xml_shared)(Svg.R.Raw).T ++ include Html_sigs.Make(Xml_shared)(Svg.R.Raw).T + with type 'a elt = 'a elt + and type 'a attrib = 'a attrib + +@@ -414,7 +414,7 @@ module Html5 : sig + [\[> Html5_types.span\] elt] + out of the string signal [s]. *) + val pcdata : +- string Eliom_shared.React.S.t -> [> Html5_types.span] elt ++ string Eliom_shared.React.S.t -> [> Html_types.span] elt + + (** [node s] produces an ['a elt] out of the shared reactive + signal [s]. *) +Index: eliom-5.0.0/src/lib/eliom_content_core.client.ml +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_content_core.client.ml ++++ eliom-5.0.0/src/lib/eliom_content_core.client.ml +@@ -175,7 +175,7 @@ end + + module Xml_wed = + struct +- module W = Tyxml_js.Xml_wrap ++ module W = Tyxml_js.Wrap + type 'a wrap = 'a W.t + type 'a list_wrap = 'a W.tlist + type uri = Xml.uri +@@ -188,7 +188,7 @@ struct + type attrib = Xml.attrib + + let float_attrib name s : attrib = +- name, Xml.RAReact (Tyxml_js.Xml_wrap.fmap (fun f -> Some (Xml.AFloat f)) s) ++ name, Xml.RAReact (Tyxml_js.Wrap.fmap (fun f -> Some (Xml.AFloat f)) s) + let int_attrib name s = + name, Xml.RAReact (React.S.map (fun f -> Some (Xml.AInt f)) s) + let string_attrib name s = +@@ -320,7 +320,7 @@ module Html5 = struct + let lazy_node ?(a = []) name children = + make (Node (name, a, Eliom_lazy.force children)) + end +- module Raw = Html5_f.Make(Xml')(Svg.D.Raw) ++ module Raw = Html_f.Make(Xml')(Svg.D.Raw) + + include Raw + +@@ -340,7 +340,7 @@ module Html5 = struct + + let node s = Xml.make_react s + +- module Raw = Html5_f.Make(Xml_wed)(Svg.R) ++ module Raw = Html_f.Make(Xml_wed)(Svg.R) + let filter_attrib (name,a) on = + let v = match a with + | Xml.RA a -> Xml.RAReact (React.S.map (function +@@ -365,7 +365,7 @@ module Html5 = struct + module F = struct + + module Xml' = Xml +- module Raw = Html5_f.Make(Xml')(Svg.F.Raw) ++ module Raw = Html_f.Make(Xml')(Svg.F.Raw) + include Raw + + type ('a, 'b, 'c) lazy_star = +Index: eliom-5.0.0/src/lib/eliom_content_core.client.mli +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_content_core.client.mli ++++ eliom-5.0.0/src/lib/eliom_content_core.client.mli +@@ -22,7 +22,10 @@ + + module Xml : sig + +- module W : Xml_wrap.T with type 'a t = 'a and type 'a tlist = 'a list ++ module W : Xml_wrap.T ++ with type 'a t = 'a ++ and type 'a tlist = 'a list ++ and type (-'a, 'b) ft = 'a -> 'b + + type uri = string + val uri_of_string : uri -> string +@@ -153,7 +156,7 @@ end + + module Xml_wed : sig + +- include Xml_sigs.T with module W = Tyxml_js.Xml_wrap ++ include Xml_sigs.T with module W = Tyxml_js.Wrap + and type elt = Xml.elt + and type aname = Xml.aname + and type attrib = Xml.attrib +@@ -281,7 +284,7 @@ module Html5 : sig + See {% <> %}. *) + module F : sig + +- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -293,7 +296,7 @@ module Html5 : sig + ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt + + val lazy_form: +- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star ++ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star + + end + +@@ -302,7 +305,7 @@ module Html5 : sig + {% <> %}. *) + module D: sig + +- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -313,7 +316,7 @@ module Html5 : sig + ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt + + val lazy_form: +- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star ++ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star + + end + +@@ -332,7 +335,7 @@ module Html5 : sig + + val filter_attrib : 'a attrib -> bool React.signal -> 'a attrib + +- module Raw : Html5_sigs.Make(Xml_wed)(Svg.R.Raw).T ++ module Raw : Html_sigs.Make(Xml_wed)(Svg.R.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +Index: eliom-5.0.0/src/lib/eliom_content_core.server.ml +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_content_core.server.ml ++++ eliom-5.0.0/src/lib/eliom_content_core.server.ml +@@ -289,8 +289,7 @@ module Svg = struct + module Make + (Xml : Xml_sigs.T with type elt = Xml.elt + and type attrib = Xml.attrib) +- (C : Svg_sigs.Wrapped_functions +- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) = ++ (C : Svg_sigs.Wrapped_functions with module Xml = Xml) = + Svg_f.Make_with_wrapped_functions(Xml)(C) + + type +'a elt = 'a F.elt +@@ -341,7 +340,7 @@ module Html5 = struct + + end + +- module Raw = Html5_f.Make(Xml')(Svg.D.Raw) ++ module Raw = Html_f.Make(Xml')(Svg.D.Raw) + let client_attrib ?init (x : 'a Raw.attrib Eliom_lib.client_value) = + Xml.client_attrib ?init x + +@@ -359,7 +358,7 @@ module Html5 = struct + module F = struct + + module Xml' = Xml +- module Raw = Html5_f.Make(Xml')(Svg.F.Raw) ++ module Raw = Html_f.Make(Xml')(Svg.F.Raw) + include Raw + + type ('a, 'b, 'c) lazy_star = +@@ -376,10 +375,9 @@ module Html5 = struct + (Xml : Xml_sigs.T + with type elt = Xml.elt + and type attrib = Xml.attrib) +- (C : Html5_sigs.Wrapped_functions +- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) ++ (C : Html_sigs.Wrapped_functions with module Xml = Xml) + (Svg : Svg_sigs.T with module Xml := Xml) = +- Html5_f.Make_with_wrapped_functions(Xml)(C)(Svg) ++ Html_f.Make_with_wrapped_functions(Xml)(C)(Svg) + + type +'a elt = 'a F.elt + type 'a wrap = 'a +Index: eliom-5.0.0/src/lib/eliom_content_core.server.mli +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_content_core.server.mli ++++ eliom-5.0.0/src/lib/eliom_content_core.server.mli +@@ -116,8 +116,7 @@ module Svg : sig + (Xml : Xml_sigs.T + with type elt = Xml.elt + and type attrib = Xml.attrib) +- (C : Svg_sigs.Wrapped_functions +- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) : ++ (C : Svg_sigs.Wrapped_functions with module Xml = Xml) : + Svg_sigs.Make(Xml).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib +@@ -156,7 +155,7 @@ module Html5 : sig + + module F : sig + +- module Raw : Html5_sigs.Make(Xml)(Svg.F.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.F.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -167,12 +166,12 @@ module Html5 : sig + ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt + + val lazy_form: +- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star ++ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star + end + + module D : sig + +- module Raw : Html5_sigs.Make(Xml)(Svg.D.Raw).T ++ module Raw : Html_sigs.Make(Xml)(Svg.D.Raw).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +@@ -185,7 +184,7 @@ module Html5 : sig + ?a: (('a attrib) list) -> ('b elt) list Eliom_lazy.request -> 'c elt + + val lazy_form: +- ([< Html5_types.form_attrib ], [< Html5_types.form_content_fun ], [> Html5_types.form ]) lazy_star ++ ([< Html_types.form_attrib ], [< Html_types.form_content_fun ], [> Html_types.form ]) lazy_star + + end + +@@ -193,10 +192,9 @@ module Html5 : sig + (Xml : Xml_sigs.T + with type elt = Xml.elt + and type attrib = Xml.attrib) +- (C : Html5_sigs.Wrapped_functions +- with type ('a, 'b) ft = ('a, 'b) Xml.W.ft) ++ (C : Html_sigs.Wrapped_functions with module Xml = Xml) + (Svg : Svg_sigs.T with module Xml := Xml) : +- Html5_sigs.Make(Xml)(Svg).T ++ Html_sigs.Make(Xml)(Svg).T + with type +'a elt = 'a elt + and type +'a attrib = 'a attrib + +Index: eliom-5.0.0/src/lib/eliom_content_sigs.shared.mli +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_content_sigs.shared.mli ++++ eliom-5.0.0/src/lib/eliom_content_sigs.shared.mli +@@ -31,9 +31,9 @@ module type LINKS_AND_FORMS = sig + 'c elt + + val lazy_form: +- ([< Html5_types.form_attrib ], +- [< Html5_types.form_content_fun ], +- [> Html5_types.form ]) lazy_star ++ ([< Html_types.form_attrib ], ++ [< Html_types.form_content_fun ], ++ [> Html_types.form ]) lazy_star + + include Eliom_form_sigs.LINKS + with type +'a elt := 'a elt +Index: eliom-5.0.0/src/lib/eliom_form.eliom +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_form.eliom ++++ eliom-5.0.0/src/lib/eliom_form.eliom +@@ -21,7 +21,7 @@ + {shared{ + module type Html5 = sig + +- include Html5_sigs.T ++ include Html_sigs.T + with type 'a Xml.W.t = 'a + and type 'a Xml.W.tlist = 'a list + and type Xml.mouse_event_handler = +@@ -33,9 +33,9 @@ module type Html5 = sig + 'c elt + + val lazy_form: +- ([< Html5_types.form_attrib ], +- [< Html5_types.form_content_fun ], +- [> Html5_types.form ]) lazy_star ++ ([< Html_types.form_attrib ], ++ [< Html_types.form_content_fun ], ++ [> Html_types.form ]) lazy_star + + val uri_of_fun : (unit -> string) -> Xml.uri + +@@ -44,7 +44,7 @@ module type Html5 = sig + ([ `A | `Form_get | `Form_post] * + (bool * string list) option * + string option) option Eliom_lazy.request -> +- Html5_types.form_attrib attrib ++ Html_types.form_attrib attrib + + end + +@@ -174,7 +174,7 @@ module Make (Html5 : Html5) = struct + | None -> a + | Some src -> a_src src :: a + in +- let a = if checked then a_checked `Checked :: a else a in ++ let a = if checked then a_checked () :: a else a in + let a = a_input_type typ :: a in + input ~a () + +@@ -194,7 +194,7 @@ module Make (Html5 : Html5) = struct + textarea ~a (pcdata value) + + let make_select ?(a = []) ~multiple ~name elt elts = +- let a = if multiple then a_multiple `Multiple :: a else a in ++ let a = if multiple then a_multiple () :: a else a in + let a = a_name name :: a in + select ~a (elt :: elts) + +@@ -203,7 +203,7 @@ module Make (Html5 : Html5) = struct + | None -> a + | Some v -> a_text_value v :: a + in +- let a = if selected then a_selected `Selected :: a else a in ++ let a = if selected then a_selected () :: a else a in + option ~a c + + let make_optgroup ?(a = []) ~label elt elts = +@@ -364,7 +364,7 @@ module Make (Html5 : Html5) = struct + + let string_radio_required ?a ?checked ~name ~value () = + let a = +- let required = Html5.a_required `Required in ++ let required = Html5.a_required () in + match a with + | None -> [required] + | Some a -> required :: a +@@ -385,14 +385,14 @@ module Make (Html5 : Html5) = struct + make_textarea ?a ~name:(Eliom_parameter.string_of_param_name name) + + type 'a soption = +- Html5_types.option_attrib attrib list ++ Html_types.option_attrib attrib list + * 'a (* Content (or value if the following is present) *) +- * Html5_types.pcdata elt option (* if content different from value *) ++ * Html_types.pcdata elt option (* if content different from value *) + * bool (* selected *) + + type 'a select_opt = + | Optgroup of +- [ Html5_types.common | `Disabled ] attrib list ++ [ Html_types.common | `Disabled ] attrib list + * string (* label *) + * 'a soption + * 'a soption list +@@ -404,7 +404,7 @@ module Make (Html5 : Html5) = struct + let a = match required with + | None -> a + | Some _ -> +- let required = Html5.a_required `Required in ++ let required = Html5.a_required () in + match a with + | Some a -> Some (required :: a) + | None -> Some [required] +Index: eliom-5.0.0/src/lib/eliom_form.eliomi +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_form.eliomi ++++ eliom-5.0.0/src/lib/eliom_form.eliomi +@@ -22,7 +22,7 @@ + + module type Html5 = sig + +- include Html5_sigs.T ++ include Html_sigs.T + with type 'a Xml.W.t = 'a + and type 'a Xml.W.tlist = 'a list + and type Xml.mouse_event_handler = +@@ -34,9 +34,9 @@ module type Html5 = sig + 'c elt + + val lazy_form : +- ([< Html5_types.form_attrib ], +- [< Html5_types.form_content_fun ], +- [> Html5_types.form ]) lazy_star ++ ([< Html_types.form_attrib ], ++ [< Html_types.form_content_fun ], ++ [> Html_types.form ]) lazy_star + + val uri_of_fun : (unit -> string) -> Xml.uri + +@@ -45,7 +45,7 @@ module type Html5 = sig + ([ `A | `Form_get | `Form_post] * + (bool * string list) option * + string option) option Eliom_lazy.request -> +- Html5_types.form_attrib attrib ++ Html_types.form_attrib attrib + + end + +Index: eliom-5.0.0/src/lib/eliom_form_sigs.shared.mli +=================================================================== +--- eliom-5.0.0.orig/src/lib/eliom_form_sigs.shared.mli ++++ eliom-5.0.0/src/lib/eliom_form_sigs.shared.mli +@@ -136,8 +136,8 @@ module type LINKS = sig + The optional parameter [~a] allows one to add extra HTML + attributes to the generated node. *) + val css_link : +- ?a:Html5_types.link_attrib attrib list -> +- uri:uri -> unit -> [> Html5_types.link] elt ++ ?a:Html_types.link_attrib attrib list -> ++ uri:uri -> unit -> [> Html_types.link] elt + + (** The function [js_script ~uri ()] creates a [