ports/172438: [PATCH] net/xorp-devel: Converting port to new options framework

Michael Gmelin freebsd at grem.de
Sun Oct 7 04:20:23 UTC 2012


>Number:         172438
>Category:       ports
>Synopsis:       [PATCH] net/xorp-devel: 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:21 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:

--- xorp-devel-2009120801_1.patch begins here ---
diff -ruN --exclude=CVS ../xorp-devel.orig/Makefile ./Makefile
--- ../xorp-devel.orig/Makefile	2012-10-06 23:34:45.058995344 +0200
+++ ./Makefile	2012-10-07 01:53:17.535414274 +0200
@@ -1,42 +1,39 @@
-# New ports collection makefile for:	xorp
-# Date created:		22nd September 2006
-# Whom:			Bruce M Simpson <bms at FreeBSD.org>
-#
-# $FreeBSD: ports/net/xorp-devel/Makefile,v 1.6 2011/11/01 20:46:06 dougb Exp $
-#
+# Created by: Bruce M Simpson <bms at FreeBSD.org>
+# $FreeBSD: $
 
-PORTNAME=	xorp-devel
-PORTVERSION=	2009120801
-PORTREVISION=	1
-CATEGORIES=	net
-MASTER_SITES=	${MASTER_SITE_LOCAL}
+PORTNAME=		xorp-devel
+PORTVERSION=		2009120801
+PORTREVISION=		1
+CATEGORIES=		net
+MASTER_SITES=		${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	bms
-DISTNAME=	xorp-${PORTVERSION}
+DISTNAME=		xorp-${PORTVERSION}
 
-MAINTAINER=	ports at FreeBSD.org
-COMMENT=	Open source network routing platform, development branch
+MAINTAINER=		ports at FreeBSD.org
+COMMENT=		Open source network routing platform, development branch
 
 # Uses libcurses, libcrypto, librt from base system.
-BUILD_DEPENDS=	${LOCALBASE}/include/boost/version.hpp:${PORTSDIR}/devel/boost-libs
-LIB_DEPENDS=	boost_regex.4:${PORTSDIR}/devel/boost-libs \
-		pcap.1:${PORTSDIR}/net/libpcap
-
-CONFLICTS=	xorp-1*
-
-NOMAN=		defined
-
-USE_BZIP2=	yes
-USE_GCC=	4.2+
-USE_SCONS=	yes
-#USE_OPENSSL=	yes
-MAKE_JOBS_SAFE=	defined
-
-OPTIONS=								\
-	    OPTIMIZE	 "Build with optimization" On			\
-	    ORIGIN	 "Use ORIGIN with shared libraries" On		\
-	    SHARED	 "Build with shared libraries" On		\
-	    STRIP	 "Strip binaries before installing" On		\
-	    TCP_RPC	 "Use TCP as RPC transport (defaults to AF_LOCAL)" Off
+BUILD_DEPENDS=		${LOCALBASE}/include/boost/version.hpp:${PORTSDIR}/devel/boost-libs
+LIB_DEPENDS=		boost_regex.4:${PORTSDIR}/devel/boost-libs \
+			pcap.1:${PORTSDIR}/net/libpcap
+
+CONFLICTS=		xorp-1*
+
+NOMAN=			defined
+
+USE_BZIP2=		yes
+USE_GCC=		4.2+
+USE_SCONS=		yes
+#USE_OPENSSL=		yes
+MAKE_JOBS_SAFE=		defined
+
+OPTIONS_DEFINE=		OPTIMIZE ORIGIN SHARED STRIP TCP_RPC
+OPTIONS_DEFAULT=	OPTIMIZE ORIGIN SHARED STRIP
+OPTIMIZE_DESC=		Build with optimization
+ORIGIN_DESC=		Use ORIGIN with shared libraries
+SHARED_DESC=		Build with shared libraries
+STRIP_DESC=		Strip binaries before installing
+TCP_RPC_DESC=		Use TCP as RPC transport (defaults to AF_LOCAL)
 
 #
 # To roll snapshot: as bms: make BOOTSTRAP=defined fetch
@@ -57,40 +54,40 @@
 .endif
 .endif # defined(BOOTSTRAP)
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 XORP_GROUP=	xorp
 USE_RC_SUBR=	xorp
 
 SCONS_ARGS+=	prefix=${PREFIX}
 
-.if defined(WITHOUT_OPTIMIZE)
+.if !${PORT_OPTIONS:MOPTIMIZE}
 SCONS_ARGS+=	optimize=no
 .else
 SCONS_ARGS+=	optimize=yes
 .endif
 
-.if defined(WITHOUT_SHARED)
+.if !${PORT_OPTIONS:MSHARED}
 SCONS_ARGS+=	shared=false
 PLIST_SUB+=	XORP_SHLIB="@comment "
 .else
 SCONS_ARGS+=	shared=true
 PLIST_SUB+=	XORP_SHLIB=""
 USE_LDCONFIG=	${PREFIX}/lib/xorp/lib
-. if defined (WITHOUT_ORIGIN)
+.if !${PORT_OPTIONS:MORIGIN}
 SCONS_ARGS+=	origin=false
 . else
 SCONS_ARGS+=	origin=true
 . endif
 .endif
 
-.if defined(WITHOUT_STRIP)
+.if !${PORT_OPTIONS:MSTRIP}
 SCONS_ARGS+=	strip=false
 .else
 SCONS_ARGS+=	strip=true
 .endif
 
-.if defined(WITH_TCP_RPC)
+.if ${PORT_OPTIONS:MTCP_RPC}
 SCONS_ARGS+=	transport=tcp
 .else
 SCONS_ARGS+=	transport=local
@@ -103,4 +100,4 @@
 post-install:
 	${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- xorp-devel-2009120801_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list