pkgsrc-Changes archive

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

CVS commit: pkgsrc/www/eliom



Module Name:    pkgsrc
Committed By:   jaapb
Date:           Fri Sep  8 17:14:34 UTC 2017

Modified Files:
        pkgsrc/www/eliom: Makefile distinfo
Added Files:
        pkgsrc/www/eliom/patches: patch-pkg_META patch-src__tags
            patch-src_lib_eliom_content_.client.ml
            patch-src_lib_eliom_request.client.ml
            patch-src_lib_eliom_request.client.mli
            patch-src_ocamlbuild_ocamlbuild_eliom.ml patch-src_tools_utils.ml

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/www/eliom/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/www/eliom/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/eliom/patches/patch-pkg_META \
    pkgsrc/www/eliom/patches/patch-src__tags \
    pkgsrc/www/eliom/patches/patch-src_lib_eliom_content_.client.ml \
    pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.ml \
    pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.mli \
    pkgsrc/www/eliom/patches/patch-src_ocamlbuild_ocamlbuild_eliom.ml \
    pkgsrc/www/eliom/patches/patch-src_tools_utils.ml

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/eliom/Makefile
diff -u pkgsrc/www/eliom/Makefile:1.17 pkgsrc/www/eliom/Makefile:1.18
--- pkgsrc/www/eliom/Makefile:1.17      Tue Jul 11 14:19:23 2017
+++ pkgsrc/www/eliom/Makefile   Fri Sep  8 17:14:34 2017
@@ -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 @@ OCAML_USE_FINDLIB=    yes
 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"

Index: pkgsrc/www/eliom/distinfo
diff -u pkgsrc/www/eliom/distinfo:1.7 pkgsrc/www/eliom/distinfo:1.8
--- pkgsrc/www/eliom/distinfo:1.7       Fri Apr 28 07:56:53 2017
+++ pkgsrc/www/eliom/distinfo   Fri Sep  8 17:14:34 2017
@@ -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

Added files:

Index: pkgsrc/www/eliom/patches/patch-pkg_META
diff -u /dev/null pkgsrc/www/eliom/patches/patch-pkg_META:1.1
--- /dev/null   Fri Sep  8 17:14:34 2017
+++ pkgsrc/www/eliom/patches/patch-pkg_META     Fri Sep  8 17:14:34 2017
@@ -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"
+   )
+ 
Index: pkgsrc/www/eliom/patches/patch-src__tags
diff -u /dev/null pkgsrc/www/eliom/patches/patch-src__tags:1.1
--- /dev/null   Fri Sep  8 17:14:34 2017
+++ pkgsrc/www/eliom/patches/patch-src__tags    Fri Sep  8 17:14:34 2017
@@ -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
Index: pkgsrc/www/eliom/patches/patch-src_lib_eliom_content_.client.ml
diff -u /dev/null pkgsrc/www/eliom/patches/patch-src_lib_eliom_content_.client.ml:1.1
--- /dev/null   Fri Sep  8 17:14:34 2017
+++ pkgsrc/www/eliom/patches/patch-src_lib_eliom_content_.client.ml     Fri Sep  8 17:14:34 2017
@@ -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 =
Index: pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.ml
diff -u /dev/null pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.ml:1.1
--- /dev/null   Fri Sep  8 17:14:34 2017
+++ pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.ml      Fri Sep  8 17:14:34 2017
@@ -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
++                    | None, None ->
++                                    None
++            in
+   (* END FORMDATA HACK *)
+   send ?with_credentials
+     ?expecting_process_page ?cookies_info ?get_args ?post_args
+     ?progress ?upload_progress ?override_mime_type
+-    ~form_arg:(Form.form_elements form) url
++    url
+ 
+ let http_get ?with_credentials ?expecting_process_page ?cookies_info
+     ?progress ?upload_progress ?override_mime_type
Index: pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.mli
diff -u /dev/null pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.mli:1.1
--- /dev/null   Fri Sep  8 17:14:34 2017
+++ pkgsrc/www/eliom/patches/patch-src_lib_eliom_request.client.mli     Fri Sep  8 17:14:34 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_lib_eliom_request.client.mli,v 1.1 2017/09/08 17:14:34 jaapb Exp $
+
+XmlHttpRequest changed
+--- src/lib/eliom_request.client.mli.orig      2017-02-07 15:42:18.000000000 +0000
++++ src/lib/eliom_request.client.mli
+@@ -38,7 +38,6 @@ val send :
+   ?cookies_info:bool * string list ->
+   ?get_args:(string * string) list ->
+   ?post_args:(string * Eliommod_parameters.param) list ->
+-  ?form_arg:((string * Form.form_elt) list) ->
+   ?progress:(int -> int -> unit) ->
+   ?upload_progress:(int -> int -> unit) ->
+   ?override_mime_type:string ->
Index: pkgsrc/www/eliom/patches/patch-src_ocamlbuild_ocamlbuild_eliom.ml
diff -u /dev/null pkgsrc/www/eliom/patches/patch-src_ocamlbuild_ocamlbuild_eliom.ml:1.1
--- /dev/null   Fri Sep  8 17:14:34 2017
+++ pkgsrc/www/eliom/patches/patch-src_ocamlbuild_ocamlbuild_eliom.ml   Fri Sep  8 17:14:34 2017
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_ocamlbuild_ocamlbuild_eliom.ml,v 1.1 2017/09/08 17:14:34 jaapb Exp $
+
+Changes for js_of_ocaml 3
+--- src/ocamlbuild/ocamlbuild_eliom.ml.orig    2017-02-07 15:42:18.000000000 +0000
++++ src/ocamlbuild/ocamlbuild_eliom.ml
+@@ -134,6 +134,10 @@ module MakeIntern (I : INTERNALS)(Eliom 
+     dflag ["ocaml"; "infer_interface"; file_tag] ppflags;
+     dflag ["ocaml"; "doc";             file_tag] ppflags_notype
+ 
++  let ocamlfind_query pkg =
++    let cmd = Printf.sprintf "ocamlfind query %s" (Filename.quote pkg) in
++    Ocamlbuild_pack.My_unix.run_and_open cmd input_line
++
+   let copy_rule_server ?(eliom=true) =
+     copy_rule_with_header
+       (fun env dir name src file ->
+@@ -143,6 +147,9 @@ module MakeIntern (I : INTERNALS)(Eliom 
+              :: get_syntaxes eliom `Server src
+            );
+          if eliom then flag_infer ~file ~name ~path `Server;
++         dflag ["ocaml"; "compile"; "file:" ^ file]
++           (S [A "-I";
++               A (ocamlfind_query "js_of_ocaml")]);
+          Pathname.define_context dir [path];
+          Pathname.define_context path [dir];
+       )
Index: pkgsrc/www/eliom/patches/patch-src_tools_utils.ml
diff -u /dev/null pkgsrc/www/eliom/patches/patch-src_tools_utils.ml:1.1
--- /dev/null   Fri Sep  8 17:14:34 2017
+++ pkgsrc/www/eliom/patches/patch-src_tools_utils.ml   Fri Sep  8 17:14:34 2017
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_tools_utils.ml,v 1.1 2017/09/08 17:14:34 jaapb Exp $
+
+Changes for js_of_ocaml 3
+--- src/tools/utils.ml.orig    2017-02-07 15:42:18.000000000 +0000
++++ src/tools/utils.ml
+@@ -265,7 +265,9 @@ let get_common_include ?kind:k ?build_di
+   let dir = match dir with Some d -> d | None -> !build_dir in
+   (match get_kind k with
+    | `Server | `ServerOpt ->
+-     map_include (List.map Findlib.package_directory (get_server_package ?kind:k ?package:p ()))
++     "js_of_ocaml" :: get_server_package ?kind:k ?package:p ()
++     |> List.map Findlib.package_directory
++     |> map_include
+    | `Client ->
+      map_include (List.map Findlib.package_directory (get_client_package ?kind:k ())))
+   @ match dir with
+@@ -298,8 +300,7 @@ let get_client_lib ?kind:k () =
+ let get_client_js () =
+   [
+     "+eliom.client/eliom_client.js" ;
+-    "+js_of_ocaml/weak.js";
+-    "+js_of_ocaml/classlist.js" (* ie9 support *)
++    "+js_of_ocaml-compiler/weak.js";
+   ]
+ 
+ (* Should be calld only with -dump... *)



Home | Main Index | Thread Index | Old Index