net/haproxy: Fix linking SSL libs

- Pass lib and include paths to make
 - Optionsify

PR:             225149
Approved by:    demon (maintainer)
This commit is contained in:
Bernard Spil 2018-01-15 21:12:58 +00:00
parent 7c807fff74
commit bd94dc9f20
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=459116

View File

@ -30,31 +30,25 @@ SPCRE_DESC= Link statically
DEVICEATLAS_DESC= DeviceAtlas Device Detection support
OPTIONS_DEFAULT= SPCRE OPENSSL
.include <bsd.port.options.mk>
DPCRE_LIB_DEPENDS= libpcre.so:devel/pcre
DPCRE_MAKE_ARGS= USE_PCRE=1 USE_PCRE_JIT=1
SPCRE_LIB_DEPENDS= libpcre.so:devel/pcre
SPCRE_MAKE_ARGS= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1
DEVICEATLAS_LIB_DEPENDS= libda.so:net/deviceatlas-enterprise-c
DEVICEATLAS_MAKE_ARGS= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include
OPENSSL_USES= ssl
OPENSSL_MAKE_ARGS= USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC}
LUA_USES= lua:53
LUA_MAKE_ARGS= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER}
.if ${PORT_OPTIONS:MDPCRE}
LIB_DEPENDS+= libpcre.so:devel/pcre
MAKE_ARGS+= USE_PCRE=1 USE_PCRE_JIT=1
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
MAKE_ARGS+= USE_REGPARM=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}
LIB_DEPENDS+= libda.so:net/deviceatlas-enterprise-c
MAKE_ARGS+= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include
.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}
.if ${PORT_OPTIONS:MOPENSSL} && ${SSL_DEFAULT:Mopenssl-devel}
BROKEN= Does not build with openssl-devel
.endif
post-build:
@ -69,14 +63,4 @@ do-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
MAKE_ARGS+= USE_REGPARM=1
.endif
.if ${PORT_OPTIONS:MOPENSSL} && ${SSL_DEFAULT:Mopenssl-devel}
BROKEN= Does not build with openssl-devel
.endif
.include <bsd.port.post.mk>