aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-06-01 21:14:56 +0800
committermat <mat@FreeBSD.org>2016-06-01 21:14:56 +0800
commit181ca7d9848fa8232c32071ebcedd669b42c8271 (patch)
tree90f87bdf7fc114b9f902d4ecdb56a2e5b67f2b54 /Mk
parenta9f5af0a48d993d39684f97747ad83ca7f578edd (diff)
downloadfreebsd-ports-gnome-181ca7d9848fa8232c32071ebcedd669b42c8271.tar.gz
freebsd-ports-gnome-181ca7d9848fa8232c32071ebcedd669b42c8271.tar.zst
freebsd-ports-gnome-181ca7d9848fa8232c32071ebcedd669b42c8271.zip
Allow depending on both mysql's client and server
Fix the few users of both the MySQL client and server. PR: 209762 Submitted by: mat Exp-run by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D6575
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/mysql.mk11
1 files changed, 9 insertions, 2 deletions
diff --git a/Mk/Uses/mysql.mk b/Mk/Uses/mysql.mk
index b5e8549232ef..548802a1bb3b 100644
--- a/Mk/Uses/mysql.mk
+++ b/Mk/Uses/mysql.mk
@@ -3,11 +3,12 @@
# Provide support for MySQL
# Feature: mysql
# 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
# find the currently installed version. Fall back to default if
# necessary (MySQL-5.6 = 56).
+# client Depends on the libmysqlclient library (default)
# server/embedded
# Depend on the server at run/build time. If none of these is
# set, depends on the client.
@@ -40,6 +41,10 @@ _MYSQL_ARGS:= ${_MYSQL_ARGS:Nserver}
_WANT_MYSQL_EMBEDDED= yes
_MYSQL_ARGS:= ${_MYSQL_ARGS:Nembedded}
.endif
+.if ${_MYSQL_ARGS:Mclient}
+_WANT_MYSQL_CLIENT= yes
+_MYSQL_ARGS:= ${_MYSQL_ARGS:Nclient}
+.endif
# Port requested a version
.if !empty(_MYSQL_ARGS)
@@ -126,7 +131,9 @@ RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER}
.if defined(_WANT_MYSQL_EMBEDDED)
BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER}
.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}
.endif
.else