View | Details | Raw Unified | Return to bug 204681 | Differences between
and this patch

Collapse All | Expand All

(-)www/libevhtp/Makefile (-6 / +13 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	libevhtp
3
PORTNAME=	libevhtp
4
PORTVERSION=	1.2.10
4
PORTVERSION=	1.2.11
5
CATEGORIES=	www
5
CATEGORIES=	www
6
6
7
MAINTAINER=	ultima1252@gmail.com
7
MAINTAINER=	ultima1252@gmail.com
Lines 14-29 Link Here
14
14
15
USE_GITHUB=	yes
15
USE_GITHUB=	yes
16
GH_ACCOUNT=	ellzey
16
GH_ACCOUNT=	ellzey
17
GH_TAGNAME=	ba4c44e
18
17
19
USES=		cmake:outsource
18
USES=		cmake:outsource
20
USE_LDCONFIG=	yes
19
USE_LDCONFIG=	yes
21
CMAKE_ARGS=	-DCMAKE_INCLUDE_PATH:PATH=include/event2 \
20
CMAKE_ARGS=	-DCMAKE_INCLUDE_PATH:PATH=include/event2 \
22
		-DCMAKE_LIBRARY_PATH:PATH=lib/event2
21
		-DCMAKE_LIBRARY_PATH:PATH=lib/event2
23
CMAKE_BUILD_TYPE=	Release
24
22
25
OPTIONS_DEFINE=	EVHTP_DISABLE_SSL EVHTP_DISABLE_EVTHR EVHTP_DISABLE_REGEX \
23
OPTIONS_DEFINE=	EVHTP_DISABLE_SSL EVHTP_DISABLE_EVTHR EVHTP_DISABLE_REGEX \
26
				EVHTP_BUILD_SHARED EVHTP_USE_DEFER_ACCEPT
24
		EVHTP_BUILD_SHARED EVHTP_USE_DEFER_ACCEPT DEBUG
27
EVHTP_DISABLE_SSL_DESC=		Disable ssl support
25
EVHTP_DISABLE_SSL_DESC=		Disable ssl support
28
26
29
EVHTP_DISABLE_SSL_CMAKE_ON=	-DEVHTP_DISABLE_SSL:STRING=ON
27
EVHTP_DISABLE_SSL_CMAKE_ON=	-DEVHTP_DISABLE_SSL:STRING=ON
Lines 40-53 Link Here
40
EVHTP_USE_DEFER_ACCEPT_DESC=	Enable TCP_DEFER_ACCEPT
38
EVHTP_USE_DEFER_ACCEPT_DESC=	Enable TCP_DEFER_ACCEPT
41
EVHTP_USE_DEFER_ACCEPT_CMAKE_ON=	-DEVHTP_USE_DEFER_ACCEPT:STRING=ON
39
EVHTP_USE_DEFER_ACCEPT_CMAKE_ON=	-DEVHTP_USE_DEFER_ACCEPT:STRING=ON
42
EVHTP_USE_DEFER_ACCEPT_CMAKE_OFF=	-DEVHTP_USE_DEFER_ACCEPT:STRING=OFF
40
EVHTP_USE_DEFER_ACCEPT_CMAKE_OFF=	-DEVHTP_USE_DEFER_ACCEPT:STRING=OFF
41
DEBUG_CMAKE_BUILD_TYPE_ON=	Debug
42
DEBUG_CMAKE_BUILD_TYPE_OFF=	Release
43
43
44
OPTIONS_DEFAULT=	EVHTP_BUILD_SHARED
44
OPTIONS_DEFAULT=	EVHTP_BUILD_SHARED
45
45
46
.include <bsd.port.options.mk>
46
.include <bsd.port.options.mk>
47
47
48
post-patch:
49
	${REINPLACE_CMD} 's/\/evhtp//' ${WRKSRC}/evhtp.pc.in
50
	${REINPLACE_CMD} 's/INCLUDE_INSTALL_DIR}\/evhtp/INCLUDE_INSTALL_DIR}/ ; s/PATCH_VERSION [0-9]*/PATCH_VERSION ${PORTVERSION:S/1.2.//}/' \
51
		${WRKSRC}/CMakeLists.txt
52
48
PLIST_FILES=	include/evhtp.h \
53
PLIST_FILES=	include/evhtp.h \
49
		include/evhtp-config.h \
54
		include/evhtp-config.h \
50
		include/htparse.h
55
		include/htparse.h \
56
		lib/pkgconfig/evhtp.pc
51
57
52
.if !exists(${LOCALBASE}/include/onigposix.h) && !${PORT_OPTIONS:MEVHTP_DISABLE_REGEX}
58
.if !exists(${LOCALBASE}/include/onigposix.h) && !${PORT_OPTIONS:MEVHTP_DISABLE_REGEX}
53
PLIST_FILES+=	include/onigposix.h
59
PLIST_FILES+=	include/onigposix.h
Lines 58-64 Link Here
58
.endif
64
.endif
59
65
60
.if ${PORT_OPTIONS:MEVHTP_BUILD_SHARED}
66
.if ${PORT_OPTIONS:MEVHTP_BUILD_SHARED}
61
PLIST_FILES+=	lib/libevhtp.so
67
PLIST_FILES+=	lib/libevhtp.so \
68
		lib/libevhtp.so.${PORTVERSION}
62
.else
69
.else
63
PLIST_FILES+=	lib/libevhtp.a
70
PLIST_FILES+=	lib/libevhtp.a
64
.endif
71
.endif
(-)www/libevhtp/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (ellzey-libevhtp-1.2.10-ba4c44e_GH0.tar.gz) = d5b022e2a3847ed7344bc7bca7ac7feb6b4a7e877d12452a15a96ba1c760d25a
1
SHA256 (ellzey-libevhtp-1.2.11_GH0.tar.gz) = 0e60ef0b75c9e0351d18e015c9a688a70d9c66d2ca3f6a44a7da7153e11e067d
2
SIZE (ellzey-libevhtp-1.2.10-ba4c44e_GH0.tar.gz) = 373482
2
SIZE (ellzey-libevhtp-1.2.11_GH0.tar.gz) = 429931
(-)www/libevhtp/files/patch-evhtp.c (-22 / +8 lines)
Lines 1-25 Link Here
1
--- evhtp.c.orig	2015-02-24 07:55:55 UTC
1
--- evhtp.c.orig	2015-11-19 15:02:20 UTC
2
+++ evhtp.c
2
+++ evhtp.c
3
@@ -7,6 +7,7 @@
3
@@ -2356,7 +2356,7 @@ evhtp_connection_pause(evhtp_connection_
4
 #include <strings.h>
5
 #include <inttypes.h>
6
 #ifndef WIN32
7
+#include <sys/types.h>
8
 #include <sys/socket.h>
9
 #include <netinet/in.h>
10
 #include <netinet/tcp.h>
11
@@ -3170,7 +3171,14 @@ evhtp_bind_sockaddr(evhtp_t * htp, struc
12
 
4
 
13
         sock = evconnlistener_get_fd(htp->server);
5
     c->paused = 1;
14
 
6
 
15
+#ifdef TCP_DEFER_ACCEPT
7
-    bufferevent_disable(c->bev, EV_READ | EV_WRITE);
16
         setsockopt(sock, IPPROTO_TCP, TCP_DEFER_ACCEPT, &one, (ev_socklen_t)sizeof(one));
8
+    bufferevent_disable(c->bev, EV_READ);
17
+#elif SO_ACCEPTFILTER
9
 
18
+        struct accept_filter_arg afa;
10
     return;
19
+        bzero(&afa, sizeof(afa));
11
 }
20
+        strcpy(afa.af_name, "httpready");
21
+        setsockopt(sock, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
22
+#endif
23
         setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, (ev_socklen_t)sizeof(one));
24
     }
25
 #endif
(-)www/libevhtp/files/patch-evhtp.h (-11 lines)
Lines 1-11 Link Here
1
--- evhtp.h.orig	2015-10-29 19:51:50 UTC
2
+++ evhtp.h
3
@@ -1285,7 +1285,7 @@ EVHTP_EXPORT evhtp_connection_t *
4
 evhtp_connection_new(evbase_t * evbase, const char * addr, uint16_t port);
5
 
6
 #ifndef DISABLE_SSL
7
-evhtp_connection_t * evhtp_connection_ssl_new(evbase_t * evbase, const char * addr, uint16_t port, evhtp_ssl_ctx_t * ctx);
8
+EVHTP_EXPORT evhtp_connection_t * evhtp_connection_ssl_new(evbase_t * evbase, const char * addr, uint16_t port, evhtp_ssl_ctx_t * ctx);
9
 #endif
10
 
11
 

Return to bug 204681