pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/eliom No substantive changes, but a lot of patches...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/92a5cd7c627a
branches:  trunk
changeset: 367942:92a5cd7c627a
user:      jaapb <jaapb%pkgsrc.org@localhost>
date:      Fri Sep 08 17:14:34 2017 +0000

description:
No substantive changes, but a lot of patches to make package work with
ocaml-lwt 3 and js_of_ocaml 3. These are all in the upstream github, so
should be removed with the next release.

diffstat:

 www/eliom/Makefile                                         |    5 +-
 www/eliom/distinfo                                         |    9 +-
 www/eliom/patches/patch-pkg_META                           |   48 ++++
 www/eliom/patches/patch-src__tags                          |   45 ++++
 www/eliom/patches/patch-src_lib_eliom_content_.client.ml   |   15 +
 www/eliom/patches/patch-src_lib_eliom_request.client.ml    |  146 +++++++++++++
 www/eliom/patches/patch-src_lib_eliom_request.client.mli   |   13 +
 www/eliom/patches/patch-src_ocamlbuild_ocamlbuild_eliom.ml |   26 ++
 www/eliom/patches/patch-src_tools_utils.ml                 |   26 ++
 9 files changed, 330 insertions(+), 3 deletions(-)

diffs (truncated from 389 to 300 lines):

diff -r c18a30c34f05 -r 92a5cd7c627a www/eliom/Makefile
--- a/www/eliom/Makefile        Fri Sep 08 17:11:07 2017 +0000
+++ b/www/eliom/Makefile        Fri Sep 08 17:14:34 2017 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.17 2017/07/11 14:19:23 jaapb Exp $
+# $NetBSD: Makefile,v 1.18 2017/09/08 17:14:34 jaapb Exp $
 #
 
 GITHUB_PROJECT=        eliom
 DISTNAME=      ${GITHUB_PROJECT}-6.2.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=ocsigen/}
 
@@ -19,6 +19,7 @@
 DEPENDS+=      ocsigen>=2.8:../../www/ocsigen
 DEPENDS+=      ocaml-deriving-ocsigen>=0.7.1:../../devel/ocaml-deriving-ocsigen
 
+
 .include "../../mk/ocaml.mk"
 
 .if ${OCAML_USE_OPT_COMPILER} == "yes"
diff -r c18a30c34f05 -r 92a5cd7c627a www/eliom/distinfo
--- a/www/eliom/distinfo        Fri Sep 08 17:11:07 2017 +0000
+++ b/www/eliom/distinfo        Fri Sep 08 17:14:34 2017 +0000
@@ -1,7 +1,14 @@
-$NetBSD: distinfo,v 1.7 2017/04/28 07:56:53 jaapb Exp $
+$NetBSD: distinfo,v 1.8 2017/09/08 17:14:34 jaapb Exp $
 
 SHA1 (eliom-6.2.0.tar.gz) = 652dacef947524975efc63253fb806be45a750c3
 RMD160 (eliom-6.2.0.tar.gz) = 1a1b21495cac93c2ad7f207fdd6ad4df819c6600
 SHA512 (eliom-6.2.0.tar.gz) = 02ea52c78470f222297dd9f82218e82427ea2d2d0c9f261d1a9c2decbe7644c0bf583b77b8cef2577d5662d363efd276755f400e7a4c29c89a2265e49ca850db
 Size (eliom-6.2.0.tar.gz) = 724359 bytes
+SHA1 (patch-pkg_META) = 2953bf2e069f171d9b70dec3b985c2f864e29361
 SHA1 (patch-pkg_build.ml) = 8597e17fc869b7a8e93ee30f551a92c694617dbc
+SHA1 (patch-src__tags) = 5058021a43761fff5ce91f26c8fd854014e1e051
+SHA1 (patch-src_lib_eliom_content_.client.ml) = fc7896b38b4719518c6c928949b8713da50026a9
+SHA1 (patch-src_lib_eliom_request.client.ml) = 1d9dbe87011bb05267bce4c2a8993e89484aba8a
+SHA1 (patch-src_lib_eliom_request.client.mli) = 72e9a6c2b59ee2944e0647202782dce38c661c31
+SHA1 (patch-src_ocamlbuild_ocamlbuild_eliom.ml) = c774f7d2a091f7f00e4f1793ee52fd4860f440ea
+SHA1 (patch-src_tools_utils.ml) = fb59916f46fa1d2f99284f0ea24e138a3f116eb0
diff -r c18a30c34f05 -r 92a5cd7c627a www/eliom/patches/patch-pkg_META
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/eliom/patches/patch-pkg_META  Fri Sep 08 17:14:34 2017 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-pkg_META,v 1.1 2017/09/08 17:14:34 jaapb Exp $
+
+Use correct packages for ocaml-lwt 3 and js_of_ocaml 3
+--- pkg/META.orig      2017-02-07 15:42:18.000000000 +0000
++++ pkg/META
+@@ -13,7 +13,7 @@ package "server" (
+               react,
+               reactiveData,
+               tyxml,
+-              lwt.react,
++              lwt_react,
+               cryptokit,
+               reactiveData"
+   archive(byte) = "server.cma"
+@@ -46,17 +46,18 @@ package "client" (
+               ppx_deriving.runtime,
+               js_of_ocaml,
+               js_of_ocaml.deriving,
+-              js_of_ocaml.tyxml,
+-              js_of_ocaml.log,
++              js_of_ocaml-tyxml,
++              js_of_ocaml-lwt,
++              js_of_ocaml-lwt.logger,
+               js_of_ocaml.weak,
+-              lwt.react,
++              lwt_react,
+               react,
+               reactiveData,
+               tyxml.functor"
+   archive(byte) = "client.cma eliom_client_main.cmo"
+ 
+   linkopts(javascript) = "+eliom.client/eliom_client.js"
+-  linkopts(javascript) += "+js_of_ocaml/classlist.js"
++  linkopts(javascript) += "+js_of_ocaml-compiler/classlist.js"
+ )
+ 
+ package "syntax" (
+@@ -98,8 +99,8 @@ package "syntax" (
+     description = "Syntax extension: predefined commonly use syntaxes"
+     version = "[distributed with Eliom]"
+ 
+-    requires(syntax, preprocessor) = "js_of_ocaml.syntax,js_of_ocaml.deriving.syntax,lwt.syntax,tyxml.syntax"
+-    requires(syntax, toploop) = "js_of_ocaml.syntax,js_of_ocaml.deriving.syntax,lwt.syntax,tyxml.syntax"
++    requires(syntax, preprocessor) = "js_of_ocaml.syntax,js_of_ocaml-camlp4.deriving,lwt.syntax,tyxml.syntax"
++    requires(syntax, toploop) = "js_of_ocaml.syntax,js_of_ocaml-camlp4.deriving,lwt.syntax,tyxml.syntax"
+     archive(syntax, preprocessor) = "-ignore dummy"
+   )
+ 
diff -r c18a30c34f05 -r 92a5cd7c627a www/eliom/patches/patch-src__tags
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/eliom/patches/patch-src__tags Fri Sep 08 17:14:34 2017 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-src__tags,v 1.1 2017/09/08 17:14:34 jaapb Exp $
+
+Use correct packages for ocaml-lwt 3 and js_of_ocaml 3
+--- src/_tags.orig     2017-02-07 15:42:18.000000000 +0000
++++ src/_tags
+@@ -2,32 +2,32 @@
+ true:keep_locs
+ 
+ <lib/type_dir/*.ml{,i}>:eliom_ppx,thread
+-<lib/type_dir/*.ml>:package(js_of_ocaml.deriving.ppx,lwt.ppx)
++<lib/type_dir/*.ml>:package(js_of_ocaml-ppx.deriving,lwt.ppx)
+ <lib/type_dir/*.ml>:package(js_of_ocaml.ppx)
+ 
+ <lib/server/*.ml{,i}>:eliom_ppx
+-<lib/server/*.ml>:package(js_of_ocaml.deriving.ppx,lwt.ppx)
++<lib/server/*.ml>:package(js_of_ocaml-ppx.deriving,lwt.ppx)
+ <lib/server/*.ml>:package(js_of_ocaml.ppx)
+ 
+ <lib/server/*.ml{,i}>:thread
+ <lib/server/*.ml{,i}>:package(lwt,ocsigenserver,ocsigenserver.ext,tyxml.functor)
+-<lib/server/*.ml{,i}>:package(react,js_of_ocaml)
++<lib/server/*.ml{,i}>:package(react,lwt_react,js_of_ocaml)
+ 
+-<lib/server/*.ml{,i}>:package(js_of_ocaml.deriving.ppx)
++<lib/server/*.ml{,i}>:package(js_of_ocaml-ppx.deriving)
+ 
+ <lib/*.eliom{,i}>:eliom_ppx
+ 
+ <lib/*.ml{,i}>:eliom_ppx
+-<lib/client/*.ml>:package(js_of_ocaml.deriving.ppx,lwt.ppx,js_of_ocaml.log)
++<lib/client/*.ml>:package(js_of_ocaml-ppx.deriving,lwt.ppx,js_of_ocaml-lwt.logger)
+ <lib/client/*.ml>:package(js_of_ocaml.ppx)
+ 
+ <lib/client/*.ml{,i}>: eliom_ppx
+ <lib/client/*.ml{,i}>:package(ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base)
+ <lib/client/*.ml{,i}>:package(deriving.runtime,js_of_ocaml.deriving)
+-<lib/client/*.ml{,i}>:package(lwt.react,tyxml.functor,js_of_ocaml.tyxml)
++<lib/client/*.ml{,i}>:package(lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger)
+ <lib/client/*.ml{,i}>:package(react,js_of_ocaml,reactiveData)
+ 
+-<lib/client/*.ml{,i}>:package(js_of_ocaml.deriving.ppx)
++<lib/client/*.ml{,i}>:package(js_of_ocaml-ppx.deriving)
+ 
+ <lib/server/monitor/*.ml>:package(lwt.ppx)
+ <lib/server/monitor/*.ml{,i}>:thread
diff -r c18a30c34f05 -r 92a5cd7c627a www/eliom/patches/patch-src_lib_eliom_content_.client.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/eliom/patches/patch-src_lib_eliom_content_.client.ml  Fri Sep 08 17:14:34 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_lib_eliom_content_.client.ml,v 1.1 2017/09/08 17:14:34 jaapb Exp $
+
+Keycode does not exist any longer
+--- src/lib/eliom_content_.client.ml.orig      2017-02-07 15:42:18.000000000 +0000
++++ src/lib/eliom_content_.client.ml
+@@ -573,8 +573,7 @@ module Html = struct
+         elt##.onscroll := (bool_cb f)
+       let onreturn elt f =
+         let f ev =
+-          let key = ev##.keyCode in
+-          if key = Keycode.return then f ev;
++          if Dom_html.Keyboard_code.(of_event ev = Enter) then f ev;
+           true in
+         onkeydown elt f
+       let onchange elt f =
diff -r c18a30c34f05 -r 92a5cd7c627a www/eliom/patches/patch-src_lib_eliom_request.client.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/eliom/patches/patch-src_lib_eliom_request.client.ml   Fri Sep 08 17:14:34 2017 +0000
@@ -0,0 +1,146 @@
+$NetBSD: patch-src_lib_eliom_request.client.ml,v 1.1 2017/09/08 17:14:34 jaapb Exp $
+
+XmlHttpRequest changed
+--- src/lib/eliom_request.client.ml.orig       2017-02-07 15:42:18.000000000 +0000
++++ src/lib/eliom_request.client.ml
+@@ -24,6 +24,8 @@ exception Failed_request of int
+ exception Program_terminated
+ exception Non_xml_content
+ 
++module XmlHttpRequest = Js_of_ocaml_lwt.XmlHttpRequest
++
+ let section = Lwt_log.Section.make "eliom:request"
+ (* == ... *)
+ 
+@@ -97,9 +99,6 @@ let redirect_post url params =
+   (* firefox accepts submit only on forms in the document *)
+   f##submit
+ 
+-let redirect_post_form_elt ?(post_args=[]) ?(form_arg=[]) url =
+-  redirect_post url (form_arg@post_args)
+-
+ (* Forms cannot use PUT http method: do not redirect *)
+ let redirect_put _url _params =
+   Lwt_log.raise_error ~section "redirect_put not implemented"
+@@ -129,10 +128,10 @@ let nl_template_string = "__nl_n_eliom-t
+ let send
+     ?with_credentials
+     ?(expecting_process_page = false) ?cookies_info
+-    ?get_args ?post_args ?form_arg
++    ?get_args ?post_args
+     ?progress ?upload_progress ?override_mime_type
+     url result =
+-  let rec aux i ?cookies_info ?(get_args=[]) ?post_args ?form_arg url =
++  let rec aux i ?cookies_info ?(get_args=[]) ?post_args url =
+     let (https, path) = match cookies_info with
+       | Some c -> c
+       (* CCC Is it really necessary to allow to specify cookie_info here?
+@@ -205,14 +204,6 @@ let send
+       then (Eliom_common.nl_get_appl_parameter, "true")::get_args
+       else get_args
+     in
+-    let form_contents =
+-      match form_arg with
+-        | None -> None
+-        | Some form_arg ->
+-          let contents = Form.empty_form_contents () in
+-          List.iter (Form.append contents) form_arg;
+-          Some contents
+-    in
+     let check_headers code headers =
+       if expecting_process_page
+       then
+@@ -224,10 +215,18 @@ let send
+       else true
+     in
+     try%lwt
+-      let%lwt r = XmlHttpRequest.perform_raw_url
++      let%lwt r =
++        let contents =
++                match post_args with
++                | Some post_args ->
++                                Some (`POST_form post_args)
++                | None ->
++                                None
++        in
++        XmlHttpRequest.perform_raw_url
+           ?with_credentials
+           ?headers:(Some headers) ?content_type:None
+-          ?post_args ~get_args ?form_arg:form_contents ~check_headers
++          ?contents ~get_args ~check_headers
+           ?progress ?upload_progress ?override_mime_type url
+       in
+       (if Js.Unsafe.global##.___eliom_use_cookie_substitutes_ <> Js.undefined
+@@ -255,9 +254,10 @@ let send
+              with
+                | None | Some "" -> Lwt.return (r.XmlHttpRequest.url, None)
+                | Some uri ->
+-                 (match post_args, form_arg with
+-                   | None, None -> redirect_get uri
+-                   | _, _ -> redirect_post_form_elt ?post_args ?form_arg url);
++                               redirect_post url
++                               (match post_args with
++                               | Some post_args -> post_args
++                               | None -> []);
+                  Lwt.fail Program_terminated)
+           | Some uri ->
+             if i < max_redirection_level
+@@ -288,9 +288,9 @@ let send
+            us that the answer is not application content *)
+         match headers Eliom_common.appl_name_header_name with
+           | None | Some "" -> (* Empty appl_name for IE compat. *)
+-            (match post_args, form_arg with
+-              | None, None -> redirect_get url
+-              | _, _ -> Lwt_log.raise_error ~section  "can't silently redirect a Post request to non application content");
++                          (match post_args with
++                          | None -> redirect_get url
++                          | _ -> Lwt_log.raise_error ~section "can't silently redirect a Post request to non application content");
+             Lwt.fail Program_terminated
+           | Some appl_name ->
+             let current_appl_name = Eliom_process.get_application_name () in
+@@ -305,7 +305,7 @@ let send
+                 Lwt.fail (Failed_request code)
+               end
+   in
+-  let%lwt (url, content) = aux 0 ?cookies_info ?get_args ?post_args ?form_arg url in
++  let%lwt (url, content) = aux 0 ?cookies_info ?get_args ?post_args url in
+   let filter_url url =
+     { url with Url.hu_arguments =
+         List.filter (fun (e,_) -> e <> nl_template_string) url.Url.hu_arguments } in
+@@ -341,7 +341,6 @@ let add_button_arg inj args form =
+         else args
+ (* END FORMDATA HACK *)
+ 
+-
+ (** Send a GET form with tab cookies and half/full XHR.
+     If [~post_params] is present, the HTTP method will be POST,
+     with form data in the URL.
+@@ -368,12 +367,26 @@ let send_post_form
+     ?progress ?upload_progress ?override_mime_type
+     form url =
+   (* BEGIN FORMDATA HACK *)
+-  let post_args = add_button_arg (fun x -> `String x) post_args form in
++            let post_args =
++                    match
++                    add_button_arg (fun x -> `String x)
++                    (Some (Form.form_elements form))
++                    form,
++                    post_args
++                    with
++                    | Some l, Some l' ->
++                                    Some (l @ l')
++                    | Some l, _
++                    | _, Some l ->
++                                    Some l



Home | Main Index | Thread Index | Old Index