Ports and their dependencies (run deps and also versioning questions)

Joshua Root jmr at macports.org
Fri Jun 6 04:06:27 PDT 2008


Tabitha McNerney wrote:
> But, then my script ran into this specific problem:
> 
> $ port info --depends_lib speex @1.0.5
> 
> -->
> 
> depends_lib: lib:libogg:libogg
> 
> Hmmm ... the repeat of the library dependency libogg looks to be incorrect.
> Also, the first instance of the libogg dependency is preceded by "lib:" but
> shouldn't that be "port:" instead?

This is not an error, but a different type of dependency. A "port:foo" 
dependency means "install the port named 'foo'", whereas "lib:foo:bar" 
means "check if the library 'foo' is present, and if not, install the 
port named 'bar'". You can also use 'bin' or 'path' instead of 'lib' to 
make the port installation conditional on the absence of executables and 
arbitrary files, respectively.

This is only mentioned in passing in the guide: 
<http://guide.macports.org/#reference.dependencies.types>. It's 
documented a little better in the portfile(7) manual.

Most of the time dependencies should be of the port: variety, but 
sometimes it is better/easier to use software that Apple ships with OS 
X, a common example being X11. You'll see lib:libX11.6:XFree86 in a lot 
of portfiles.

- Josh


More information about the macports-users mailing list