10.12. Dependencies on other packages

Your package may depend on some other package being present - and there are various ways of expressing this dependency. NetBSD supports the BUILD_DEPENDS and DEPENDS definitions (beware: the DEPENDS definition is not the same as FreeBSD's deprecated one, and NetBSD does not use the FreeBSD LIB_DEPENDS definition any more - it proved problematic on ELF NetBSD platforms).

In the following examples, the BUILD_DEPENDS dependencies have the format: file:directory[:stage]. If the stage isn't specified, it defaults to "install". If the file contains a '/', it is interpreted as a regular file - otherwise, the name is taken to be an executable file, and the shell's search PATH is searched for file. If the regular file is not found, or the executable file is not in the path, then the pre-requisite package will be built from the sources in directory, which is usually relative to the current package's directory. The DEPENDS definition specifies a package name (which contains its version number), and the directory containing the package to build if this version of the package is not installed.