Subject: Re: use of LDD in pkgsrc/mk/bsd.pkg.mk?
To: Jeremy C. Reed <reed@reedmedia.net>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 11/29/2005 23:57:51
> On Tue, 29 Nov 2005, Georg Schwarz wrote:
> 
> > OK, now it works for NetBSD and Linux, what about the rest?
> 
> Sorry, I don't know. There has been little discussion on it. And nobody 
> has provided code. Your suggestions will be appreciated. I don't currently 
> have time to test on different platforms.

> Also, please consider using objdump on platforms that have it instead of 
> ldd so it doesn't record recursively used libraries. Or does that matter? 
> I'd prefer that the REQUIRES= only listed the specific libraries as 
> NEEDED.

Absolutely. Can't we have something like this:

requires=`$REQUIRES | ${SORT} -u`; \

and for say, Linux, we define:

REQUIRES='($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) |${AWK} \'$$2 == "=>" && $$3 ~ "/" { print $$3 }\''

I admit I am not so sure about expansions :-/

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