Ports and their dependencies

markd at macports.org markd at macports.org
Sun Jun 8 16:01:12 PDT 2008


>> 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
>]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.
>
>
How is it described better in the man page?  Below is the text in the
guide.  And don't forget that the guide is going to be the source for the
new man pages (1.7?  1.8?), so if the man pages are better in some
respect, the guide needs to be corrected in those respects.

http://guide.macports.org/#reference.dependencies.types

-----------
Port dependencies should be provided by MacPorts ports whenever possible,
however dependencies may be provided by vendor-supplied software when
satisfying a dependency by a port is not practical or desirable for a
special reason. Dependencies of this type are called non-port dependencies.

Non-port dependencies should only be used if the application or library
can be installed by multiple ports (for example stable and -devel version)
or if it can't be installed with MacPorts.

Port dependencies, the preferred type, are specified as shown in these
examples:

depends_lib         port:rrdtool port:apache2
depends_build       port:libtool
depends_run         port:apache2 port:php5

Non-port dependencies are specified as shown in these examples:

depends_lib         lib:libX11.6:xorg
depends_build       bin:glibtool:libtool
depends_run         path:${prefix}/lib/libltdl.a:libtool
----------

Mark




More information about the macports-users mailing list