Subject: Re: use of LDD in pkgsrc/mk/bsd.pkg.mk?
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 11/30/2005 09:34:06
> > The precise tools and syntaxc used should be configurable per platform
> > without mk/bsd.pkg.mk having to know the platforms explicitly (i.e. it
> > should be configurable with each platform's config files).
> 
> I agree.

So we need a variable that contains the necessary information which should be
set in mk/platform (and potentially overridden in mk.conf).
As far as I can see the only use of it would be in the line that currently
looks like this:

requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} 'NF == 3 { print $$3 }' | ${SORT} -u`;

and

requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '/compatibility version/ { print $$1 }' | ${SORT} -u`;

Is that correct? That is the second line for, BTW?

Ideally, this should be replaced with something like

requires=`${REQUIRES1} | ${SORT} -u`;

and

requires=`${REQUIRES2} | ${SORT} -u`;

respectively.

Now the question to the shell script/makefile aces: what do REQUIRES1 and 2
have to look like? :-)

As an additional note, the code in bsd.pkg.mk goes through some effort of
determining whether LDD is set and actually a working binary. Should we
do so at compile time? Can't we simply mandate that it is and provide
reasonable defaults per platform?

-- 
Georg Schwarz    http://home.pages.de/~schwarz/
 georg.schwarz@freenet.de  +49 178 8545053