6.25. Using Databases

Use one of the USES macros from Table 6.38, “Database USES Macros” to add a dependency on a database.

Table 6.38. Database USES Macros
DatabaseUSES Macro
Berkeley DBbdb
MariaDB, MySQL, Perconamysql
PostgreSQLpgsql
SQLitesqlite

Example 6.31. Using Berkeley DB 6
USES=	bdb:6

See Section 17.6, “bdb for more information.


Example 6.32. Using MySQL

When a port needs the MySQL client library add

USES=	mysql

See Section 17.56, “mysql for more information.


Example 6.33. Using PostgreSQL

When a port needs the PostgreSQL server version 9.6 or later add

USES=		pgsql:9.6+
WANT_PGSQL=	server

See Section 17.66, “pgsql for more information.


Example 6.34. Using SQLite 3
USES=	sqlite:3

See Section 17.79, “sqlite for more information.


All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.