ports/172425: [PATCH] net/click: Converting port to new options framework
Michael Gmelin
freebsd at grem.de
Sun Oct 7 04:20:19 UTC 2012
>Number: 172425
>Category: ports
>Synopsis: [PATCH] net/click: Converting port to new options framework
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 07 04:20:16 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Michael Gmelin
>Release: FreeBSD 9.0-RELEASE amd64
>Organization:
Grem Equity GmbH
>Environment:
System: FreeBSD bsd64.grem.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC
>Description:
The patch below converts the port to use the new options framework[1]
and converts the Makefile header to the new format[2].
The patch is to be applied using:
patch -p0 -E </path/to/patchfile
No attempts have been made to fix any potential issues the port might
have beyond this scope. I also didn't fix any indentation issues to
keep the patch small and easy to audit, a future port maintainer might
want to take care of this.
See also:
1. http://lists.freebsd.org/pipermail/freebsd-ports/2012-October/078676.html
2. http://lists.freebsd.org/pipermail/freebsd-ports/2012-August/077801.html
Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix)
>How-To-Repeat:
>Fix:
--- click-1.5.0.patch begins here ---
diff -ruN --exclude=CVS ../click.orig/Makefile ./Makefile
--- ../click.orig/Makefile 2012-10-06 21:43:19.853324197 +0200
+++ ./Makefile 2012-10-06 22:03:24.347259879 +0200
@@ -1,9 +1,5 @@
-# Ports collection makefile for: click
-# Date created: 3 Nov 2001
-# Whom: gnn
-#
-# $FreeBSD: ports/net/click/Makefile,v 1.17 2011/08/27 18:13:28 eadler Exp $
-#
+# Created by: gnn
+# $FreeBSD: $
# XXX: TODO: fix kernel module
@@ -79,27 +75,30 @@
CONFDIR= ${PREFIX}/etc/click/conf
-OPTIONS= \
- XML "Enable XML support with expat" Off \
- USERCLICK "Build user-space Click" On \
- KERNEL_MODULE "Build BSD kernel module (BROKEN)" Off \
- ANALYSIS_ELEMS "Build network analysis elements" Off \
- ETHERSWITCH_ELEMS "Build etherswitch elements" Off \
- GRID_ELEMS "Build Grid elements (see FAQ)" Off \
- IPSEC_ELEMS "Build IPSEC elements" Off \
- LOCAL_ELEMS "Build local elements" Off \
- WIFI_ELEMS "Build Wi-Fi elements" Off \
- IPV6_ELEMS "Build IPv6 elements (EXPERIMENTAL)" Off \
- NS_ELEMS "Build NS elements (EXPERIMENTAL)" Off \
- RADIO_ELEMS "Build radio elements (EXPERIMENTAL)" Off
+OPTIONS_DEFINE= ANALYSIS_ELEMS ETHERSWITCH_ELEMS GRID_ELEMS \
+ IPSEC_ELEMS IPV6_ELEMS KERNEL_MODULE LOCAL_ELEMS \
+ NS_ELEMS RADIO_ELEMS USERCLICK WIFI_ELEMS XML_EXPAT
+OPTIONS_DEFAULT= USERCLICK
+ANALYSIS_ELEMS_DESC= Build network analysis elements
+ETHERSWITCH_ELEMS_DESC= Build etherswitch elements
+GRID_ELEMS_DESC= Build Grid elements (see FAQ)
+IPSEC_ELEMS_DESC= Build IPSEC elements
+IPV6_ELEMS_DESC= Build IPv6 elements (EXPERIMENTAL)
+KERNEL_MODULE_DESC= Build BSD kernel module (BROKEN)
+LOCAL_ELEMS_DESC= Build local elements
+NS_ELEMS_DESC= Build NS elements (EXPERIMENTAL)
+RADIO_ELEMS_DESC= Build radio elements (EXPERIMENTAL)
+USERCLICK_DESC= Build user-space Click
+WIFI_ELEMS_DESC= Build Wi-Fi elements
+XML_EXPAT_DESC= Enable XML support with expat
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
.if ${ARCH} == "alpha"
BROKEN= does not compile on alpha 4.x
.endif
-.if defined(WITH_XML)
+.if ${PORT_OPTIONS:MXML_EXPAT}
CONFIGURE_ARGS+= --with-expat=${LOCALBASE}
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2
PLIST_SUB+= XMLCLICK=""
@@ -107,13 +106,13 @@
PLIST_SUB+= XMLCLICK="@comment "
.endif
-.if !defined(WITH_USERCLICK)
+.if !${PORT_OPTIONS:MUSERCLICK}
CONFIGURE_ARGS+= --disable-userlevel
#.else
#MANN+= IPFlowRawSockets.n
.endif
-.if defined(WITH_KERNEL_MODULE)
+.if ${PORT_OPTIONS:MKERNEL_MODULE}
.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= kernel source files required
.endif
@@ -123,7 +122,7 @@
CONFIGURE_ARGS+= --disable-bsdmodule
.endif
-.if defined(WITH_ANALYSIS_ELEMS)
+.if ${PORT_OPTIONS:MANALYSIS_ELEMS}
CONFIGURE_ARGS+= --enable-analysis
MANN+= AggregateFilter.n TimeSortedSched.n TimeRange.n \
FromTcpdump.n ToIPFlowDumps.n AggregateLast.n \
@@ -136,12 +135,12 @@
AggregatePacketCounter.n TimeFilter.n
.endif
-.if defined(WITH_ETHERSWITCH_ELEMS)
+.if ${PORT_OPTIONS:METHERSWITCH_ELEMS}
CONFIGURE_ARGS+= --enable-etherswitch
MANN+= EtherSwitch.n ListenEtherSwitch.n
.endif
-.if defined(WITH_GRID_ELEMS)
+.if ${PORT_OPTIONS:MGRID_ELEMS}
CONFIGURE_ARGS+= --enable-grid
MANN+= ACKResponder.n ACKResponder2.n ACKRetrySender.n \
ACKRetrySender2.n AiroInfo.n BottleneckMetric.n \
@@ -164,17 +163,17 @@
YarvisMetric.n
.endif
-.if defined(WITH_IPSEC_ELEMS)
+.if ${PORT_OPTIONS:MIPSEC_ELEMS}
CONFIGURE_ARGS+= --enable-ipsec
MANN+= IPsecAuthSHA1.n IPsecDES.n IPsecESPUnencap.n \
IPsecESPEncap.n
.endif
-.if defined(WITH_LOCAL_ELEMS)
+.if ${PORT_OPTIONS:MLOCAL_ELEMS}
CONFIGURE_ARGS+= --enable-local
.endif
-.if defined(WITH_WIFI_ELEMS)
+.if ${PORT_OPTIONS:MWIFI_ELEMS}
CONFIGURE_ARGS+= --enable-wifi
MANN+= FilterPhyErr.n AssociationResponder.n FilterFailures.n \
ReadAnno.n PacketStore.n AvailableRates.n \
@@ -194,11 +193,11 @@
# The following Click elements are marked experimental as of 1.5.0.
#
-.if defined(WITH_IPV6_ELEMS)
+.if ${PORT_OPTIONS:MIPV6_ELEMS}
CONFIGURE_ARGS+= --enable-ipv6
.endif
-.if defined(WITH_NS_ELEMS)
+.if ${PORT_OPTIONS:MNS_ELEMS}
CONFIGURE_ARGS+= --enable-nsclick
MANN+= ToSimTrace.n ToSimDevice.u.n FromSimDevice.u.n \
EraseIPPayload.n
@@ -207,7 +206,7 @@
PLIST_SUB+= NSCLICK="@comment "
.endif
-.if defined(WITH_RADIO_ELEMS)
+.if ${PORT_OPTIONS:MRADIO_ELEMS}
CONFIGURE_ARGS+= --enable-radio
MANN+= RadioSim.n
.endif
@@ -229,4 +228,4 @@
@${ECHO_CMD} "----------------------------------------------------"
@${ECHO_CMD}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- click-1.5.0.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list