From freaky@voi.aagh.net  Fri Jan 18 16:20:07 2002
Return-Path: <freaky@voi.aagh.net>
Received: from voi.aagh.net (pc1-hart4-0-cust168.mid.cable.ntl.com [62.254.84.168])
	by hub.freebsd.org (Postfix) with ESMTP id 487AB37B404
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Jan 2002 16:20:06 -0800 (PST)
Received: from freaky by voi.aagh.net with local (Exim 3.34 #1)
	id 16RjEr-000ID4-00
	for FreeBSD-gnats-submit@freebsd.org; Sat, 19 Jan 2002 00:20:05 +0000
Message-Id: <E16RjEr-000ID4-00@voi.aagh.net>
Date: Sat, 19 Jan 2002 00:20:05 +0000
From: Thomas Hurst <freaky@aagh.net>
Reply-To: Thomas Hurst <freaky@aagh.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: net/ntop fails to build with modified PREFIX
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34052
>Category:       ports
>Synopsis:       net/ntop fails to build with modified PREFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    wjv
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 18 16:30:01 PST 2002
>Closed-Date:    Thu Jan 24 01:16:03 PST 2002
>Last-Modified:  Thu Jan 24 01:17:22 PST 2002
>Originator:     Thomas Hurst
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
Very little
>Environment:
System: FreeBSD voi.freak.lan 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: Thu Dec 20 13:56:19 GMT 2001 root@voi.freak.lan:/usr/obj/usr/src/sys/VOI i386

	LOCALBASE=/usr/pkg
>Description:
	Upgrading net/ntop gave me:

	 checking for gdbm.h... no
	 checking for gdbm_open in -lgdbm... no
	 checking for gdbm_close in -lgdbm... no
	              *** FATAL ERROR ***
	  It looks that you don't have the libgdbm distribution installed.
	 configure: error:  The GNU Gdbm Library development tree seems corrupted or incomplete!

	That's incorrect; I suspect it's because it's not looking in PREFIX, but /usr/local
	(mine is different; /usr/pkg).

	I notice mail/mutt-devel uses:

	CONFIGURE_ENV=  CC="${CC} -I${LOCALBASE}/include" LDFLAGS=-L${LOCALBASE}/lib

	Adding this to the port Makefile appears to fix the problem,
	but shouldn't bsd.port.mk deal with this?

>How-To-Repeat:
	cd /usr/ports/net/ntop && make LOCALBASE=/usr/pkg
>Fix:

--- /usr/home/freaky/.bak/Makefile~	Fri Jan 18 22:53:38 2002
+++ Makefile	Sat Jan 19 00:16:01 2002
@@ -33,6 +33,7 @@
 USE_GMAKE=	yes
 USE_LIBTOOL=	yes
 INSTALLS_SHLIB=	yes
+CONFIGURE_ENV=  CC="${CC} -I${LOCALBASE}/include" LDFLAGS=-L${LOCALBASE}/lib
 CONFIGURE_ARGS=	--localstatedir=${DBDIR} \
 		--with-gdchart-root=${LOCALBASE}
 

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->wjv 
Responsible-Changed-By: ijliao 
Responsible-Changed-When: Sat Jan 19 06:48:08 PST 2002 
Responsible-Changed-Why:  
over to maintainer 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34052 
State-Changed-From-To: open->analyzed 
State-Changed-By: wjv 
State-Changed-When: Tue Jan 22 07:09:07 PST 2002 
State-Changed-Why:  
This port *is* PREFIX-clean (acording to my testing on 4.5-PRERELEASE and 
5.0-CURRENT). 

Yes, it will break if you set LOCALBASE, but then, you shouldn't!  :-) 
LOCALBASE is "read-only" when building and installing ports. 

Any further comments? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34052 
State-Changed-From-To: analyzed->closed 
State-Changed-By: wjv 
State-Changed-When: Thu Jan 24 01:16:03 PST 2002 
State-Changed-Why:  
Committed modified patch after extensive discussion with originator. 

This may not yet be the end of this story, though.  :-( 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34052 
>Unformatted:
