Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Uses/mysql.mk
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# Provide support for MySQL | # Provide support for MySQL | ||||
# Feature: mysql | # Feature: mysql | ||||
# Usage: USES=mysql or USES=mysql:args | # Usage: USES=mysql or USES=mysql:args | ||||
# Valid ARGS: <version>, server, embedded | # Valid ARGS: <version>, client, server, embedded | ||||
# | # | ||||
# version If no version is given (by the maintainer via the port), try to | # version If no version is given (by the maintainer via the port), try to | ||||
# find the currently installed version. Fall back to default if | # find the currently installed version. Fall back to default if | ||||
# necessary (MySQL-5.6 = 56). | # necessary (MySQL-5.6 = 56). | ||||
# client Depends on the libmysqlclient library (default) | |||||
# server/embedded | # server/embedded | ||||
# Depend on the server at run/build time. If none of these is | # Depend on the server at run/build time. If none of these is | ||||
# set, depends on the client. | # set, depends on the client. | ||||
# | # | ||||
# IGNORE_WITH_MYSQL | # IGNORE_WITH_MYSQL | ||||
# This variable can be defined if the ports does not support one | # This variable can be defined if the ports does not support one | ||||
# or more versions of MySQL. | # or more versions of MySQL. | ||||
# WITH_MYSQL_VER | # WITH_MYSQL_VER | ||||
Show All 16 Lines | |||||
.if ${_MYSQL_ARGS:Mserver} | .if ${_MYSQL_ARGS:Mserver} | ||||
_WANT_MYSQL_SERVER= yes | _WANT_MYSQL_SERVER= yes | ||||
_MYSQL_ARGS:= ${_MYSQL_ARGS:Nserver} | _MYSQL_ARGS:= ${_MYSQL_ARGS:Nserver} | ||||
.endif | .endif | ||||
.if ${_MYSQL_ARGS:Membedded} | .if ${_MYSQL_ARGS:Membedded} | ||||
_WANT_MYSQL_EMBEDDED= yes | _WANT_MYSQL_EMBEDDED= yes | ||||
_MYSQL_ARGS:= ${_MYSQL_ARGS:Nembedded} | _MYSQL_ARGS:= ${_MYSQL_ARGS:Nembedded} | ||||
.endif | .endif | ||||
.if ${_MYSQL_ARGS:Mclient} | |||||
_WANT_MYSQL_CLIENT= yes | |||||
_MYSQL_ARGS:= ${_MYSQL_ARGS:Nclient} | |||||
.endif | |||||
# Port requested a version | # Port requested a version | ||||
.if !empty(_MYSQL_ARGS) | .if !empty(_MYSQL_ARGS) | ||||
_WANT_MYSQL_VER= ${_MYSQL_ARGS} | _WANT_MYSQL_VER= ${_MYSQL_ARGS} | ||||
.endif | .endif | ||||
.endif # !empty(mysql_ARGS) | .endif # !empty(mysql_ARGS) | ||||
.if defined(DEFAULT_MYSQL_VER) | .if defined(DEFAULT_MYSQL_VER) | ||||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
. endif | . endif | ||||
. endfor | . endfor | ||||
.endif # IGNORE_WITH_MYSQL | .endif # IGNORE_WITH_MYSQL | ||||
.if defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED) | .if defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED) | ||||
RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER} | RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER} | ||||
.if defined(_WANT_MYSQL_EMBEDDED) | .if defined(_WANT_MYSQL_EMBEDDED) | ||||
BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER} | BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER} | ||||
.endif | .endif | ||||
.else | .endif | ||||
.if defined(_WANT_MYSQL_CLIENT) || \ | |||||
!(defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED)) | |||||
LIB_DEPENDS+= libmysqlclient.so.${MYSQL${MYSQL_VER}_LIBVER}:${_MYSQL_CLIENT} | LIB_DEPENDS+= libmysqlclient.so.${MYSQL${MYSQL_VER}_LIBVER}:${_MYSQL_CLIENT} | ||||
.endif | .endif | ||||
.else | .else | ||||
IGNORE= cannot install: unknown MySQL version: ${MYSQL_VER} | IGNORE= cannot install: unknown MySQL version: ${MYSQL_VER} | ||||
.endif # Check for correct libs | .endif # Check for correct libs | ||||
.endif | .endif |