From nobody@FreeBSD.org  Sun Mar 27 18:10:21 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4DE5F106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 Mar 2011 18:10:21 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3BAB68FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 Mar 2011 18:10:21 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2RIALeR057179
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 Mar 2011 18:10:21 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2RIALcY057178;
	Sun, 27 Mar 2011 18:10:21 GMT
	(envelope-from nobody)
Message-Id: <201103271810.p2RIALcY057178@red.freebsd.org>
Date: Sun, 27 Mar 2011 18:10:21 GMT
From: David Naylor <naylor.b.david@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] dns/noip: Fix detection of network devices
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155975
>Category:       ports
>Synopsis:       [patch] dns/noip: Fix detection of network devices
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ehaupt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 27 18:20:09 UTC 2011
>Closed-Date:    Sun Mar 27 22:53:35 UTC 2011
>Last-Modified:  Sun Mar 27 22:53:35 UTC 2011
>Originator:     David Naylor
>Release:        FreeBSD-current
>Organization:
Private
>Environment:
FreeBSD dgserver.dg 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Fri Dec 17 19:43:44 SAST 2010     root@dragon.dg:/tmp/home/freebsd9/src/sys/DGSERVER  amd64

>Description:
noip2 fails to detect the network devices, displaying what appears to be a broken list.

The root cause of this is the failed attempt to define bsd_with_getifaddrs as the variable ARCH is used for that purpose and get overridden by ports with the current architecture.  

The attached patch fixes that and also passes ${CFLAGS} to `cc`.  The patch replaces files/patch-Makefile

P.S. Please could the "noip" UID/GID be added to the list?
>How-To-Repeat:
Do:
# cd /usr/ports/dns/noip
# make install conf

Observe the broken list of network devices
>Fix:
Pass -Dbsd_with_getifaddrs explicitly to `cc`.  

Patch attached with submission follows:

--- Makefile.orig	2009-11-17 20:19:54.000000000 +0100
+++ Makefile	2009-11-17 20:22:51.000000000 +0100
@@ -1,8 +1,8 @@
 TGT=noip2
-CC=gcc
+CC?=gcc
 PKG=noip-2.1.tgz
 
-PREFIX=/usr/local
+PREFIX?=/usr/local
 CONFDIR=${PREFIX}/etc
 BINDIR=${PREFIX}/bin
 
@@ -22,7 +22,7 @@
 # ARCH=sun
 
 ${TGT}: Makefile ${TGT}.c 
-	${CC} -Wall -g -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS}
+	${CC} ${CFLAGS} -Wall -Dbsd_with_getifaddrs -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS}
 
 install: ${TGT} 
 	if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ehaupt 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Mar 27 18:20:18 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155975 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Mar 27 22:53:12 UTC 2011 
State-Changed-Why:  
Duplicate of ports/155974. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155975 
>Unformatted:
