aboutsummaryrefslogtreecommitdiff
path: root/irc/ircd-hybrid/Makefile
diff options
context:
space:
mode:
authorSanthosh Raju <fox@FreeBSD.org>2020-01-26 05:48:16 +0000
committerSanthosh Raju <fox@FreeBSD.org>2020-01-26 05:48:16 +0000
commit469129fecead2724363e27be559fa6a2c14d7c27 (patch)
treeb489b7f7f4c2ba44e2fc102d2765af33cf52a300 /irc/ircd-hybrid/Makefile
parentf3c8535eef564b358b200935ba92d1f9bc76691b (diff)
downloadports-469129fecead2724363e27be559fa6a2c14d7c27.tar.gz
ports-469129fecead2724363e27be559fa6a2c14d7c27.zip
irc/ircd-hybrid: Adds support for alternative TLS.
- Adds options for GnuTLS and WolfSSL. - Minor portlint / portfmt fixes. Reviewed by: philip
Notes
Notes: svn path=/head/; revision=524154
Diffstat (limited to 'irc/ircd-hybrid/Makefile')
-rw-r--r--irc/ircd-hybrid/Makefile42
1 files changed, 32 insertions, 10 deletions
diff --git a/irc/ircd-hybrid/Makefile b/irc/ircd-hybrid/Makefile
index b1f7d94e01ec..2cb9ce70d0d7 100644
--- a/irc/ircd-hybrid/Makefile
+++ b/irc/ircd-hybrid/Makefile
@@ -11,11 +11,13 @@ COMMENT= Fast irc daemon with a number of new features
LICENSE= GPLv2
-INSTALL_IGNORES= ircu-* ircd-rat* charby*
-
# :keepla because port uses lt_dlopen
USES= cpe gmake libtool:keepla tar:tgz
GNU_CONFIGURE= yes
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+LIB_DEPENDS+= libltdl.so:devel/libltdl
USERS= ircd
GROUPS= ${USERS}
@@ -24,27 +26,47 @@ USE_RC_SUBR= ircd-hybrid
SUB_FILES= pkg-message
PLIST_SUB= PORTVERSION=${PORTVERSION}
-OPTIONS_DEFINE= OPENSSL ASSERT
-OPTIONS_DEFAULT=OPENSSL
+OPTIONS_DEFINE= ASSERT
+OPTIONS_RADIO= TLS
+OPTIONS_RADIO_TLS= GNUTLS OPENSSL WOLFSSL
+OPTIONS_DEFAULT= OPENSSL
+OPTIONS_SUB= yes
ASSERT_CONFIGURE_ENABLE= assert
-ASSERT_DESC= Enable parts of the debugging code
+ASSERT_DESC= Enable parts of the debugging code
OPENSSL_DESC= Enable openssl - allows use of CHALLENGE and encrypted links
INSTALL_TARGET= install-strip
+INSTALL_IGNORES= charby* ircd-rat* ircu-*
+
+CERTSFILE= ${LOCALBASE}/share/certs/ca-root-nss.crt
+
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPENSSL}
-USES += ssl
+USES+= ssl
CONFIGURE_ARGS+= --with-tls=openssl
+CONFIGURE_ENV+= libssl_CFLAGS="-I${OPENSSLINC}" \
+ libssl_LIBS="-L${OPENSSLLIB} -lssl -lcrypto"
+.elif ${PORT_OPTIONS:MGNUTLS}
+LIB_DEPENDS+= libgnutls.so:security/gnutls
+CONFIGURE_ARGS+= --with-tls=gnutls
+.elif ${PORT_OPTIONS:MWOLFSSL}
+LIB_DEPENDS+= libwolfssl.so:security/wolfssl
+CONFIGURE_ARGS+= --with-tls=wolfssl
+.else
+CONFIGURE_ARGS+= --with-tls=none
+.endif
+
+.if ${PORT_OPTIONS:MGNUTLS} || ${PORT_OPTIONS:MOPENSSL} || ${PORT_OPTIONS:MWOLFSSL}
+RUN_DEPENDS+= ${CERTSFILE}:security/ca_root_nss
.endif
-CONFIGURE_ARGS+= \
- --sysconfdir=${PREFIX}/etc/ircd-hybrid \
- --datarootdir=${PREFIX}/share/${PORTNAME}-${PORTVERSION} \
- --localstatedir=/var
+CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/${PORTNAME}-${PORTVERSION} \
+ --localstatedir=/var \
+ --sysconfdir=${PREFIX}/etc/ircd-hybrid
post-install:
@${MV} ${STAGEDIR}${PREFIX}/bin/mkpasswd ${STAGEDIR}${PREFIX}/bin/ircd-hybrid-mkpasswd