Finding a port's dependencies
pipping at macports.org
Sat Mar 31 13:03:04 PDT 2007
>>> I forget again: is there an easy way to tell if any
>>> ports depend on those?
>> yes, there is:
>> $grep :cairo-devel */*/Portfile
> I'll put this in the FAQ. Would it be useful to make the port
> command do
> this in a future revision?
I've put together a script to search for dependents. Here's what it
* works on ports that aren't currently installed
* supports both the (bin|lib):foo:name and the port:name syntax
* matches the exact name 
(searching for ncurses does not bring up results for ncursesw)
* supports regexp 
(e.g. searching for "ncursesw?")
* finds dependencies that hide in variants
* finds dependencies that hide in comments (yet to be gotten rid of)
setup: the script needs to be run from within the dports folder.
invocation: foo.sh ncursesw?
==== foo ====
# room for customization
$GREP -E "(port|(lib|bin):[^:]+):$1([\t ]|$)" */*/Portfile | $SED "s=/
==== bar ====
More information about the macports-dev