Index: www/libevhtp/Makefile =================================================================== --- www/libevhtp/Makefile (revision 402463) +++ www/libevhtp/Makefile (working copy) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= libevhtp -PORTVERSION= 1.2.10 +PORTVERSION= 1.2.11 CATEGORIES= www MAINTAINER= ultima1252@gmail.com @@ -14,53 +14,43 @@ USE_GITHUB= yes GH_ACCOUNT= ellzey -GH_TAGNAME= ba4c44e USES= cmake:outsource USE_LDCONFIG= yes CMAKE_ARGS= -DCMAKE_INCLUDE_PATH:PATH=include/event2 \ -DCMAKE_LIBRARY_PATH:PATH=lib/event2 -CMAKE_BUILD_TYPE= Release -OPTIONS_DEFINE= EVHTP_DISABLE_SSL EVHTP_DISABLE_EVTHR EVHTP_DISABLE_REGEX \ - EVHTP_BUILD_SHARED EVHTP_USE_DEFER_ACCEPT -EVHTP_DISABLE_SSL_DESC= Disable ssl support +OPTIONS_DEFINE= SSL THREADS REGEX STATIC TCP_DEFER_ACCEPT DEBUG +OPTIONS_DEFAULT= SSL THREADS REGEX +OPTIONS_SUB= yes -EVHTP_DISABLE_SSL_CMAKE_ON= -DEVHTP_DISABLE_SSL:STRING=ON -EVHTP_DISABLE_SSL_CMAKE_OFF= -DEVHTP_DISABLE_SSL:STRING=OFF -EVHTP_DISABLE_EVTHR_DESC= Disable evthread support -EVHTP_DISABLE_EVTHR_CMAKE_ON= -DEVHTP_DISABLE_EVTHR:STRING=ON -EVHTP_DISABLE_EVTHR_CMAKE_OFF= -DEVHTP_DISABLE_EVTHR:STRING=OFF -EVHTP_DISABLE_REGEX_DESC= Disable regex support -EVHTP_DISABLE_REGEX_CMAKE_ON= -DEVHTP_DISABLE_REGEX:STRING=ON -EVHTP_DISABLE_REGEX_CMAKE_OFF= -DEVHTP_DISABLE_REGEX:STRING=OFF -EVHTP_BUILD_SHARED_DESC= Build shared library too -EVHTP_BUILD_SHARED_CMAKE_ON= -DEVHTP_BUILD_SHARED:STRING=ON -EVHTP_BUILD_SHARED_CMAKE_OFF= -DEVHTP_BUILD_SHARED:STRING=OFF -EVHTP_USE_DEFER_ACCEPT_DESC= Enable TCP_DEFER_ACCEPT -EVHTP_USE_DEFER_ACCEPT_CMAKE_ON= -DEVHTP_USE_DEFER_ACCEPT:STRING=ON -EVHTP_USE_DEFER_ACCEPT_CMAKE_OFF= -DEVHTP_USE_DEFER_ACCEPT:STRING=OFF +SSL_CMAKE_ON= -DEVHTP_DISABLE_SSL:STRING=OFF +SSL_CMAKE_OFF= -DEVHTP_DISABLE_SSL:STRING=ON +THREADS_CMAKE_ON= -DEVHTP_DISABLE_EVTHR:STRING=OFF +THREADS_CMAKE_OFF= -DEVHTP_DISABLE_EVTHR:STRING=ON +REGEX_CMAKE_ON= -DEVHTP_DISABLE_REGEX:STRING=OFF +REGEX_CMAKE_OFF= -DEVHTP_DISABLE_REGEX:STRING=ON +REGEX_DESC= Enable regex support +STATIC_CMAKE_ON= -DEVHTP_BUILD_SHARED:STRING=OFF +STATIC_CMAKE_OFF= -DEVHTP_BUILD_SHARED:STRING=ON +TCP_DEFER_ACCEPT_DESC= Enable TCP_DEFER_ACCEPT +TCP_DEFER_ACCEPT_CMAKE_ON= -DEVHTP_USE_DEFER_ACCEPT:STRING=ON +TCP_DEFER_ACCEPT_CMAKE_OFF= -DEVHTP_USE_DEFER_ACCEPT:STRING=OFF +DEBUG_CMAKE_BUILD_TYPE_ON= Debug +DEBUG_CMAKE_BUILD_TYPE_OFF= Release -OPTIONS_DEFAULT= EVHTP_BUILD_SHARED - .include -PLIST_FILES= include/evhtp.h \ - include/evhtp-config.h \ - include/htparse.h +PLIST_SUB+= PORTVERSION=${PORTVERSION} -.if !exists(${LOCALBASE}/include/onigposix.h) && !${PORT_OPTIONS:MEVHTP_DISABLE_REGEX} -PLIST_FILES+= include/onigposix.h -.endif +post-patch: + ${REINPLACE_CMD} 's/\/evhtp//' ${WRKSRC}/evhtp.pc.in + ${REINPLACE_CMD} 's/INCLUDE_INSTALL_DIR}\/evhtp/INCLUDE_INSTALL_DIR}/ ; s/lib\/pkgconfig/libdata\/pkgconfig/ ; s/PATCH_VERSION [0-9]*/PATCH_VERSION ${PORTVERSION:S/1.2.//}/' \ + ${WRKSRC}/CMakeLists.txt -.if !${PORT_OPTIONS:MEVHTP_DISABLE_EVTHR} -PLIST_FILES+= include/evthr.h +post-install: +.if ${PORT_OPTIONS:MSTATIC} + ${REINPLACE_CMD} '/lib\/libevhtp.so/d' ${TMPPLIST} .endif -.if ${PORT_OPTIONS:MEVHTP_BUILD_SHARED} -PLIST_FILES+= lib/libevhtp.so -.else -PLIST_FILES+= lib/libevhtp.a -.endif - .include Index: www/libevhtp/distinfo =================================================================== --- www/libevhtp/distinfo (revision 402463) +++ www/libevhtp/distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (ellzey-libevhtp-1.2.10-ba4c44e_GH0.tar.gz) = d5b022e2a3847ed7344bc7bca7ac7feb6b4a7e877d12452a15a96ba1c760d25a -SIZE (ellzey-libevhtp-1.2.10-ba4c44e_GH0.tar.gz) = 373482 +SHA256 (ellzey-libevhtp-1.2.11_GH0.tar.gz) = 0e60ef0b75c9e0351d18e015c9a688a70d9c66d2ca3f6a44a7da7153e11e067d +SIZE (ellzey-libevhtp-1.2.11_GH0.tar.gz) = 429931 Index: www/libevhtp/files/patch-evhtp.c =================================================================== --- www/libevhtp/files/patch-evhtp.c (revision 402463) +++ www/libevhtp/files/patch-evhtp.c (working copy) @@ -1,25 +1,94 @@ ---- evhtp.c.orig 2015-02-24 07:55:55 UTC +### Description: Commit 6cd8946 and 67ed0bc caused ports to break, this +### patch will reverts the commits until a proper fix is created. +### Issue ID: https://github.com/ellzey/libevhtp/issues/196 +### Issue ID: https://github.com/ellzey/libevhtp/issues/201 +### https://github.com/ellzey/libevhtp/commit/6cd89466fd6bd76c5b8624be65af5893afe3e40c +### https://github.com/ellzey/libevhtp/commit/67ed0bce433655dfeab65b797279dd167b394feb + +--- evhtp.c.orig 2015-11-02 23:01:53 UTC +++ evhtp.c -@@ -7,6 +7,7 @@ - #include - #include - #ifndef WIN32 -+#include - #include - #include - #include -@@ -3170,7 +3171,14 @@ evhtp_bind_sockaddr(evhtp_t * htp, struc +@@ -1662,7 +1662,22 @@ _evhtp_create_reply(evhtp_request_t * re + evhtp_headers_add_header(request->headers_out, + evhtp_header_new("Content-Length", out_buf, 0, 1)); + } +- } ++ if (!content_type) { ++ evhtp_headers_add_header(request->headers_out, ++ evhtp_header_new("Content-Type", "text/plain", 0, 0)); ++ } ++ } else { ++ if (!evhtp_header_find(request->headers_out, "Content-Length")) { ++ const char * chunked = evhtp_header_find(request->headers_out, ++ "transfer-encoding"); ++ ++ if (!chunked || !strstr(chunked, "chunked")) { ++ evhtp_headers_add_header(request->headers_out, ++ evhtp_header_new("Content-Length", "0", 0, 0)); ++ } ++ } ++ } ++ + check_proto: + /* add the proper keep-alive type headers based on http version */ + switch (request->proto) { +@@ -1697,11 +1712,6 @@ check_proto: + } /* switch */ - sock = evconnlistener_get_fd(htp->server); -+#ifdef TCP_DEFER_ACCEPT - setsockopt(sock, IPPROTO_TCP, TCP_DEFER_ACCEPT, &one, (ev_socklen_t)sizeof(one)); -+#elif SO_ACCEPTFILTER -+ struct accept_filter_arg afa; -+ bzero(&afa, sizeof(afa)); -+ strcpy(afa.af_name, "httpready"); -+ setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)); -+#endif - setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, (ev_socklen_t)sizeof(one)); - } - #endif +- if (!content_type) { +- evhtp_headers_add_header(request->headers_out, +- evhtp_header_new("Content-Type", "text/plain", 0, 0)); +- } +- + /* attempt to add the status line into a temporary buffer and then use + * evbuffer_add(). Using plain old snprintf() will be faster than + * evbuffer_add_printf(). If the snprintf() fails, which it rarely should, +@@ -2356,7 +2366,7 @@ evhtp_connection_pause(evhtp_connection_ + + c->paused = 1; + +- bufferevent_disable(c->bev, EV_READ | EV_WRITE); ++ bufferevent_disable(c->bev, EV_READ); + + return; + } +@@ -3094,10 +3104,8 @@ evhtp_send_reply_chunk_start(evhtp_reque + */ + evhtp_kv_rm_and_free(request->headers_out, content_len); + +-#if 0 + evhtp_headers_add_header(request->headers_out, + evhtp_header_new("Content-Length", "0", 0, 0)); +-#endif + + request->chunked = 1; + break; +@@ -3955,21 +3963,11 @@ evhtp_request_set_bev(evhtp_request_t * + evhtp_connection_set_bev(request->conn, bev); + } + +-void +-evhtp_request_set_keepalive(evhtp_request_t * request, int val) { +- request->keepalive = (val > 0) ? 1 : 0; +-} +- + evhtp_connection_t * + evhtp_request_get_connection(evhtp_request_t * request) { + return request->conn; + } + +-evhtp_proto +-evhtp_request_get_proto(evhtp_request_t * request) { +- return request->proto; +-} +- + inline void + evhtp_connection_set_timeouts(evhtp_connection_t * c, + const struct timeval * rtimeo, +@@ -4378,4 +4376,4 @@ evhtp_make_request(evhtp_connection_t * + unsigned int + evhtp_request_status(evhtp_request_t * r) { + return htparser_get_status(r->conn->parser); +-} +\ No newline at end of file ++} Index: www/libevhtp/files/patch-evhtp.h =================================================================== --- www/libevhtp/files/patch-evhtp.h (revision 402463) +++ www/libevhtp/files/patch-evhtp.h (working copy) @@ -1,11 +0,0 @@ ---- evhtp.h.orig 2015-10-29 19:51:50 UTC -+++ evhtp.h -@@ -1285,7 +1285,7 @@ EVHTP_EXPORT evhtp_connection_t * - evhtp_connection_new(evbase_t * evbase, const char * addr, uint16_t port); - - #ifndef DISABLE_SSL --evhtp_connection_t * evhtp_connection_ssl_new(evbase_t * evbase, const char * addr, uint16_t port, evhtp_ssl_ctx_t * ctx); -+EVHTP_EXPORT evhtp_connection_t * evhtp_connection_ssl_new(evbase_t * evbase, const char * addr, uint16_t port, evhtp_ssl_ctx_t * ctx); - #endif - - Index: www/libevhtp/pkg-plist =================================================================== --- www/libevhtp/pkg-plist (revision 0) +++ www/libevhtp/pkg-plist (working copy) @@ -0,0 +1,9 @@ +include/evhtp.h +include/evhtp-config.h +include/htparse.h +libdata/pkgconfig/evhtp.pc +lib/libevhtp.so +lib/libevhtp.so.%%PORTVERSION%% +%%REGEX%%include/onigposix.h +%%THREADS%%include/evthr.h +%%STATIC%%lib/libevhtp.a Property changes on: www/libevhtp/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property