12.3. pkg-req

If your port needs to determine if it should install or not, you can create a pkg-req ``requirements'' script. It will be invoked automatically at installation/deinstallation time to determine whether or not installation/deinstallation should proceed.

The script will be run at installation time by pkg_add as pkg-req ${PKGNAME} INSTALL. At deinstallation time it will be run by pkg_delete as pkg-req ${PKGNAME} DEINSTALL.

For questions about the FreeBSD ports system, e-mail <ports@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.