Bug 198943 - net/sixxs-aiccu make gnutls optional
Summary: net/sixxs-aiccu make gnutls optional
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-27 11:54 UTC by Bjoern A. Zeeb
Modified: 2015-03-30 14:24 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjoern A. Zeeb freebsd_committer 2015-03-27 11:54:39 UTC
Add an option to make gnutls an optional dependency:

Index: Makefile
===================================================================
--- Makefile    (revision 382328)
+++ Makefile    (working copy)
@@ -12,8 +12,6 @@ DISTNAME=     aiccu_20070115
 MAINTAINER=    ports@FreeBSD.org
 COMMENT=       SixXS IPv6 TIC+ tunnel broker heartbeat client
 
-LIB_DEPENDS=   libgnutls-openssl.so:${PORTSDIR}/security/gnutls
-
 LICENSE=       BSD3CLAUSE
 LICENSE_FILE=  ${WRKSRC}/doc/LICENSE
 
@@ -20,16 +18,27 @@ LICENSE_FILE=       ${WRKSRC}/doc/LICENSE
 USE_RC_SUBR=   sixxs-aiccu
 USES=          gmake
 
-CFLAGS+=       -D_REENTRANT -DAICCU_GNUTLS -I${LOCALBASE}/include
-LDFLAGS+=      -lpthread -L${LOCALBASE}/lib -lgnutls
+CFLAGS+=       -D_REENTRANT -I${LOCALBASE}/include
+LDFLAGS+=      -lpthread -L${LOCALBASE}/lib
 MAKE_ARGS+=    CC="${CC}" LDFLAGS="${LDFLAGS}"
 WRKSRC=                ${WRKDIR}/aiccu
 BUILD_WRKSRC=  ${WRKDIR}/aiccu/unix-console
 PORTDOCS=      README
 
-OPTIONS_DEFINE=        LOG_DAEMON DOCS
+OPTIONS_DEFINE=        GNUTLS LOG_DAEMON DOCS
+GNUTLS_DESC=   Use gnutls to secure TIC supporting starttls
 LOG_DAEMON_DESC=Log to LOG_DAEMON instead to LOG_LOCAL7
 
+OPTIONS_DEFAULT+=GNUTLS
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGNUTLS}
+LIB_DEPENDS=   libgnutls-openssl.so:${PORTSDIR}/security/gnutls
+CFLAGS+=       -DAICCU_GNUTLS
+LDFLAGS+=      -lgnutls
+.endif
+
 post-patch:
        @${REINPLACE_CMD} \
                -e 's:verbose true:verbose false:' \
@@ -40,8 +49,6 @@ post-patch:
                -e 's:ipv6_interface sixxs:ipv6_interface gif0:' \
                ${WRKSRC}/doc/aiccu.conf
 
-.include <bsd.port.options.mk>
-
 .if ${PORT_OPTIONS:MLOG_DAEMON}
 do-configure:
        @${REINPLACE_CMD} \
Comment 1 Tilman Keskinoz freebsd_committer 2015-03-30 14:23:58 UTC
committed, thanks
Comment 2 commit-hook freebsd_committer 2015-03-30 14:24:17 UTC
A commit references this bug:

Author: arved
Date: Mon Mar 30 14:23:47 UTC 2015
New revision: 382671
URL: https://svnweb.freebsd.org/changeset/ports/382671

Log:
  Add option to disable GNUTLS

  PR:		198943
  Submitted by:	bz

Changes:
  head/net/sixxs-aiccu/Makefile