Subject: Re: how to use buildlink2
To: None <tech-pkg@netbsd.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: tech-pkg
Date: 10/02/2002 18:19:53
On Wed, Oct 02, 2002 at 10:55:42PM +0200, Klaus Heinz wrote:
> 
> 
> Obviously, I can no longer look at the compiler/linker invocation to see,
> whether there are any references to files/directories in /usr/pkg/.
> Is there a way to set a debugging flag in order to see what the
> buildlink2 scripts are doing?

Yes, there is a file in ${BUILDLINK_DIR}/.wrapper.log that contains the
exact commands invoked by the wrapper scripts.  I usually run

	make buildlink-check

after converting a package to use buildlink2, as the buildlink-check target
greps through the .wrapper.log file to look for references to files outside
of ${BUILDLINK_DIR}.

> buildlink2.txt mentions the deprecation of x11.buildlink.mk. It's not
> clear to me what to do in the case of X11. Which buildlink2.mk file am
> I supposed to include? Why is there a x11.buildlink2.mk?

There is nothing extra to do for packages that use X11, other than setting
either USE_X11 or USE_X11BASE in the package.  The wrapper scripts
themselves do what x11.buildlink.mk did for the buildlink1 framework.

x11.buildlink2.mk is an experiment of mine to get rid of x11-links that
appears to be working, but I'm not sure if anyone will be terribly
interested in it since makes building take a bit longer since all of the
X11 files are symlinked into ${BUILDLINK_DIR}, instead of just using the
symlinks under ${LOCALBASE}/share/x11-links.  I'm using it so I don't have
to care about updating x11-links when I change XFree86 releases, and
because I have a fast machine.  For any curious pkgsrc people out there,
you can turn it on by setting USE_X11_LINKS=no in /etc/mk.conf.  For
everyone else, please pay no attention to x11.buildlink2.mk.

	Cheers,

	-- Johnny Lam <jlam@netbsd.org>