Subject: Re: pkg/15297: net/arpd ignores BSD_PKG_MK
To: None <gr@eclipsed.net>
From: Johnny Lam <jlam@jgrind.org>
List: netbsd-bugs
Date: 01/19/2002 06:42:43
On Sat, Jan 19, 2002 at 09:23:18AM -0500, g r wrote:
> 
> >Description:
> It would seem that many packages STILL break by reading settings
> from my /etc/mk.conf which they have been explicitly told not to.
> 
> To whit, I have:
> 
> .ifndef BSD_PKG_MK
> DESTDIR=/build/i386
> [...]
> 
> When I make in pkgsrc/net/arpd:

net/arpd uses a BSD-style Makefile to build the program so when it .includes
<bsd.own.mk>, it pulls in /etc/mk.conf.  The subsequent build problems
might be avoided if we passed BSD_PKG_MK=1 in MAKE_ENV, so that packages
that insist on using BSD-style Makefiles, but I think the better thing to
do is to protect settings in /etc/mk.conf that are really only used by
Makefiles in /usr/src.  So, something like:

	.ifdef NETBSD_SRC
	DESTDIR=	/build/${MACHINE_ARCH}
	LOCALTIME=	US/Eastern
	USE_XF86_4=	yes
	.endif

And in Makefiles under /usr/src, we explicitly set NETBSD_SRC.  I think
this can be done by just defining it once in the top-level Makefile.inc,
but I'm not sure if it's that painless.

	Cheers,

	-- Johnny Lam <jlam@jgrind.org>