aboutsummaryrefslogtreecommitdiff
path: root/www/h2o
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2017-03-17 18:38:06 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2017-03-17 18:38:06 +0000
commit186e7723879e5a7b3bfe873e7f3c0618a10a6776 (patch)
treed57efc6a6f03f999875e9dfb3aa109c83cec0efa /www/h2o
parent7d14a1ba67abf6f6a5cbde3f85a18614b70b0335 (diff)
downloadports-186e7723879e5a7b3bfe873e7f3c0618a10a6776.tar.gz
ports-186e7723879e5a7b3bfe873e7f3c0618a10a6776.zip
- Upgrade to 2.1.0
- Drop bundled libressl switch PR: 217088 Submitted by: dch@skunkwerks.at (maintainer)
Notes
Notes: svn path=/head/; revision=436349
Diffstat (limited to 'www/h2o')
-rw-r--r--www/h2o/Makefile38
-rw-r--r--www/h2o/distinfo6
-rw-r--r--www/h2o/files/patch-CMakeLists.txt12
-rw-r--r--www/h2o/files/patch-lib_core_request.c145
-rw-r--r--www/h2o/files/patch-lib_http2_connection.c10
-rw-r--r--www/h2o/pkg-plist10
6 files changed, 34 insertions, 187 deletions
diff --git a/www/h2o/Makefile b/www/h2o/Makefile
index 95d408f2e463..2eb8b58cced0 100644
--- a/www/h2o/Makefile
+++ b/www/h2o/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= h2o
-PORTVERSION= 2.0.4
-PORTREVISION= 2
+PORTVERSION= 2.1.0
DISTVERSIONPREFIX= v
CATEGORIES= www
@@ -14,7 +13,8 @@ LICENSE= MIT
USE_GITHUB= yes
-USES= cmake compiler:c11 perl5 shebangfix
+USES= cmake compiler:c11 cpe perl5 shebangfix ssl
+CPE_VENDOR= h2o_project
USE_PERL5= run
SHEBANG_FILES= share/h2o/start_server
@@ -36,39 +36,31 @@ H2O_LOGDIR= /var/log/${PORTNAME}/
USE_RC_SUBR= ${PORTNAME}
-OPTIONS_DEFINE= LIBRESSL MRUBY
-OPTIONS_DEFAULT= LIBRESSL MRUBY
-OPTIONS_SUB= yes
-LIBRESSL_DESC= Build with bundled LibreSSL instead of OpenSSL
-MRUBY_DESC= Build with mruby handler support
+OPTIONS_DEFINE= MRUBY
+OPTIONS_DEFAULT= MRUBY
+OPTIONS_SUB= yes
+MRUBY_DESC= Build with mruby handler support
-CMAKE_ARGS+= -DEXTRA_LIBRARIES=OFF -DWITHOUT_LIBS=ON
+CMAKE_ARGS+= -DEXTRA_LIBRARIES=OFF -DWITHOUT_LIBS=ON -DWITH_BUNDLED_SSL=OFF
+CMAKE_VERBOSE= yes
.include <bsd.port.options.mk>
-LIBRESSL_CMAKE_ON= -DWITH_BUNDLED_SSL=ON
-LIBRESSL_CMAKE_OFF= -DWITH_BUNDLED_SSL=OFF
-LIBRESSL_USES_OFF= ssl
MRUBY_CMAKE_ON= -DWITH_MRUBY=ON
-MRUBY_CMAKE_OFF= -DWITH_MRUBY=OFF
-
-.if ${PORT_OPTIONS:MLIBRESSL}
-USES_SSL= yes
-.else
-USES_SSL= no
-.endif
+MRUBY_CMAKE_OFF= -DWITH_MRUBY=OFF
.if ${PORT_OPTIONS:MMRUBY}
USE_RUBY= yes
+RUBY_NO_RUN_DEPENDS= yes
BUILD_DEPENDS+= bison:devel/bison
.endif
post-patch:
@${REINPLACE_CMD} -e 's|exec perl|exec ${LOCALBASE}/bin/perl|' \
- ${WRKSRC}/share/h2o/annotate-backtrace-symbols \
- ${WRKSRC}/share/h2o/fetch-ocsp-response \
- ${WRKSRC}/share/h2o/kill-on-close \
- ${WRKSRC}/share/h2o/start_server
+ ${WRKSRC}/share/h2o/annotate-backtrace-symbols \
+ ${WRKSRC}/share/h2o/fetch-ocsp-response \
+ ${WRKSRC}/share/h2o/kill-on-close \
+ ${WRKSRC}/share/h2o/start_server
post-install:
${MKDIR} ${STAGEDIR}${DOCSDIR} \
diff --git a/www/h2o/distinfo b/www/h2o/distinfo
index 272d628b4a91..a7e03b1d3193 100644
--- a/www/h2o/distinfo
+++ b/www/h2o/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1473753131
-SHA256 (h2o-h2o-v2.0.4_GH0.tar.gz) = c0efa18f0ffb0f68ee4b60a6ed1feb54c770458c59e48baa2d9d0906ef9c68c0
-SIZE (h2o-h2o-v2.0.4_GH0.tar.gz) = 15015392
+TIMESTAMP = 1484725591
+SHA256 (h2o-h2o-v2.1.0_GH0.tar.gz) = 41f3853f3083c2fe8e70d3ab7be02c3de3c26fb77ba5fc56fdaf46712418b999
+SIZE (h2o-h2o-v2.1.0_GH0.tar.gz) = 15207573
diff --git a/www/h2o/files/patch-CMakeLists.txt b/www/h2o/files/patch-CMakeLists.txt
index 588bb3d6070c..87d8eeca8ead 100644
--- a/www/h2o/files/patch-CMakeLists.txt
+++ b/www/h2o/files/patch-CMakeLists.txt
@@ -1,12 +1,12 @@
---- CMakeLists.txt.orig 2016-03-04 12:09:30 UTC
+--- CMakeLists.txt.orig 2017-01-17 23:43:27 UTC
+++ CMakeLists.txt
-@@ -419,7 +419,8 @@ INSTALL(TARGETS h2o
- LIBRARY DESTINATION lib)
+@@ -462,7 +462,8 @@ INSTALL(TARGETS h2o
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
IF (NOT WITHOUT_LIBS)
-- INSTALL(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h")
-+ INSTALL(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h"
+- INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h")
++ INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h"
+ EXCLUDE PATTERN "h2o" EXCLUDE PATTERN "h2o/socket")
IF (LIBUV_FOUND)
- INSTALL(FILES "${CMAKE_BINARY_DIR}/libh2o.pc" DESTINATION lib/pkgconfig)
+ INSTALL(FILES "${CMAKE_BINARY_DIR}/libh2o.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
ENDIF ()
diff --git a/www/h2o/files/patch-lib_core_request.c b/www/h2o/files/patch-lib_core_request.c
deleted file mode 100644
index 789c2cd173ee..000000000000
--- a/www/h2o/files/patch-lib_core_request.c
+++ /dev/null
@@ -1,145 +0,0 @@
---- lib/core/request.c.orig 2016-09-13 06:57:03 UTC
-+++ lib/core/request.c
-@@ -31,21 +31,24 @@
-
- #define INITIAL_INBUFSZ 8192
-
--struct st_delegate_request_deferred_t {
-+struct st_deferred_request_action_t {
-+ h2o_timeout_entry_t timeout;
- h2o_req_t *req;
-+};
-+
-+struct st_delegate_request_deferred_t {
-+ struct st_deferred_request_action_t super;
- h2o_handler_t *current_handler;
-- h2o_timeout_entry_t _timeout;
- };
-
- struct st_reprocess_request_deferred_t {
-- h2o_req_t *req;
-+ struct st_deferred_request_action_t super;
- h2o_iovec_t method;
- const h2o_url_scheme_t *scheme;
- h2o_iovec_t authority;
- h2o_iovec_t path;
- h2o_req_overrides_t *overrides;
- int is_delegated;
-- h2o_timeout_entry_t _timeout;
- };
-
- struct st_send_error_deferred_t {
-@@ -57,6 +60,21 @@ struct st_send_error_deferred_t {
- h2o_timeout_entry_t _timeout;
- };
-
-+static void on_deferred_action_dispose(void *_action)
-+{
-+ struct st_deferred_request_action_t *action = _action;
-+ if (h2o_timeout_is_linked(&action->timeout))
-+ h2o_timeout_unlink(&action->timeout);
-+}
-+
-+static struct st_deferred_request_action_t *create_deferred_action(h2o_req_t *req, size_t sz, h2o_timeout_cb cb)
-+{
-+ struct st_deferred_request_action_t *action = h2o_mem_alloc_shared(&req->pool, sz, on_deferred_action_dispose);
-+ *action = (struct st_deferred_request_action_t){{0, cb}, req};
-+ h2o_timeout_link(req->conn->ctx->loop, &req->conn->ctx->zero_timeout, &action->timeout);
-+ return action;
-+}
-+
- static h2o_hostconf_t *find_hostconf(h2o_hostconf_t **hostconfs, h2o_iovec_t authority, uint16_t default_port)
- {
- h2o_iovec_t hostname;
-@@ -205,6 +223,7 @@ void h2o_init_request(h2o_req_t *req, h2
- req->preferred_chunk_size = SIZE_MAX;
-
- if (src != NULL) {
-+ size_t i;
- #define COPY(buf) \
- do { \
- req->buf.base = h2o_mem_alloc_pool(&req->pool, src->buf.len); \
-@@ -216,9 +235,6 @@ void h2o_init_request(h2o_req_t *req, h2
- COPY(input.path);
- req->input.scheme = src->input.scheme;
- req->version = src->version;
-- h2o_vector_reserve(&req->pool, &req->headers, src->headers.size);
-- memcpy(req->headers.entries, src->headers.entries, sizeof(req->headers.entries[0]) * src->headers.size);
-- req->headers.size = src->headers.size;
- req->entity = src->entity;
- req->http1_is_persistent = src->http1_is_persistent;
- req->timestamps = src->timestamps;
-@@ -229,8 +245,19 @@ void h2o_init_request(h2o_req_t *req, h2
- req->upgrade.len = 0;
- }
- #undef COPY
-+ h2o_vector_reserve(&req->pool, &req->headers, src->headers.size);
-+ req->headers.size = src->headers.size;
-+ for (i = 0; i != src->headers.size; ++i) {
-+ h2o_header_t *dst_header = req->headers.entries + i, *src_header = src->headers.entries + i;
-+ if (h2o_iovec_is_token(src_header->name)) {
-+ dst_header->name = src_header->name;
-+ } else {
-+ dst_header->name = h2o_mem_alloc_pool(&req->pool, sizeof(*dst_header->name));
-+ *dst_header->name = h2o_strdup(&req->pool, src_header->name->base, src_header->name->len);
-+ }
-+ dst_header->value = h2o_strdup(&req->pool, src_header->value.base, src_header->value.len);
-+ }
- if (src->env.size != 0) {
-- size_t i;
- h2o_vector_reserve(&req->pool, &req->env, src->env.size);
- req->env.size = src->env.size;
- for (i = 0; i != req->env.size; ++i)
-@@ -276,16 +303,16 @@ void h2o_delegate_request(h2o_req_t *req
-
- static void on_delegate_request_cb(h2o_timeout_entry_t *entry)
- {
-- struct st_delegate_request_deferred_t *args = H2O_STRUCT_FROM_MEMBER(struct st_delegate_request_deferred_t, _timeout, entry);
-- h2o_delegate_request(args->req, args->current_handler);
-+ struct st_delegate_request_deferred_t *args =
-+ H2O_STRUCT_FROM_MEMBER(struct st_delegate_request_deferred_t, super.timeout, entry);
-+ h2o_delegate_request(args->super.req, args->current_handler);
- }
-
- void h2o_delegate_request_deferred(h2o_req_t *req, h2o_handler_t *current_handler)
- {
-- struct st_delegate_request_deferred_t *args = h2o_mem_alloc_pool(&req->pool, sizeof(*args));
-- *args = (struct st_delegate_request_deferred_t){req, current_handler};
-- args->_timeout.cb = on_delegate_request_cb;
-- h2o_timeout_link(req->conn->ctx->loop, &req->conn->ctx->zero_timeout, &args->_timeout);
-+ struct st_delegate_request_deferred_t *args =
-+ (struct st_delegate_request_deferred_t *)create_deferred_action(req, sizeof(*args), on_delegate_request_cb);
-+ args->current_handler = current_handler;
- }
-
- void h2o_reprocess_request(h2o_req_t *req, h2o_iovec_t method, const h2o_url_scheme_t *scheme, h2o_iovec_t authority,
-@@ -335,17 +362,23 @@ void h2o_reprocess_request(h2o_req_t *re
-
- static void on_reprocess_request_cb(h2o_timeout_entry_t *entry)
- {
-- struct st_reprocess_request_deferred_t *args = H2O_STRUCT_FROM_MEMBER(struct st_reprocess_request_deferred_t, _timeout, entry);
-- h2o_reprocess_request(args->req, args->method, args->scheme, args->authority, args->path, args->overrides, args->is_delegated);
-+ struct st_reprocess_request_deferred_t *args =
-+ H2O_STRUCT_FROM_MEMBER(struct st_reprocess_request_deferred_t, super.timeout, entry);
-+ h2o_reprocess_request(args->super.req, args->method, args->scheme, args->authority, args->path, args->overrides,
-+ args->is_delegated);
- }
-
- void h2o_reprocess_request_deferred(h2o_req_t *req, h2o_iovec_t method, const h2o_url_scheme_t *scheme, h2o_iovec_t authority,
- h2o_iovec_t path, h2o_req_overrides_t *overrides, int is_delegated)
- {
-- struct st_reprocess_request_deferred_t *args = h2o_mem_alloc_pool(&req->pool, sizeof(*args));
-- *args = (struct st_reprocess_request_deferred_t){req, method, scheme, authority, path, overrides, is_delegated};
-- args->_timeout.cb = on_reprocess_request_cb;
-- h2o_timeout_link(req->conn->ctx->loop, &req->conn->ctx->zero_timeout, &args->_timeout);
-+ struct st_reprocess_request_deferred_t *args =
-+ (struct st_reprocess_request_deferred_t *)create_deferred_action(req, sizeof(*args), on_reprocess_request_cb);
-+ args->method = method;
-+ args->scheme = scheme;
-+ args->authority = authority;
-+ args->path = path;
-+ args->overrides = overrides;
-+ args->is_delegated = is_delegated;
- }
-
- void h2o_start_response(h2o_req_t *req, h2o_generator_t *generator)
diff --git a/www/h2o/files/patch-lib_http2_connection.c b/www/h2o/files/patch-lib_http2_connection.c
deleted file mode 100644
index 1c8cd2864c3a..000000000000
--- a/www/h2o/files/patch-lib_http2_connection.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib/http2/connection.c.orig 2016-09-13 06:57:03 UTC
-+++ lib/http2/connection.c
-@@ -1329,6 +1329,7 @@ int h2o_http2_handle_upgrade(h2o_req_t *
-
- return 0;
- Error:
-+ h2o_linklist_unlink(&http2conn->_conns);
- free(http2conn);
- return -1;
- }
diff --git a/www/h2o/pkg-plist b/www/h2o/pkg-plist
index 21bebbc62766..935ed64f9227 100644
--- a/www/h2o/pkg-plist
+++ b/www/h2o/pkg-plist
@@ -7,7 +7,13 @@ share/h2o/start_server
%%DATADIR%%/fastcgi-cgi
%%DATADIR%%/setuidgid
%%DATADIR%%/status/index.html
+%%MRUBY%%%%DATADIR%%/mruby/acl.rb
+%%MRUBY%%%%DATADIR%%/mruby/bootstrap.rb
+%%MRUBY%%%%DATADIR%%/mruby/dos_detector.rb
%%MRUBY%%%%DATADIR%%/mruby/htpasswd.rb
+%%MRUBY%%%%DATADIR%%/mruby/lru_cache.rb
+%%MRUBY%%%%DATADIR%%/mruby/preloads.rb
+%%MRUBY%%%%DATADIR%%/mruby/trie_addr.rb
%%PORTDOCS%%%%DOCSDIR%%/assets/8mbps100msec-nginx195-h2o150.png
%%PORTDOCS%%%%DOCSDIR%%/assets/firstpaintbench.png
%%PORTDOCS%%%%DOCSDIR%%/assets/remotebench.png
@@ -16,12 +22,14 @@ share/h2o/start_server
%%PORTDOCS%%%%DOCSDIR%%/assets/style.css
%%PORTDOCS%%%%DOCSDIR%%/benchmarks.html
%%PORTDOCS%%%%DOCSDIR%%/configure.html
+%%PORTDOCS%%%%DOCSDIR%%/configure/access_control.html
%%PORTDOCS%%%%DOCSDIR%%/configure/access_log_directives.html
%%PORTDOCS%%%%DOCSDIR%%/configure/base_directives.html
%%PORTDOCS%%%%DOCSDIR%%/configure/basic_auth.html
%%PORTDOCS%%%%DOCSDIR%%/configure/cgi.html
%%PORTDOCS%%%%DOCSDIR%%/configure/command_options.html
%%PORTDOCS%%%%DOCSDIR%%/configure/compress_directives.html
+%%PORTDOCS%%%%DOCSDIR%%/configure/dos_detection.html
%%PORTDOCS%%%%DOCSDIR%%/configure/errordoc_directives.html
%%PORTDOCS%%%%DOCSDIR%%/configure/expires_directives.html
%%PORTDOCS%%%%DOCSDIR%%/configure/fastcgi_directives.html
@@ -37,6 +45,7 @@ share/h2o/start_server
%%PORTDOCS%%%%DOCSDIR%%/configure/reproxy_directives.html
%%PORTDOCS%%%%DOCSDIR%%/configure/status_directives.html
%%PORTDOCS%%%%DOCSDIR%%/configure/syntax_and_structure.html
+%%PORTDOCS%%%%DOCSDIR%%/configure/throttle_response_directives.html
%%PORTDOCS%%%%DOCSDIR%%/examples/doc_root.alternate/index.txt
%%PORTDOCS%%%%DOCSDIR%%/examples/doc_root/index.html
%%PORTDOCS%%%%DOCSDIR%%/examples/h2o/alternate.crt
@@ -47,6 +56,7 @@ share/h2o/start_server
%%PORTDOCS%%%%DOCSDIR%%/examples/h2o_mruby/h2o.conf
%%PORTDOCS%%%%DOCSDIR%%/examples/h2o_mruby/hello.rb
%%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/http1client.c
+%%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/latency-optimization.c
%%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/simple.c
%%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/socket-client.c
%%PORTDOCS%%%%DOCSDIR%%/examples/libh2o/websocket.c