Index: head/net/haproxy-devel/Makefile =================================================================== --- head/net/haproxy-devel/Makefile (revision 446577) +++ head/net/haproxy-devel/Makefile (revision 446578) @@ -1,91 +1,92 @@ # Created by: Hugo Saro # $FreeBSD$ PORTNAME= haproxy DISTVERSION= 1.8-dev2 +PORTREVISION= 1 CATEGORIES= net www MASTER_SITES= http://www.haproxy.org/download/1.8/src/devel/ PKGNAMESUFFIX= -devel DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} MAINTAINER= demon@FreeBSD.org COMMENT= Reliable, high performance TCP/HTTP load balancer LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi CONFLICTS_INSTALL= haproxy-[1234567890]\* USES= cpe gmake USE_RC_SUBR= haproxy DEVICEATLAS_VERSION= 2.1.2_1 DEVICEATLAS_DISTFILE= deviceatlas-enterprise-c-${DEVICEATLAS_VERSION} DEVICEATLAS_REGISTRATION_URL= https://deviceatlas.com/deviceatlas-haproxy-module MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \ USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \ CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}" OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS OPTIONS_RADIO= PCRE OPTIONS_RADIO_PCRE= DPCRE SPCRE DPCRE_DESC= Link dynamically SPCRE_DESC= Link statically DEVICEATLAS_DESC= DeviceAtlas Device Detection support OPTIONS_DEFAULT= SPCRE OPENSSL .include .if ${PORT_OPTIONS:MDPCRE} LIB_DEPENDS+= libpcre.so:devel/pcre MAKE_ARGS+= USE_PCRE=1 USE_PCRE_JIT=1 .endif .if ${PORT_OPTIONS:MSPCRE} BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcre.a:devel/pcre MAKE_ARGS+= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1 .endif .if ${PORT_OPTIONS:MDEVICEATLAS} .if !exists(${DISTDIR}/${DEVICEATLAS_DISTFILE}.tgz) IGNORE?= you must manually fetch the DeviceAtlas Device Detection C API from ${DEVICEATLAS_REGISTRATION_URL} and place it in ${DISTDIR} and then run make again .else RESTRICTED= The redistribution of the DeviceAtlas Device Detection C API is not permitted DISTFILES+= ${DEVICEATLAS_DISTFILE}.tgz MAKE_ARGS+= USE_DEVICEATLAS=1 DEVICEATLAS_SRC=${WRKDIR}/deviceatlas-enterprise-c-${DEVICEATLAS_VERSION}/Src .endif .if ! ${PORT_OPTIONS:MDPCRE} && ! ${PORT_OPTIONS:MSPCRE} IGNORE?= enable PCRE support to use DeviceAtlas .endif .endif .if ${PORT_OPTIONS:MOPENSSL} USES+= ssl MAKE_ARGS+= USE_OPENSSL=1 .endif .if ${PORT_OPTIONS:MLUA} USES+= lua:53 MAKE_ARGS+= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER} .endif post-build: cd ${WRKSRC}/contrib/halog && ${MAKE_CMD} ${MAKE_ENV} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_PROGRAM} ${WRKSRC}/contrib/halog/halog ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) .include .if ${ARCH} == "amd64" || ${ARCH} == "i386" MAKE_ARGS+= USE_REGPARM=1 .endif .include Index: head/net/haproxy-devel/files/patch-src_ssl__sock.c =================================================================== --- head/net/haproxy-devel/files/patch-src_ssl__sock.c (nonexistent) +++ head/net/haproxy-devel/files/patch-src_ssl__sock.c (revision 446578) @@ -0,0 +1,120 @@ +--- src/ssl_sock.c.orig 2017-06-02 13:59:51 UTC ++++ src/ssl_sock.c +@@ -56,7 +56,7 @@ + #include + #endif + +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + #include + #endif + +@@ -362,7 +362,7 @@ fail_get: + } + #endif + +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + /* + * openssl async fd handler + */ +@@ -1034,10 +1034,13 @@ static int ssl_sock_load_ocsp(SSL_CTX *c + ocsp = NULL; + + #ifndef SSL_CTX_get_tlsext_status_cb +-# define SSL_CTX_get_tlsext_status_cb(ctx, cb) \ +- *cb = (void (*) (void))ctx->tlsext_status_cb; ++#ifndef SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB ++#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128 + #endif ++ callback = SSL_CTX_ctrl(ctx, SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB, 0, callback); ++#else + SSL_CTX_get_tlsext_status_cb(ctx, &callback); ++#endif + + if (!callback) { + struct ocsp_cbk_arg *cb_arg = calloc(1, sizeof(*cb_arg)); +@@ -1063,7 +1066,10 @@ static int ssl_sock_load_ocsp(SSL_CTX *c + int key_type; + EVP_PKEY *pkey; + +-#ifdef SSL_CTX_get_tlsext_status_arg ++#if defined(SSL_CTX_get_tlsext_status_arg) || (LIBRESSL_VERSION_NUMBER >= 0x2050100fL) ++#ifndef SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG ++#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129 ++#endif + SSL_CTX_ctrl(ctx, SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG, 0, &cb_arg); + #else + cb_arg = ctx->tlsext_status_arg; +@@ -3403,7 +3409,7 @@ int ssl_sock_load_cert_list_file(char *f + #define SSL_MODE_SMALL_BUFFERS 0 + #endif + +-#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) && !defined(OPENSSL_IS_BORINGSSL) ++#if (OPENSSL_VERSION_NUMBER < 0x1010000fL) && !defined(OPENSSL_IS_BORINGSSL) || defined(LIBRESSL_VERSION_NUMBER) + static void ssl_set_SSLv3_func(SSL_CTX *ctx, int is_server) + { + #if SSL_OP_NO_SSLv3 +@@ -3560,7 +3566,7 @@ ssl_sock_initial_ctx(struct bind_conf *b + options &= ~SSL_OP_CIPHER_SERVER_PREFERENCE; + SSL_CTX_set_options(ctx, options); + +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + if (global_ssl.async) + mode |= SSL_MODE_ASYNC; + #endif +@@ -4010,7 +4016,7 @@ int ssl_sock_prepare_srv_ctx(struct serv + options |= SSL_OP_NO_TICKET; + SSL_CTX_set_options(ctx, options); + +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + if (global_ssl.async) + mode |= SSL_MODE_ASYNC; + #endif +@@ -4526,7 +4532,7 @@ int ssl_sock_handshake(struct connection + fd_cant_recv(conn->t.sock.fd); + return 0; + } +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + else if (ret == SSL_ERROR_WANT_ASYNC) { + ssl_async_process_fds(conn, conn->xprt_ctx); + return 0; +@@ -4610,7 +4616,7 @@ int ssl_sock_handshake(struct connection + fd_cant_recv(conn->t.sock.fd); + return 0; + } +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + else if (ret == SSL_ERROR_WANT_ASYNC) { + ssl_async_process_fds(conn, conn->xprt_ctx); + return 0; +@@ -4802,7 +4808,7 @@ static int ssl_sock_to_buf(struct connec + fd_cant_recv(conn->t.sock.fd); + break; + } +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + else if (ret == SSL_ERROR_WANT_ASYNC) { + ssl_async_process_fds(conn, conn->xprt_ctx); + break; +@@ -4910,7 +4916,7 @@ static int ssl_sock_from_buf(struct conn + __conn_sock_want_recv(conn); + break; + } +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + else if (ret == SSL_ERROR_WANT_ASYNC) { + ssl_async_process_fds(conn, conn->xprt_ctx); + break; +@@ -4933,7 +4939,7 @@ static int ssl_sock_from_buf(struct conn + static void ssl_sock_close(struct connection *conn) { + + if (conn->xprt_ctx) { +-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL ++#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(LIBRESSL_VERSION_NUMBER) + if (global_ssl.async) { + OSSL_ASYNC_FD all_fd[32], afd; + size_t num_all_fds = 0; Property changes on: head/net/haproxy-devel/files/patch-src_ssl__sock.c ___________________________________________________________________ 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