summaryrefslogtreecommitdiff
path: root/devel/opendht/Makefile
blob: 182edbd9ff44e597d8caed276b3d312406e9184b (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
57
58
59
60
61
PORTNAME=	opendht
DISTVERSIONPREFIX=	v
DISTVERSION=	3.3.1
PORTREVISION=	1
CATEGORIES=	devel net

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Lightweight Distributed Hash Table implementation
WWW=		https://github.com/savoirfairelinux/opendht/

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS=	${LOCALBASE}/include/asio.hpp:net/asio \
		boost-libs>0:devel/boost-libs \
		msgpack-cxx>0:devel/msgpack-cxx \
		restinio>0:www/restinio
LIB_DEPENDS=	libargon2.so:security/libargon2 \
		libfmt.so:devel/libfmt \
		libhttp_parser.so:www/http-parser \
		libjsoncpp.so:devel/jsoncpp \
		libllhttp.so:www/llhttp \
		libnettle.so:security/nettle \
		libgnutls.so:security/gnutls
RUN_DEPENDS=	msgpack-cxx>0:devel/msgpack-cxx
TEST_DEPENDS=	cppunit>0:devel/cppunit

USES=		cmake:testing compiler:c++17-lang localbase ncurses pathfix pkgconfig readline ssl

USE_GITHUB=	yes
GH_ACCOUNT=	savoirfairelinux
USE_LDCONFIG=	yes

LDFLAGS+=	-lcrypto

CMAKE_OFF=	OPENDHT_STATIC BUILD_TESTING OPENDHT_TESTS_NETWORK
CMAKE_TESTING_ON=	BUILD_TESTING OPENDHT_TESTS_NETWORK # tests Tests assert and crash, see https://github.com/savoirfairelinux/opendht/issues/696

OPTIONS_DEFINE=			INDEX PROXY_CLIENT PROXY_SERVER PUSH_NOTIFICATIONS DOCS
OPTIONS_DEFAULT=		INDEX PROXY_CLIENT PROXY_SERVER PUSH_NOTIFICATIONS DOCS

INDEX_DESC=			Build DHT indexation feature
INDEX_CMAKE_BOOL=		OPENDHT_INDEX

PROXY_CLIENT_DESC=		Enable DHT proxy client
PROXY_CLIENT_CMAKE_BOOL=	OPENDHT_PROXY_CLIENT

PROXY_SERVER_DESC=		Enable DHT proxy server
PROXY_SERVER_CMAKE_BOOL=	OPENDHT_PROXY_SERVER
PROXY_SERVER_LIB_DEPENDS=	libjsoncpp.so:devel/jsoncpp \
				librestbed.so:www/restbed

PUSH_NOTIFICATIONS_DESC=	Enable push notifications support
PUSH_NOTIFICATIONS_CMAKE_BOOL=	OPENDHT_PUSH_NOTIFICATIONS

PORTDOCS=	*

# several tests fail, see https://github.com/savoirfairelinux/opendht/issues/721
# tests throw exceptions, see https://github.com/savoirfairelinux/opendht/issues/751

.include <bsd.port.mk>