freebsd-ports/security/libssh2/Makefile
Felix Palmen 742d2cce37 security/libssh2: Import upstream libressl-3.5 fix
Backport upstream commit instead of using own local patch. Also bump
port revision, it will change the binary when built with libressl.

Approved by:		sbz (maintainer, timeout), tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D37278
2022-11-24 12:12:04 +01:00

48 lines
1.2 KiB
Makefile

PORTNAME= libssh2
PORTVERSION= 1.10.0
PORTREVISION= 1
PORTEPOCH= 3
CATEGORIES= security devel
MASTER_SITES= https://www.libssh2.org/download/ \
LOCAL/sbz
MAINTAINER= sbz@FreeBSD.org
COMMENT= Library implementing the SSH2 protocol
WWW= https://www.libssh2.org/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
USES= compiler:c11 cpe libtool pathfix
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
TEST_TARGET= check
OPTIONS_DEFINE= GCRYPT TRACE ZLIB
OPTIONS_DEFAULT= ZLIB
TRACE_DESC= Enable debug packet traces
GCRYPT_LIB_DEPENDS= libgcrypt.so:security/libgcrypt
GCRYPT_USES_OFF= ssl
GCRYPT_CONFIGURE_ON= --with-crypto=libgcrypt
GCRYPT_CONFIGURE_OFF= --with-crypto=openssl
GCRYPT_CPPFLAGS= -I${LOCALBASE}/include
GCRYPT_LIBS= -L${LOCALBASE}/lib
TRACE_CONFIGURE_ENABLE= debug
ZLIB_CONFIGURE_WITH= libz
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e '/Libs:/s/@LIBS@//' \
${WRKSRC}/libssh2.pc.in
.if ! ${PORT_OPTIONS:MGCRYPT}
. if ${SSL_DEFAULT} == base
@${REINPLACE_CMD} -e 's/LIBSREQUIRED="$$LIBSREQUIRED$${LIBSREQUIRED:+ }libssl libcrypto"/LIBS="$$LIBS -lssl -lcrypto"/' \
${WRKSRC}/configure
. endif
.endif
.include <bsd.port.post.mk>