summaryrefslogtreecommitdiff
path: root/security/libssh/Makefile
blob: 2ca92b4266ab1906666f5fce8306e38fb9308574 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# New ports collection makefile for:	libssh
# Date created:				12 April 2009
# Whom:					Alexander Logvinov <ports@logvinov.com>
#
# $FreeBSD$
#

PORTNAME=	libssh
PORTVERSION=	0.4.5
CATEGORIES=	security devel
MASTER_SITES=	http://www.libssh.org/files/ \
		LOCAL/avl

MAINTAINER=	avl@FreeBSD.org
COMMENT=	A library implementing the SSH1 and SSH2 protocol

OPTIONS=	GCRYPT	"Build with libgcrypt"		off \
		SSH1	"Build with SSH1 support"	off

MAKE_JOBS_SAFE=	yes
USE_CMAKE=	yes
CMAKE_SOURCE_PATH=	${WRKSRC}
CONFIGURE_WRKSRC=	${CMAKE_SOURCE_PATH}/build
BUILD_WRKSRC=		${CONFIGURE_WRKSRC}
INSTALL_WRKSRC?=	${BUILD_WRKSRC}
USE_LDCONFIG=	yes

LICENSE=	GPLv2 BSD
LICENSE_COMB=	multi
LICENSE_FILE_GPLv2=	${WRKSRC}/COPYING
LICENSE_FILE_BSD=	${WRKSRC}/BSD

.include <bsd.port.options.mk>

.if defined(WITH_GCRYPT)
LIB_DEPENDS+=	gcrypt.17:${PORTSDIR}/security/libgcrypt
CMAKE_ARGS+=	-DWITH_GCRYPT:BOOL=ON
.else
USE_OPENSSL=	yes
.endif

.if defined(WITH_SSH1)
CMAKE_ARGS+=	-DWITH_SSH1:BOOL=ON
PLIST_SUB+=	SSH1=""
.else
CMAKE_ARGS+=	-DWITH_SSH1:BOOL=OFF
PLIST_SUB+=	SSH1="@comment "
.endif

post-patch:
	@${MKDIR} ${BUILD_WRKSRC}
	@${RM} ${PATCH_WRKSRC}/cmake/Modules/UseDoxygen.cmake
	@${REINPLACE_CMD} -e '/add_subdirectory.*s)/d' \
		${PATCH_WRKSRC}/CMakeLists.txt

.include <bsd.port.mk>