On 5/4/07, William Scott <[EMAIL PROTECTED]> wrote: > Is there a simple way to find shlib dependencies for a package? > > I couldn't find one, so I made a shell script > > http://xanana.ucsc.edu/Library/init/zsh/local-functions/darwin/depfinder > > It examines the contents of a debian archive (whose filename you > supply as the argument) for binaries and dynamic libraries and then > uses dpkg -S to come up with the package names. It also does a bit of > a packaging reality check. > > I've made some packaging errors lately so I thought I should try to > redeem myself. I hope someone finds this useful, at least for a laugh. > > > Bill > Cool. I've been using one that is due to J.-F. Mertens that does installed packages:
# !/bin/sh # `otool_deps <pkgs>` is the (possibly empty, alphabetically # sorted) comma-separated list of pkgs, # except for those in the argument list, followed by a newline, on # which those in the argument list depend according to otool -L. dpkg -L $@|xargs file|fgrep 'Mach-O'|cut -f1 -d:|xargs otool -L 2>/dev/null|egrep -v ':$'|sort -u|sed -r -e 's,[[:space:]]+,,' -e 's, .*,,'|xargs dpkg -S 2>/dev/null|cut -f1 -d:|sort -u|fgrep -vx "`tr ' ' '\n' <<<$*`"|xargs|sed -r -e 's; ;, ;g' Caveat: it seems to rely on flags used in the fink version of sed. I've got one of my own that isn't as sophisticated, but simply prints out every library linked by every file in a package. -- Alexander K. Hansen (akh) Fink User Liaison and Documenter ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Fink-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fink-devel
