diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2015-12-03 22:57:25 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2015-12-03 22:57:25 +0800 |
commit | 4173b8b0a30bb08a6aea1bd9e18eff1223097944 (patch) | |
tree | 6d8879dea084e89475529ddf2a88eed816171ffc /www/libevhtp | |
parent | 4770408abdaf602d676eabba066cd80dc6e16062 (diff) | |
download | freebsd-ports-gnome-4173b8b0a30bb08a6aea1bd9e18eff1223097944.tar.gz freebsd-ports-gnome-4173b8b0a30bb08a6aea1bd9e18eff1223097944.tar.zst freebsd-ports-gnome-4173b8b0a30bb08a6aea1bd9e18eff1223097944.zip |
- Update to 1.2.11
- Fix option names
- Add DEBUG options
- Switch to pkg-plist
PR: 204681
Submitted by: Ultima1252@gmail.com (maintainer)
Diffstat (limited to 'www/libevhtp')
-rw-r--r-- | www/libevhtp/Makefile | 64 | ||||
-rw-r--r-- | www/libevhtp/distinfo | 4 | ||||
-rw-r--r-- | www/libevhtp/files/patch-evhtp.c | 48 | ||||
-rw-r--r-- | www/libevhtp/files/patch-evhtp.h | 11 | ||||
-rw-r--r-- | www/libevhtp/pkg-plist | 9 |
5 files changed, 58 insertions, 78 deletions
diff --git a/www/libevhtp/Makefile b/www/libevhtp/Makefile index 43bdb37b57d5..4a0dea43859e 100644 --- a/www/libevhtp/Makefile +++ b/www/libevhtp/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= libevhtp -PORTVERSION= 1.2.10 +PORTVERSION= 1.2.11 CATEGORIES= www MAINTAINER= ultima1252@gmail.com @@ -14,53 +14,31 @@ LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2 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 - -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 - -OPTIONS_DEFAULT= EVHTP_BUILD_SHARED - -.include <bsd.port.options.mk> - -PLIST_FILES= include/evhtp.h \ - include/evhtp-config.h \ - include/htparse.h - -.if !exists(${LOCALBASE}/include/onigposix.h) && !${PORT_OPTIONS:MEVHTP_DISABLE_REGEX} -PLIST_FILES+= include/onigposix.h -.endif - -.if !${PORT_OPTIONS:MEVHTP_DISABLE_EVTHR} -PLIST_FILES+= include/evthr.h -.endif - -.if ${PORT_OPTIONS:MEVHTP_BUILD_SHARED} -PLIST_FILES+= lib/libevhtp.so -.else -PLIST_FILES+= lib/libevhtp.a -.endif +PLIST_SUB+= PORTVERSION=${PORTVERSION} + +OPTIONS_DEFINE= SSL THREADS REGEX STATIC DEBUG +OPTIONS_DEFAULT=SSL THREADS REGEX +OPTIONS_SUB= yes + +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 + +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 .include <bsd.port.mk> diff --git a/www/libevhtp/distinfo b/www/libevhtp/distinfo index 66d5a4f175c6..a8843f109c12 100644 --- a/www/libevhtp/distinfo +++ b/www/libevhtp/distinfo @@ -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 diff --git a/www/libevhtp/files/patch-evhtp.c b/www/libevhtp/files/patch-evhtp.c index 53bd18f7adf8..e7fa521a7a93 100644 --- a/www/libevhtp/files/patch-evhtp.c +++ b/www/libevhtp/files/patch-evhtp.c @@ -1,25 +1,29 @@ ---- evhtp.c.orig 2015-02-24 07:55:55 UTC +### Description: Commit 67ed0bc caused ports to break, this +### patch will revert the commits until a proper fix is created. +### Issue ID: https://github.com/ellzey/libevhtp/issues/201 +### https://github.com/ellzey/libevhtp/commit/67ed0bce433655dfeab65b797279dd167b394feb +--- evhtp.c.orig 2015-11-02 23:01:53 UTC +++ evhtp.c -@@ -7,6 +7,7 @@ - #include <strings.h> - #include <inttypes.h> - #ifndef WIN32 -+#include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> - #include <netinet/tcp.h> -@@ -3170,7 +3171,14 @@ evhtp_bind_sockaddr(evhtp_t * htp, struc +@@ -1673,12 +1673,10 @@ check_proto: + evhtp_header_new("Connection", "close", 0, 0)); + } - sock = evconnlistener_get_fd(htp->server); +-#if 0 +- if (!out_len && !evhtp_header_find(request->headers_out, "Content-Length")) { ++ if (!evhtp_header_find(request->headers_out, "Content-Length")) { + evhtp_headers_add_header(request->headers_out, + evhtp_header_new("Content-Length", "0", 0, 0)); + } +-#endif -+#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 + break; + case EVHTP_PROTO_10: +@@ -2356,7 +2354,7 @@ evhtp_connection_pause(evhtp_connection_ + + c->paused = 1; + +- bufferevent_disable(c->bev, EV_READ | EV_WRITE); ++ bufferevent_disable(c->bev, EV_READ); + + return; + } diff --git a/www/libevhtp/files/patch-evhtp.h b/www/libevhtp/files/patch-evhtp.h deleted file mode 100644 index 963bdc8ec90b..000000000000 --- a/www/libevhtp/files/patch-evhtp.h +++ /dev/null @@ -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 - - diff --git a/www/libevhtp/pkg-plist b/www/libevhtp/pkg-plist new file mode 100644 index 000000000000..5c2e1546be96 --- /dev/null +++ b/www/libevhtp/pkg-plist @@ -0,0 +1,9 @@ +include/evhtp.h +include/evhtp-config.h +include/htparse.h +libdata/pkgconfig/evhtp.pc +%%NO_STATIC%%lib/libevhtp.so +%%NO_STATIC%%lib/libevhtp.so.%%PORTVERSION%% +%%REGEX%%include/onigposix.h +%%THREADS%%include/evthr.h +%%STATIC%%lib/libevhtp.a |