On 11/9/05, Trevor Harmon <[EMAIL PROTECTED]> wrote:
I'm sure it doesn't work in general to detect all dependencies (static libs and external programs invoked at runtime come to mind), but otool -L <binary> is your friend.
In pseudocode:
* Build and install your package to an isolated location
* find | file | grep to create a list of all binary objects
* otool -L each binary | grep /sw
* for each dependency in /sw, look up its package
I vaguely recall a long time ago seeing a script that would anayze dpkg contents (running otool on binaries in /sw/*bin/ and /sw/lib/ -- but maybe I just thought it would be cool to write such a thing. :)
Hope that helps,
-dave
I do basically the same thing. It's largely a trial-and-error
process, unfortunately. And even then, sometimes you still don't know
whether there is some dynamic dependency that you don't know about
until it fails at runtime.
I'm sure it doesn't work in general to detect all dependencies (static libs and external programs invoked at runtime come to mind), but otool -L <binary> is your friend.
In pseudocode:
* Build and install your package to an isolated location
* find | file | grep to create a list of all binary objects
* otool -L each binary | grep /sw
* for each dependency in /sw, look up its package
I vaguely recall a long time ago seeing a script that would anayze dpkg contents (running otool on binaries in /sw/*bin/ and /sw/lib/ -- but maybe I just thought it would be cool to write such a thing. :)
Hope that helps,
-dave
--
David Bacher _.. ._ ..._ .
[EMAIL PROTECTED]
