Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2013 18:32:56 GMT
From:      "Ilya A. Arkhipov" <rum1cro@yandex.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/178425: [net-mgmt/dhcdrop] patch for moving to optionsng + fix building on clang
Message-ID:  <201305081832.r48IWunZ009668@oldred.FreeBSD.org>
Resent-Message-ID: <201305081840.r48Ie2c2056859@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         178425
>Category:       ports
>Synopsis:       [net-mgmt/dhcdrop] patch for moving to optionsng + fix building on clang
>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:   Wed May 08 18:40:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Ilya A. Arkhipov
>Release:        10.0-CURRENT
>Organization:
Rambler
>Environment:
FreeBSD mhome 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Thu Mar 29 18:04:50 UTC 2012     root@mhome:/usr/obj/usr/src/sys/MICROKERNEL  amd64
>Description:
[net-mgmt/dhcdrop] patch for moving to optionsng + fix building on clang
>How-To-Repeat:
install it ^_^
>Fix:
diff -Nru dhcdrop_old/Makefile dhcdrop/Makefile
--- dhcdrop_old/Makefile        2013-05-08 21:29:38.782704925 +0400
+++ dhcdrop/Makefile    2013-05-08 22:14:50.764706297 +0400
@@ -1,9 +1,5 @@
-# New ports collection makefile for:    dhcdrop
-# Date created:         Aug 9 2009
-# Whom:                 Nick F
-#
-# $FreeBSD: ports/net-mgmt/dhcdrop/Makefile,v 1.2 2012/11/17 06:00:31 svnexp Exp $
-#
+# Created by: Nick F <ffault@gmail.com>
+# $FreeBSD$

 PORTNAME=      dhcdrop
 PORTVERSION=   0.5
@@ -21,12 +17,18 @@

 PLIST_FILES=   sbin/dhcdrop

-OPTIONS=       STATIC "Build a static version of dhcdrop" off
+OPTIONS_DEFINE=        STATIC
+STATIC_DESC=   Build a static version of dhcdrop

 .include <bsd.port.options.mk>

-.if defined(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
 CONFIGURE_ARGS+=--enable-static-build
 .endif

+pre-build:
+       @${REINPLACE_CMD} -e \
+               's,inline void rand_ether_addr,static void rand_ether_addr,' \
+                       ${WRKSRC}/src/dhcdrop.[c,h]
+
 .include <bsd.port.mk>


Patch attached with submission follows:

diff -Nru dhcdrop_old/Makefile dhcdrop/Makefile
--- dhcdrop_old/Makefile	2013-05-08 21:29:38.782704925 +0400
+++ dhcdrop/Makefile	2013-05-08 22:14:50.764706297 +0400
@@ -1,9 +1,5 @@
-# New ports collection makefile for:    dhcdrop
-# Date created:         Aug 9 2009
-# Whom:                 Nick F
-#
-# $FreeBSD: ports/net-mgmt/dhcdrop/Makefile,v 1.2 2012/11/17 06:00:31 svnexp Exp $
-#
+# Created by: Nick F <ffault@gmail.com>
+# $FreeBSD$
 
 PORTNAME=	dhcdrop
 PORTVERSION=	0.5
@@ -21,12 +17,18 @@
 
 PLIST_FILES=	sbin/dhcdrop
 
-OPTIONS=	STATIC "Build a static version of dhcdrop" off
+OPTIONS_DEFINE=	STATIC
+STATIC_DESC=	Build a static version of dhcdrop
 
 .include <bsd.port.options.mk>
 
-.if defined(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC}
 CONFIGURE_ARGS+=--enable-static-build
 .endif
 
+pre-build:
+	@${REINPLACE_CMD} -e \
+		's,inline void rand_ether_addr,static void rand_ether_addr,' \
+			${WRKSRC}/src/dhcdrop.[c,h]
+
 .include <bsd.port.mk>


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305081832.r48IWunZ009668>