pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/ocsigen Updated www/ocsigen to version 2.9.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/87892d6149ff
branches:  trunk
changeset: 378685:87892d6149ff
user:      jaapb <jaapb%pkgsrc.org@localhost>
date:      Fri Apr 13 13:15:00 2018 +0000

description:
Updated www/ocsigen to version 2.9.

This release adds support for OCaml 4.06 and Lwt 3 (and 4), removes
support for Camlp4 and includes various other small improvements and
bugfixes.

diffstat:

 www/ocsigen/Makefile                                                 |   7 +-
 www/ocsigen/PLIST                                                    |  14 +-
 www/ocsigen/distinfo                                                 |  32 ++--
 www/ocsigen/options.mk                                               |   6 +-
 www/ocsigen/patches/patch-Makefile.options                           |  20 +-
 www/ocsigen/patches/patch-configure                                  |  33 ++-
 www/ocsigen/patches/patch-src_baselib_Makefile                       |  15 ++
 www/ocsigen/patches/patch-src_baselib_ocsigen__stream.ml             |  18 ++
 www/ocsigen/patches/patch-src_extensions_Makefile                    |  23 +-
 www/ocsigen/patches/patch-src_extensions_cgimod.ml                   |  46 ++++++
 www/ocsigen/patches/patch-src_extensions_ocsipersist-dbm_ocsidbm.ml  |  21 --
 www/ocsigen/patches/patch-src_extensions_ocsipersist-pgsql_Makefile  |  10 +-
 www/ocsigen/patches/patch-src_extensions_ocsipersist-sqlite_Makefile |  16 ++
 www/ocsigen/patches/patch-src_files_META.in                          |  23 ---
 www/ocsigen/patches/patch-src_http_Makefile                          |  17 +-
 www/ocsigen/patches/patch-src_http_ocsigen__http__com.mli            |  14 +
 www/ocsigen/patches/patch-src_server_Makefile                        |  14 +
 www/ocsigen/patches/patch-src_server_ocsigen__server.ml              |  21 ++
 www/ocsigen/patches/patch-src_server_ocsigen_server.ml               |  74 ----------
 www/ocsigen/patches/patch-src_server_ocsigen_socket.ml               |  64 --------
 www/ocsigen/patches/patch-src_server_ocsigen_socket.mli              |  14 -
 21 files changed, 231 insertions(+), 271 deletions(-)

diffs (truncated from 654 to 300 lines):

diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/Makefile
--- a/www/ocsigen/Makefile      Fri Apr 13 13:13:01 2018 +0000
+++ b/www/ocsigen/Makefile      Fri Apr 13 13:15:00 2018 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.29 2018/01/28 20:11:07 wiz Exp $
+# $NetBSD: Makefile,v 1.30 2018/04/13 13:15:00 jaapb Exp $
 #
 
-VERSION=       2.8
+VERSION=       2.9
 GITHUB_PROJECT=        ocsigenserver
-PKGREVISION=   5
 PKGNAME=       ocsigen-${VERSION}
 DISTNAME=      ${GITHUB_PROJECT}-${VERSION}
 CATEGORIES=    www
@@ -68,10 +67,10 @@
 
 .include "options.mk"
 .include "../../mk/pthread.buildlink3.mk"
+.include "../../devel/ocaml-lwt_log/buildlink3.mk"
 .include "../../devel/ocaml-lwt_react/buildlink3.mk"
 .include "../../devel/ocaml-lwt_ssl/buildlink3.mk"
 .include "../../devel/pcre-ocaml/buildlink3.mk"
-.include "../../lang/camlp4/buildlink3.mk"
 .include "../../net/ocaml-ipaddr/buildlink3.mk"
 .include "../../net/ocamlnet/buildlink3.mk"
 .include "../../security/ocaml-cryptokit/buildlink3.mk"
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/PLIST
--- a/www/ocsigen/PLIST Fri Apr 13 13:13:01 2018 +0000
+++ b/www/ocsigen/PLIST Fri Apr 13 13:15:00 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.9 2017/01/04 13:06:18 jaapb Exp $
+@comment $NetBSD: PLIST,v 1.10 2018/04/13 13:15:00 jaapb Exp $
 bin/ocsigenserver
 ${PLIST.ocaml-opt}bin/ocsigenserver.opt
 share/examples/ocsigen/ocsigenserver.conf
@@ -58,10 +58,10 @@
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsigen_comet.cmxs
 ${OCAML_SITELIB}/ocsigenserver/extensions/ocsigen_comet.mli
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsigen_comet.o
-${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.a
-${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.cma
-${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.cmxa
-${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.cmxs
+${PLIST.dbm}${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.a
+${PLIST.dbm}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.cma
+${PLIST.dbm}${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.cmxa
+${PLIST.dbm}${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-dbm.cmxs
 ${PLIST.pgsql}${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-pgsql.a
 ${PLIST.pgsql}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-pgsql.cma
 ${PLIST.pgsql}${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsipersist-pgsql.cmxa
@@ -177,8 +177,8 @@
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/userconf.cmxs
 ${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/userconf.o
 @comment ${OCAML_SITELIB}/ocsigenserver/dllocsigenserver.so
-${OCAML_SITELIB}/ocsigenserver/extensions/ocsidbm
-${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsidbm.opt
+${PLIST.dbm}${OCAML_SITELIB}/ocsigenserver/extensions/ocsidbm
+${PLIST.dbm}${PLIST.ocaml-opt}${OCAML_SITELIB}/ocsigenserver/extensions/ocsidbm.opt
 man/man1/ocsigenserver.1
 share/examples/ocsigen/mime.types
 share/ocsigen/www/index.html
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/distinfo
--- a/www/ocsigen/distinfo      Fri Apr 13 13:13:01 2018 +0000
+++ b/www/ocsigen/distinfo      Fri Apr 13 13:15:00 2018 +0000
@@ -1,17 +1,19 @@
-$NetBSD: distinfo,v 1.10 2017/09/08 17:10:46 jaapb Exp $
+$NetBSD: distinfo,v 1.11 2018/04/13 13:15:00 jaapb Exp $
 
-SHA1 (ocsigenserver-2.8.tar.gz) = 1043cd33b3e356a29957b95005edff0930c11be4
-RMD160 (ocsigenserver-2.8.tar.gz) = 729596c04091ed471b51ff7139359461ef883de9
-SHA512 (ocsigenserver-2.8.tar.gz) = 80d5125a93239c73756b03a0f50d83e691810f93a15525daef2f7ccd69279e348f03486c26319a9511c1a746f375317082a89ba37ce0ba22872d6db7d3fddf1b
-Size (ocsigenserver-2.8.tar.gz) = 1265240 bytes
+SHA1 (ocsigenserver-2.9.tar.gz) = 1b4d50c9b6fff3ab78c8aef3ebbde1f8ddcc594e
+RMD160 (ocsigenserver-2.9.tar.gz) = f5114a7bda3327e279f57f40336a7c23e19b66ce
+SHA512 (ocsigenserver-2.9.tar.gz) = b3c5a86785feac18bac677ebb3736705f5d015a8692d2811bf22009dc319636e8b7bbb54dfd0223b2040a8f8bdef5ca3336d903b5ecd7eb260e8c0d48946ee46
+Size (ocsigenserver-2.9.tar.gz) = 1265175 bytes
 SHA1 (patch-Makefile) = 637a45aacd7c8afaeb73be624eb7732b21e78b4d
-SHA1 (patch-Makefile.options) = 2a4e171d7be05411e28ada231b819901eb6c0fad
-SHA1 (patch-configure) = f7c97a277a30f828ccd41fdd00e0fa5d1d403022
-SHA1 (patch-src_extensions_Makefile) = 9715d890e08688023a98b596b72917ca08734b7c
-SHA1 (patch-src_extensions_ocsipersist-dbm_ocsidbm.ml) = cabdf3b511703186887108580697e7427a89658a
-SHA1 (patch-src_extensions_ocsipersist-pgsql_Makefile) = 9490a9d580142bbf9114d65396d54ac991b4ca7d
-SHA1 (patch-src_files_META.in) = bc90fa2f55e35e56922b741a94c1e1414571a9bc
-SHA1 (patch-src_http_Makefile) = 19f5620a710abffa479e364b1b48cbdc7cae7f5a
-SHA1 (patch-src_server_ocsigen_server.ml) = 0218d0878cd6c4654f6fccb4911889cb3bfe2e40
-SHA1 (patch-src_server_ocsigen_socket.ml) = a2f108c8355966f422f68541270d612e640a41b3
-SHA1 (patch-src_server_ocsigen_socket.mli) = 45a9d13b802322ccc3ce52eef0e6c5f704a9a62f
+SHA1 (patch-Makefile.options) = 6b59e2d20cc0a47c56a9b11cba56cd70d7dc9beb
+SHA1 (patch-configure) = 9b1c5c373e36169eb1b86daba0f9214845513082
+SHA1 (patch-src_baselib_Makefile) = e2fd5e5bd933d4ec844713c8f574efd5fa8426cf
+SHA1 (patch-src_baselib_ocsigen__stream.ml) = 6907fd8f7e0295f5147a0f2322cb1bec28f73953
+SHA1 (patch-src_extensions_Makefile) = 5f3af59550f5b576e39323b7cd1252ee70fd282b
+SHA1 (patch-src_extensions_cgimod.ml) = 6f5093a1a93a5797ce47c33b9704e45f8aa6c2c5
+SHA1 (patch-src_extensions_ocsipersist-pgsql_Makefile) = 223b8f652ccd4144fbe3c0f67c6fdd3cdf6fa0aa
+SHA1 (patch-src_extensions_ocsipersist-sqlite_Makefile) = 916733e0732ec58f502aeee5769fde1ed7060a9f
+SHA1 (patch-src_http_Makefile) = 1bcfe69470fe53a8fc9b197fd95d21889646909d
+SHA1 (patch-src_http_ocsigen__http__com.mli) = f1760bf423e8aae763992e57c13408aa01c6316f
+SHA1 (patch-src_server_Makefile) = 0f315fb0533d3d0b8f8cf1f3a61e11b013571b05
+SHA1 (patch-src_server_ocsigen__server.ml) = 17b9fc720d01e27a49576864a9d91c87deda85e3
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/options.mk
--- a/www/ocsigen/options.mk    Fri Apr 13 13:13:01 2018 +0000
+++ b/www/ocsigen/options.mk    Fri Apr 13 13:15:00 2018 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: options.mk,v 1.5 2017/01/04 13:06:18 jaapb Exp $
+# $NetBSD: options.mk,v 1.6 2018/04/13 13:15:00 jaapb Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.ocsigen
-PKG_SUPPORTED_OPTIONS= camlzip pgsql
+PKG_SUPPORTED_OPTIONS= camlzip
 PKG_OPTIONS_NONEMPTY_SETS=     database
-PKG_OPTIONS_SET.database=      sqlite gdbm
+PKG_OPTIONS_SET.database=      sqlite gdbm pgsql
 PKG_SUGGESTED_OPTIONS= gdbm camlzip
 
 .include "../../mk/bsd.options.mk"
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/patches/patch-Makefile.options
--- a/www/ocsigen/patches/patch-Makefile.options        Fri Apr 13 13:13:01 2018 +0000
+++ b/www/ocsigen/patches/patch-Makefile.options        Fri Apr 13 13:15:00 2018 +0000
@@ -1,14 +1,14 @@
-$NetBSD: patch-Makefile.options,v 1.3 2017/09/08 17:10:46 jaapb Exp $
+$NetBSD: patch-Makefile.options,v 1.4 2018/04/13 13:15:00 jaapb Exp $
 
-lwt_ssl for lwt 3.1
---- Makefile.options.orig      2016-11-24 13:31:34.000000000 +0000
+Support for preemptive threads is in lwt.unix now
+--- Makefile.options.orig      2018-02-01 12:55:17.000000000 +0000
 +++ Makefile.options
-@@ -30,7 +30,7 @@ endif
+@@ -25,7 +25,7 @@ endif
+ ## but also to generate src/baselib/ocsigen_config.ml and src/files/META
+ 
+ ifeq "$(PREEMPTIVE)" "YES"
+-LWT_PREEMPTIVE_PACKAGE:=lwt.preemptive
++LWT_PREEMPTIVE_PACKAGE:=lwt.unix
+ endif
  
  BASE_PACKAGE := lwt ipaddr bytes
- 
--SERVER_PACKAGE := lwt.ssl           \
-+SERVER_PACKAGE := lwt_ssl           \
-                 bytes                 \
-                 ${LWT_PREEMPTIVE_PACKAGE} \
-                   ipaddr            \
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/patches/patch-configure
--- a/www/ocsigen/patches/patch-configure       Fri Apr 13 13:13:01 2018 +0000
+++ b/www/ocsigen/patches/patch-configure       Fri Apr 13 13:15:00 2018 +0000
@@ -1,16 +1,27 @@
-$NetBSD: patch-configure,v 1.1 2017/09/08 17:10:46 jaapb Exp $
+$NetBSD: patch-configure,v 1.2 2018/04/13 13:15:00 jaapb Exp $
 
-lwt_ssl for lwt 3.1
---- configure.orig     2016-11-24 13:31:34.000000000 +0000
+Support for preemptive threads is in lwt.unix now
+--- configure.orig     2018-02-01 12:55:17.000000000 +0000
 +++ configure
-@@ -410,8 +410,8 @@ check_library ssl "See: http://sourcefor
- 
- check_library lwt "See: http://ocsigen.org/lwt";
+@@ -412,7 +412,7 @@ check_library lwt "See: http://ocsigen.o
  check_library lwt.unix  "Missing support for 'unix' in lwt."
--check_library lwt.react "Missing support for 'react' in lwt."
--check_library lwt.ssl   "Missing support for 'ssl' in lwt."
-+check_library lwt_react "Missing support for 'react' in lwt."
-+check_library lwt_ssl   "Missing support for 'ssl' in lwt."
- check_library lwt.preemptive "Missing support for 'preemptive' in lwt."
+ check_library lwt_react   "See: http://ocsigen.org/lwt";
+ check_library lwt_ssl   "See: http://ocsigen.org/lwt";
+-check_library lwt.preemptive "Missing support for 'preemptive' in lwt."
++#check_library lwt.preemptive "Missing support for 'preemptive' in lwt."
  
  check_library netstring \
+     "See ocamlnet: http://projects.camlcity.org/projects/ocamlnet.html";
+@@ -464,10 +464,10 @@ fi
+ 
+ # Check Lwt.preemptive
+ if [ "$with_preempt" -gt 0 ]; then
+-    if test_library lwt.preemptive; then
++    if test_library lwt.unix; then
+       echo -n
+     elif [ "$with_preempt" -gt 1 ]; then
+-      fail_library lwt.preemptive "Missing support for 'preemptive' in lwt."
++      fail_library lwt.unix "Missing support for 'preemptive' in lwt."
+     else
+       with_preempt=0
+     fi
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/patches/patch-src_baselib_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_baselib_Makefile    Fri Apr 13 13:15:00 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_baselib_Makefile,v 1.3 2018/04/13 13:15:00 jaapb Exp $
+
+The lwt_log package has been separated from lwt
+--- src/baselib/Makefile.orig  2018-02-01 12:55:17.000000000 +0000
++++ src/baselib/Makefile
+@@ -9,7 +9,8 @@ PACKAGE  := \
+       findlib \
+       tyxml \
+       ${LWT_PREEMPTIVE_PACKAGE} \
+-      ipaddr
++      ipaddr \
++      lwt_log
+ 
+ LIBS     := ${addprefix -package ,${PACKAGE}}
+ # -no-keep-locs is needed since OCaml 4.06. If we don't compile with
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/patches/patch-src_baselib_ocsigen__stream.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_baselib_ocsigen__stream.ml  Fri Apr 13 13:15:00 2018 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_baselib_ocsigen__stream.ml,v 1.1 2018/04/13 13:15:00 jaapb Exp $
+
+Lwt_chan no longer exists in Lwt 4, replaced by Lwt_io
+--- src/baselib/ocsigen_stream.ml.orig 2018-02-01 12:55:17.000000000 +0000
++++ src/baselib/ocsigen_stream.ml
+@@ -229,10 +229,10 @@ let of_file filename =
+   let fd = Lwt_unix.of_unix_file_descr
+       (Unix.openfile filename [Unix.O_RDONLY;Unix.O_NONBLOCK] 0o666)
+   in
+-  let ch = Lwt_chan.in_channel_of_descr fd in
++  let ch = Lwt_io.of_fd ~mode:Input fd in
+   let buf = Bytes.create 1024 in
+   let rec aux () =
+-    Lwt_chan.input ch buf 0 1024 >>= fun n ->
++    Lwt_io.read_into ch buf 0 1024 >>= fun n ->
+     if n = 0 then empty None else
+       (* Streams should be immutable, thus we always make a copy
+          of the buffer *)
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/patches/patch-src_extensions_Makefile
--- a/www/ocsigen/patches/patch-src_extensions_Makefile Fri Apr 13 13:13:01 2018 +0000
+++ b/www/ocsigen/patches/patch-src_extensions_Makefile Fri Apr 13 13:15:00 2018 +0000
@@ -1,16 +1,15 @@
-$NetBSD: patch-src_extensions_Makefile,v 1.3 2017/09/08 17:10:46 jaapb Exp $
+$NetBSD: patch-src_extensions_Makefile,v 1.4 2018/04/13 13:15:00 jaapb Exp $
 
-lwt_react and lwt_ssl for lwt 3.1
---- src/extensions/Makefile.orig       2016-11-24 13:31:34.000000000 +0000
+The lwt_log package has been separated from lwt
+--- src/extensions/Makefile.orig       2018-02-01 12:55:17.000000000 +0000
 +++ src/extensions/Makefile
-@@ -4,8 +4,8 @@ PACKAGE  :=            \
-       bytes           \
-       lwt.unix        \
-       ipaddr          \
--      lwt.ssl         \
--      lwt.react       \
-+      lwt_ssl         \
-+      lwt_react       \
+@@ -8,7 +8,8 @@ PACKAGE  :=            \
+       lwt_react       \
        netstring       \
        netstring-pcre  \
-       tyxml.parser
+-      tyxml.parser
++      tyxml.parser \
++      lwt_log
+ 
+ LIBS     := -I ../baselib -I ../http -I ../server ${addprefix -package ,${PACKAGE}}
+ OCAMLC   := $(OCAMLFIND) ocamlc ${BYTEDBG} ${THREAD}
diff -r 054b177a6c5a -r 87892d6149ff www/ocsigen/patches/patch-src_extensions_cgimod.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/ocsigen/patches/patch-src_extensions_cgimod.ml        Fri Apr 13 13:15:00 2018 +0000
@@ -0,0 +1,46 @@
+$NetBSD: patch-src_extensions_cgimod.ml,v 1.1 2018/04/13 13:15:00 jaapb Exp $
+
+Write correct request URI
+Lwt_chan no longer exists in Lwt 4, replaced by Lwt_io
+--- src/extensions/cgimod.ml.orig      2018-02-01 12:55:17.000000000 +0000
++++ src/extensions/cgimod.ml
+@@ -271,7 +271,8 @@ let array_environment filename re doc_ro
+ 
+         (* Neither in the CGI's spec nor in the HTTP headers but used, e.g., by PHP *)
+         Printf.sprintf "REMOTE_PORT=%d" (Ocsigen_request_info.remote_port ri);
+-        Printf.sprintf "REQUEST_URI=%s" (Ocsigen_request_info.url_string ri);
++        Printf.sprintf "REQUEST_URI=%s" (string_conform0 (Ocsigen_request_info.url_string ri));
++
+         (* FIXME: URI instead of URL ? *)
+         Printf.sprintf "SCRIPT_FILENAME=%s" filename ] ;
+       additionnal_headers
+@@ -368,7 +369,7 @@ let recupere_cgi head re doc_root filena
+     Lwt_timeout.start timeout;
+ 
+     (* A thread giving POST data to the CGI script: *)
+-    let post_in_ch = Lwt_chan.out_channel_of_descr post_in in
++    let post_in_ch = Lwt_io.of_fd ~mode:Output post_in in
+     ignore
+       (catch
+          (fun () ->
+@@ -376,7 +377,7 @@ let recupere_cgi head re doc_root filena
+              | None -> Lwt_unix.close post_in
+              | Some content_post ->
+                Ocsigen_http_com.write_stream post_in_ch content_post >>= fun () ->
+-               Lwt_chan.flush post_in_ch >>= fun () ->
++               Lwt_io.flush post_in_ch >>= fun () ->
+                Lwt_unix.close post_in
+             ))
+          (*XXX Check possible errors! *)
+@@ -391,9 +392,9 @@ let recupere_cgi head re doc_root filena
+ 
+     (* A thread listening the error output of the CGI script
+        and writing them in warnings.log *)



Home | Main Index | Thread Index | Old Index