aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/eiskaltdcpp-lib/Makefile
blob: 0ecf7f368dc2ff4a4dbbb89458f6da14f1ff00fe (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
62
63
64
65
66
67
68
69
70
# Created by: Stas Timokhin <stast@bsdportal.ru>
# $FreeBSD$

PORTNAME=   eiskaltdcpp
PORTVERSION=    2.2.9
PORTREVISION=   3
CATEGORIES= net-p2p
MASTER_SITES=   GOOGLE_CODE
PROJECTHOST=    eiskaltdc
PKGNAMESUFFIX?= -lib

MAINTAINER= fjoe@FreeBSD.org
COMMENT=    Direct Connect client shared library

LICENSE=    GPLv3

.if !defined (MASTERDIR)
LIB_DEPENDS=    libboost_system.so:${PORTSDIR}/devel/boost-libs

USES=       cmake gettext compiler:c++11-lib
USE_OPENSSL=    yes
USE_LDCONFIG=   yes

OPTIONS_DEFINE= LUA PCRE IDN DHT MINIUPNP
OPTIONS_DEFAULT=    IDN DHT
DHT_DESC=   DHT support
MINIUPNP_DESC=  UPnP support

CMAKE_ARGS+=    -DBUILD_LIB:BOOL=ON
CMAKE_ARGS+=    -DWITH_DEV_FILES:BOOL=ON
CMAKE_ARGS+=    -DUSE_QT:BOOL=OFF
CMAKE_ARGS+=    -DUSE_GTK:BOOL=OFF
CMAKE_ARGS+=    -DUSE_GTK3:BOOL=OFF
CMAKE_ARGS+=    -DUSE_ASPELL:BOOL=OFF

LUA_USES=   lua:51
LUA_CMAKE_ON=   -DLUA_SCRIPT:BOOL=ON
LUA_CMAKE_OFF=  -DLUA_SCRIPT:BOOL=OFF

PCRE_LIB_DEPENDS=   libpcre.so:${PORTSDIR}/devel/pcre
PCRE_CMAKE_ON=  -DPERL_REGEX:BOOL=ON
PCRE_CMAKE_OFF= -DPERL_REGEX:BOOL=OFF

IDN_LIB_DEPENDS=    libidn.so:${PORTSDIR}/dns/libidn
IDN_CMAKE_ON=   -DUSE_IDNA:BOOL=ON
IDN_CMAKE_OFF=  -DUSE_IDNA:BOOL=OFF

DHT_CMAKE_ON=   -DWITH_DHT:BOOL=ON
DHT_CMAKE_OFF=  -DWITH_DHT:BOOL=OFF

MINIUPNP_LIB_DEPENDS=   libminiupnpc.so:${PORTSDIR}/net/miniupnpc
MINIUPNP_CMAKE_ON=  -DUSE_MINIUPNP:BOOL=ON -DLOCAL_MINIUPNP:BOOL=OFF
MINIUPNP_CMAKE_OFF= -DUSE_MINIUPNP:BOOL=OFF
.endif

USES+=      tar:xz
PLIST=      ${.CURDIR}/pkg-plist

.if defined (MASTERDIR) && !defined (NO_BUILD)
CMAKE_ARGS+=    -DBUILD_LIB:BOOL=OFF
CMAKE_ARGS+=    -DEISKALTDCPP_INCLUDE_DIR:STRING="${LOCALBASE}/include/eiskaltdcpp"
CMAKE_ARGS+=    -DCMAKE_LIBRARY_PATH:PATH="${LOCALBASE}/lib:${PREFIX}/lib"
# these slave ports options have to be in sync with master library
CMAKE_ARGS+=    -DUSE_IDNA:BOOL=`${PKG_QUERY} '%Ok %Ov' ${PORTNAME}-lib | ${GREP} '^IDN ' | ${CUT} -f 2 -d ' '`
CMAKE_ARGS+=    -DWITH_DHT:BOOL=`${PKG_QUERY} '%Ok %Ov' ${PORTNAME}-lib | ${GREP} '^DHT ' | ${CUT} -f 2 -d ' '`
CMAKE_ARGS+=    -DLUA_SCRIPT:BOOL=`${PKG_QUERY} '%Ok %Ov' ${PORTNAME}-lib | ${GREP} '^LUA ' | ${CUT} -f 2 -d ' '`
CMAKE_ARGS+=    -DUSE_MINIUPNP:BOOL=`${PKG_QUERY} '%Ok %Ov' ${PORTNAME}-lib | ${GREP} '^MINIUPNP ' | ${CUT} -f 2 -d ' '`
.endif

.include <bsd.port.mk>