From root@gallows.inf.ed.ac.uk  Tue Jul 24 10:39:04 2012
Return-Path: <root@gallows.inf.ed.ac.uk>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 00B4D106564A;
	Tue, 24 Jul 2012 10:39:04 +0000 (UTC)
	(envelope-from root@gallows.inf.ed.ac.uk)
Received: from nougat.ucs.ed.ac.uk (nougat.ucs.ed.ac.uk [129.215.13.205])
	by mx1.freebsd.org (Postfix) with ESMTP id 807D38FC08;
	Tue, 24 Jul 2012 10:39:03 +0000 (UTC)
Received: from gallows.inf.ed.ac.uk (gallows.inf.ed.ac.uk [129.215.164.39])
	by nougat.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id q6OAd2so013277;
	Tue, 24 Jul 2012 11:39:02 +0100 (BST)
Received: by gallows.inf.ed.ac.uk (Postfix, from userid 0)
	id A5B315E6F; Tue, 24 Jul 2012 11:37:56 +0100 (BST)
Message-Id: <20120724103756.A5B315E6F@gallows.inf.ed.ac.uk>
Date: Tue, 24 Jul 2012 11:37:56 +0100 (BST)
From: William Waites <wwaites@tardis.ed.ac.uk>
Reply-To: William Waites <wwaites@tardis.ed.ac.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc: jhay@freebsd.org
Subject: net/olsrd fails to build with -DWITH_MULTI_IF
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         170107
>Category:       ports
>Synopsis:       net/olsrd fails to build with -DWITH_MULTI_IF
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jhay
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 24 10:40:10 UTC 2012
>Closed-Date:    
>Last-Modified:  Tue Jul 24 10:40:20 UTC 2012
>Originator:     William Waites
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
University of Edinburgh
>Environment:
System: FreeBSD gallows.inf.ed.ac.uk 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
	net/olsrd fails to build with -DWITH_MULTI_IF because the appropriate
	CFLAGS and LDFLAGS for finding the libnet library do not make it down
	through the build process.

>How-To-Repeat:
	cd /usr/ports/net/olsrd && make -DWITH_MULTI_IF

>Fix:
	This might not be the best ports-idiomatic way to solve the problem,
	but it does work.

diff -ruN net/olsrd.orig/Makefile net/olsrd/Makefile
--- net/olsrd.orig/Makefile	2012-07-24 11:33:34.000000000 +0100
+++ net/olsrd/Makefile	2012-07-24 11:32:46.000000000 +0100
@@ -34,6 +34,8 @@
 
 .if defined(WITH_MULTI_IF)
 MAKE_ARGS+=	LIBNET=1
+CFLAGS+=	-I${PREFIX}/include/libnet11
+LDFLAGS+=	-L${PREFIX}/lib/libnet11
 .endif
 .if defined(PREFIX)
 MAKE_ARGS+=	PREFIX=${PREFIX}
@@ -45,6 +47,8 @@
 CFLAGS+=	-fPIC
 .endif
 
+MAKE_ARGS+=	CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+
 .if !defined(WITH_MULTI_IF)
 pre-everything::
 	@${ECHO_MSG}	""



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->jhay 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Jul 24 10:40:19 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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