ports/172517: [net-mgmt/flowd] OptionsNG Conversion
Gabor Pali
pgj at FreeBSD.org
Tue Oct 9 22:30:03 UTC 2012
>Number: 172517
>Category: ports
>Synopsis: [net-mgmt/flowd] OptionsNG Conversion
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Oct 09 22:30:03 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Gabor Pali
>Release: n/a
>Organization:
The FreeBSD Project
>Environment:
n/a
>Description:
- Convert options for OptionsNG format
>How-To-Repeat:
>Fix:
See the attached patch.
Patch attached with submission follows:
diff --git a/net-mgmt/flowd/Makefile b/net-mgmt/flowd/Makefile
index 10e0f3b..61c2ac8 100644
--- a/net-mgmt/flowd/Makefile
+++ b/net-mgmt/flowd/Makefile
@@ -15,8 +15,11 @@ MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \
MAINTAINER= janos.mohacsi at bsd.hu
COMMENT= The flowd is a small, fast, and secure NetFlow collector
-OPTIONS= PERL "Install flowd perl module" on \
- PYTHON "Install flowd Python support" off
+OPTIONS_DEFINE= PERL PYTHON
+OPTIONS_DEFAULT= PERL
+
+PERL_DESC= Install flowd perl module
+PYTHON_DESC= Install flowd Python support
.include <bsd.port.options.mk>
@@ -31,7 +34,7 @@ FLOWD_USER= _flowd
USERS= ${FLOWD_USER}
GROUPS= ${FLOWD_USER}
-.if defined(WITH_PERL)
+.if ${PORT_OPTIONS:MPERL}
USE_PERL5= yes
PLIST_SUB+= WITH_PERL=""
MAN3= Flowd.3
@@ -39,7 +42,7 @@ MAN3= Flowd.3
PLIST_SUB+= WITH_PERL="@comment "
.endif
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
USE_PYTHON= yes
PLIST_SUB+= WITH_PYTHON=""
INSTALLS_EGGINFO= yes
@@ -49,13 +52,13 @@ PLIST_SUB+= WITH_PYTHON="@comment "
pre-extract:
@${ECHO_MSG} ""
-.if defined(WITH_PERL)
+.if ${PORT_OPTIONS:MPERL}
@${ECHO_MSG} "Build with perl bindings."
.else
@${ECHO_MSG} "You can enable perl bindings by defining WITH_PERL"
.endif
@${ECHO_MSG} ""
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
@${ECHO_MSG} "Build with Python bindings."
.else
@${ECHO_MSG} "You can enable Python bindings by defining WITH_PYTHON."
@@ -69,12 +72,12 @@ post-patch:
${WRKSRC}/tools/wormsuspects.pl
post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
-.if defined(WITH_PERL)
+.if ${PORT_OPTIONS:MPERL}
cd ${WRKSRC}/Flowd-perl && \
${PERL} Makefile.PL INSTALLSITEMAN3DIR=${MAN3PREFIX}/man/man3 PREFIX=${PREFIX} && \
${GMAKE} && \
@@ -82,13 +85,13 @@ post-install:
-@${RM} -f ${PREFIX}/lib/perl5/${PERL_VERSION}/${PERL_ARCH}/perllocal.pod
.endif
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
cd ${WRKSRC} && \
${PYTHON_CMD} setup.py build && \
${PYTHON_CMD} setup.py install
.endif
-.if !defined(NOPORTEXAMPLES)
+.if ${PORT_OPTIONS:MEXAMPLES}
${MKDIR} ${EXAMPLESDIR}
@( cd ${WRKSRC}/tools && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/ )
.endif
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list