summaryrefslogtreecommitdiff
path: root/irc/znc/Makefile
blob: 78c734284177473137524eccfe26f06c7d58d0cc (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Created by: elvstone@gmail.com
# $FreeBSD$

PORTNAME=	znc
PORTVERSION=	0.206
CATEGORIES=	irc ipv6
MASTER_SITES=	http://znc.in/releases/

MAINTAINER=	jase@FreeBSD.org
COMMENT=	An advanced IRC bouncer

LICENSE=	GPLv2

FETCH_ARGS?=	-Fpr
GNU_CONFIGURE=	yes
USE_GMAKE=	yes
USE_GNOME=	gnomehack pkgconfig
WANT_PERL=	yes

OPTIONS=	DEBUG		"Enable debugging" off \
		IPV6		"Enable IPv6 support" on \
		CARES		"Use c-ares resolver library" off \
		OPENSSL		"Enable OpenSSL support" on \
		EXTRA		"Build extra modules" off \
		PERL		"Enable Perl module support" on \
		TCL		"Enable TCL module support" off \
		TCLALLOWALL	"Allow non-admin users to load TCL module" off \
		PYTHON		"Enable Python module support" off \
		SASL		"Enable SASL module support (requires EXTRA)" off

.include <bsd.port.options.mk>

.if defined(WITH_DEBUG)
CONFIGURE_ARGS+=	--enable-debug
.endif

.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+=	--disable-ipv6
.endif

.if defined(WITH_CARES)
LIB_DEPENDS+=		cares.2:${PORTSDIR}/dns/c-ares
.else
CONFIGURE_ARGS+=	--disable-c-ares
.endif

.if defined(WITH_OPENSSL)
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
PLIST_SUB+=		OPENSSL=""
.else
CONFIGURE_ARGS+=	--disable-openssl
PLIST_SUB+=		OPENSSL="@comment "
.endif

.if defined(WITH_PERL)
CONFIGURE_ARGS+=	--enable-perl
USE_PERL5=		yes
PLIST_SUB+=		PERL=""
BUILD_DEPENDS+=		swig>=1.3.40:${PORTSDIR}/devel/swig13
.else
PLIST_SUB+=		PERL="@comment "
.endif

.if defined(WITH_TCL)
USE_TCL=		84+
.include "${PORTSDIR}/Mk/bsd.tcl.mk"
CONFIGURE_ARGS+=	--enable-tcl --with-tcl=${TCL_LIBDIR}
PLIST_SUB+=		TCL=""
.else
CONFIGURE_ARGS+=	--without-tcl
PLIST_SUB+=		TCL="@comment "
.endif

.if defined(WITH_TCLALLOWALL)
.if defined(WITHOUT_TCL)
IGNORE=			tcl allow all support requires TCL. Please re-run 'make config' and enable TCL
.endif
CXXFLAGS+=		-DMOD_MODTCL_ALLOW_EVERYONE
.endif

.if defined(WITH_PYTHON)
USE_PYTHON=	3.1
USE_PERL5_BUILD=	yes
PLIST_SUB+=	PYTHON=""
CONFIGURE_ARGS+=	--enable-python=python-${PYTHON_VER}
BUILD_DEPENDS+=	swig>=1.3.40:${PORTSDIR}/devel/swig13
.else
PLIST_SUB+=	PYTHON="@comment "
.endif

.if defined(WITH_SASL)
.if defined(WITHOUT_EXTRA)
IGNORE=			sasl module requires EXTRA. Please re-run 'make config' and enable EXTRA
.endif
LIB_DEPENDS+=		sasl2.2:${PORTSDIR}/security/cyrus-sasl2
CONFIGURE_ARGS+=	--enable-sasl
LDFLAGS+=		-L${LOCALBASE}/lib
PLIST_SUB+=		SASL=""
.else
PLIST_SUB+=		SASL="@comment "
.endif

.if defined(WITH_EXTRA)
USE_ICONV=		yes
CONFIGURE_ARGS+=	--enable-extra
PLIST_SUB+=		EXTRA=""
.else
PLIST_SUB+=		EXTRA="@comment "
.endif

MANCOMPRESSED=	yes
MAN1=		znc.1 znc-buildmod.1 znc-config.1

.include <bsd.port.mk>