6.25. Using Databases

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

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

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

See Section 17.6, “bdb for more information.


Example 6.38. Using MySQL

When a port needs the MySQL client library add

USES=	mysql

See Section 17.58, “mysql for more information.


Example 6.39. 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.68, “pgsql for more information.


Example 6.40. Using SQLite 3
USES=	sqlite:3

See Section 17.83, “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>.