MacPorts user maiing list asking why the bittorrent port requires XFree86 or Apple's X11 to build. It is a reasonable question, since at first glance bittorrent doesn't seem to need it:
% port deps bittorrent
bittorrent has library dependencies on:
py-wxpython
py-twisted
py-crypto
A second glance says the same as well:
% port deps py-wxpython
py-wxpython has library dependencies on:
python24
wxWidgets
% port deps py-twisted
py-twisted has library dependencies on:
python24
py-zopeinterface
% port deps py-crypto
py-crypto has library dependencies on:
python24
I ran into a similar problem in my use of MacPorts, where I needed to determine all the dependencies a port has. So I wrote a Python script, rdeps.py
, which outputs the following (emphasis added):
% rdeps.py bittorrent
+- bittorrent
+- (L) py-wxpython
| +- (L) python24
| +- (L) wxWidgets
| +- (L) jpeg
| +- (L) tiff
| | +- (L) jpeg
| | +- (L) zlib
| +- (L) libpng
| | +- (L) zlib
| +- (L) zlib
| +- (L) libiconv
| | +- (B) gperf
| +- (L) expat
| +- (L) libsdl
| | +- (L) XFree86
| | +- (B) perl5.8
| +- (L) libsdl_mixer
| +- (L) libsdl
| | +- (L) XFree86
| | +- (B) perl5.8
| +- (L) smpeg
| | +- (L) libsdl
| | +- (L) XFree86
| | +- (B) perl5.8
| +- (L) libvorbis
| | +- (L) libogg
| +- (L) libogg
| +- (L) libmikmod
+- (L) py-twisted
| +- (L) python24
| +- (L) py-zopeinterface
| +- (L) python24
+- (L) py-crypto
+- (L) python24
This has saved me from needing to repeatedly execute the port deps
command by hand or going through Portfiles to hunt down dependencies on many occasions.
Of course, my little handy Python script only provides a skin-deep explanation of why X11 is needed by saying "because the Portfile says so", which isn't all that insightful. A slightly better explanation can be found here. Basically, bittorrent has a dependency on libsdl, which will not compile unless X11 is present.
Now why does libsdl need X11 to build? I don't know the answer to this one. Do you?]]>