6.4. Dependencies

Most of the complex packages heavily rely on each other. To build and run such packages another package set is required, which is called dependencies.

any system operates only at build time, so it does not affect dependencies for run-time, written in binary packages like deb. Run-time dependencies are handled by package managers like apt, synaptic, dpkg.

any handles build-time dependencies, which are stored inside anybuilds in its own format. Simple example of dependencies assignment looks like:

#!/bin/sh

DEPEND="
>zlib-1.2
>=gmp-4.3.2
"

src_config()
{
    ./configure
}
...

List those dependencies inside DEPEND, which are stored inside working directory (for example, you have built them yourself before). If the library libNNN is required during the build, but that library will be taken from host operating system (from /usr/lib), then you should not list libNNN in DEPEND, as any system will not handle outer library.

At the same time any allows to specify arbitrary information in run-time dependencies, which will be used by package manager later. That can be done through RDEPEND variable:

#!/bin/sh

RDEPEND="
zlib (>>1.2),
gmp (>=4.3.2)
"

src_config()
{
    ./configure
}
...

So if a package uses library libNNN in run-time, it should be listed in RDEPEND in one or another way (there are several of them).

The variable DEPEND is used inside commands of any system.
The variable RDEPEND is not used inside any.

Details about package dependencies and their types see here: any-build(7).