svn commit: r399858 - head/security/openvpn

Mathieu Arnold mat at FreeBSD.org
Tue Oct 20 15:03:45 UTC 2015


Author: mat
Date: Tue Oct 20 15:03:44 2015
New Revision: 399858
URL: https://svnweb.freebsd.org/changeset/ports/399858

Log:
  Use options helpers.
  
  Sponsored by:	Absolight

Modified:
  head/security/openvpn/Makefile

Modified: head/security/openvpn/Makefile
==============================================================================
--- head/security/openvpn/Makefile	Tue Oct 20 14:47:46 2015	(r399857)
+++ head/security/openvpn/Makefile	Tue Oct 20 15:03:44 2015	(r399858)
@@ -46,27 +46,19 @@ PW_SAVE_CONFIGURE_ENABLE=	password-save
 
 X509ALTUSERNAME_CONFIGURE_ENABLE=	x509-alt-username
 
-.include <bsd.port.options.mk>
+X509ALTUSERNAME_PREVENTS=	POLARSSL
+X509ALTUSERNAME_PREVENTS_MSG=	OpenVPN ${DISTVERSION} cannot use --x509-username-field with PolarSSL. Disable X509ALTUSERNAME, or use OpenSSL instead
 
-.if ${PORT_OPTIONS:MPOLARSSL}
-. if ${PORT_OPTIONS:MX509ALTUSERNAME}
-BROKEN=	OpenVPN ${DISTVERSION} cannot use --x509-username-field with PolarSSL. Disable X509ALTUSERNAME, or use OpenSSL instead
-. else
-LIB_DEPENDS+=		libpolarssl.so:${PORTSDIR}/security/polarssl
-CONFIGURE_ARGS+=	--with-crypto-library=polarssl
-. endif
-.else
-USE_OPENSSL=		yes
-CONFIGURE_ARGS+=	--with-crypto-library=openssl
-.endif
+POLARSSL_LIB_DEPENDS=		libpolarssl.so:${PORTSDIR}/security/polarssl
+POLARSSL_CONFIGURE_ON=	--with-crypto-library=polarssl
+POLARSSL_USE=		openssl=yes
+POLARSSL_CONFIGURE_OFF=	--with-crypto-library=openssl
 
 USE_RC_SUBR=		openvpn
 USE_LDCONFIG=		${PREFIX}/lib
 
 SUB_FILES=		pkg-message openvpn-client
 
-.include <bsd.port.pre.mk>
-
 .ifdef (LOG_OPENVPN)
 CFLAGS+=		-DLOG_OPENVPN=${LOG_OPENVPN}
 .endif
@@ -93,9 +85,9 @@ post-configure:
 	    ${WRKSRC}/src/plugins/auth-pam/Makefile \
 	    ${WRKSRC}/src/plugins/down-root/Makefile
 
+.if !defined(WITHOUT_CHECK)
 post-build:
 	@# self-tests here
-.if !defined(WITHOUT_CHECK)
 	@${ECHO} ; ${ECHO} "### Note that you can skip these lengthy selftests with WITHOUT_CHECK=yes ###" ; ${ECHO}
 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} check
 .endif
@@ -108,15 +100,15 @@ post-install:
 	@${REINPLACE_CMD} 's|resolvconf -p -a|resolvconf -a|' ${STAGEDIR}${PREFIX}/libexec/openvpn-client.up
 	${INSTALL_SCRIPT} ${WRKDIR}/openvpn-client ${STAGEDIR}${PREFIX}/sbin/openvpn-client
 	${MKDIR} ${STAGEDIR}${PREFIX}/include
-.if ${PORT_OPTIONS:MDOCS}
+
+post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}/
 .for i in AUTHORS ChangeLog PORTS
 	${INSTALL_MAN} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
 .endfor
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
+
+post-install-EXAMPLES-on:
 	(cd ${WRKSRC}/sample && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}/)
 	${CHMOD} ${BINMODE} ${STAGEDIR}${EXAMPLESDIR}/sample-scripts/*
-.endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>


More information about the svn-ports-all mailing list