From renaud@hope.fr.nessus.org  Tue Dec 24 05:11:28 2002
Return-Path: <renaud@hope.fr.nessus.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E7E5B37B401
	for <freebsd-gnats-submit@freebsd.org>; Tue, 24 Dec 2002 05:11:28 -0800 (PST)
Received: from mail.nessus.org (mail.nessus.org [63.105.37.104])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6A1E543EDC
	for <freebsd-gnats-submit@freebsd.org>; Tue, 24 Dec 2002 05:11:28 -0800 (PST)
	(envelope-from renaud@hope.fr.nessus.org)
Received: by mail.nessus.org (Postfix, from userid 66)
	id 1F03F13626; Tue, 24 Dec 2002 08:13:40 -0500 (EST)
Received: by hope.fr.nessus.org (Postfix, from userid 502)
	id A1920263; Tue, 24 Dec 2002 14:10:41 +0100 (CET)
Message-Id: <20021224131041.A1920263@hope.fr.nessus.org>
Date: Tue, 24 Dec 2002 14:10:41 +0100 (CET)
From: Renaud <renaud@tpfh.org>
Reply-To: Renaud <renaud@tpfh.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: libnet-config is broken
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46512
>Category:       ports
>Synopsis:       libnet-config is broken
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 24 05:20:01 PST 2002
>Closed-Date:    Tue Jan 07 15:02:36 PST 2003
>Last-Modified:  Tue Jan 07 15:02:36 PST 2003
>Originator:     Renaud
>Release:        FreeBSD 4.7-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD hope.fr.nessus.org 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #5: Mon Dec 23 21:16:44 CET 2002 root@hope.fr.nessus.org:/usr/obj/usr/src/sys/HOPE i386


>Description:
	Libnet is a network library whose port is in /usr/ports/net/libnet
	It comes with a utility called "libnet-config" which is meant
	to simplify the life of the developer willing to use libnet, by
	specifying the correct compiler flags for gcc.

	For instance, 'libnet-config --cflags' should print 
	'-I/usr/local/include' and 'libnet-config --libs' should print 
	'-L/usr/local/lib -lnet'

	This behavior is broken in the port, as 'libnet-config --cflags'
	outputs nothing, and 'libnet-config --libs' only outputs '-lnet'.

	As a result, the user has to manually add the relevant gcc flags
	which defeats the purpose of having 'libnet-config' in the first
	place.

>How-To-Repeat:

	$ cd /usr/ports/net/libnet
	$ make install
	$ cd /tmp
	$ cat << EOF > test.c
	#include <libnet.h>
	int main() { return 0; }
	EOF
	$ gcc `libnet-config --cflags` -c test.c 
	test.c:1: libnet.h: No such file or directory
>Fix:

Here is a patch for Libnet's configure.in script. Make sure to call
autoconf213 to rebuild the compiled configure script.


*** configure.in.orig	Tue Dec 24 14:06:55 2002
--- configure.in	Tue Dec 24 14:07:36 2002
***************
*** 11,16 ****
--- 11,22 ----
  VER=`cat VERSION`
  AC_MSG_RESULT(Beginning autoconfiguration process for libnet-$VER...)
  
+ 
+ test "$prefix" = "NONE" && prefix=/usr/local
+ 
+ LIBNET_CONFIG_CFLAGS=-I$prefix/include
+ LIBNET_CONFIG_LIBS=-L$prefix/lib
+ 
  AC_SUBST(LL_INT_TYPE_UC)
  AC_SUBST(LL_INT_TYPE)
  AC_SUBST(LIB_PREFIX)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->portmgr 
Responsible-Changed-By: roam 
Responsible-Changed-When: Fri Jan 3 01:45:08 PST 2003 
Responsible-Changed-Why:  
Over to the bsd.port.mk maintainer group. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46512 
Responsible-Changed-From-To: portmgr->freebsd-ports 
Responsible-Changed-By: roam 
Responsible-Changed-When: Fri Jan 3 02:05:51 PST 2003 
Responsible-Changed-Why:  
Oops; wrong PR number. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46512 
State-Changed-From-To: open->closed 
State-Changed-By: smace 
State-Changed-When: Tue Jan 7 14:59:01 PST 2003 
State-Changed-Why:  
This issue exists in all libnet distributions.  This is the 
intended result of libnet-config. 

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