summaryrefslogtreecommitdiff
path: root/mk/mysql.buildlink3.mk
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2013-04-15 22:31:22 +0000
committerabs <abs@pkgsrc.org>2013-04-15 22:31:22 +0000
commit8429dd7a1e2b3abd589c43dd62276a21febf3858 (patch)
treecd53aaa6438cd2c5123eb01e1a4e535d002a1568 /mk/mysql.buildlink3.mk
parentb326d0b78aa8d4487e0807badf288a3b34f592ed (diff)
downloadpkgsrc-8429dd7a1e2b3abd589c43dd62276a21febf3858.tar.gz
Support MYSQL_VERSION_DEFAULT=56
Diffstat (limited to 'mk/mysql.buildlink3.mk')
-rw-r--r--mk/mysql.buildlink3.mk21
1 files changed, 17 insertions, 4 deletions
diff --git a/mk/mysql.buildlink3.mk b/mk/mysql.buildlink3.mk
index d72a9d3a08f..df14f3cdb17 100644
--- a/mk/mysql.buildlink3.mk
+++ b/mk/mysql.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: mysql.buildlink3.mk,v 1.16 2013/03/02 20:33:03 wiz Exp $
+# $NetBSD: mysql.buildlink3.mk,v 1.17 2013/04/15 22:31:22 abs Exp $
#
# This file is included by packages that require some version of the
# MySQL database client.
@@ -8,7 +8,7 @@
# MYSQL_VERSION_DEFAULT
# The preferred MySQL version.
#
-# Possible: 55 51 50
+# Possible: 56 55 51 50
# Default: 55
#
# === Package-settable variables ===
@@ -31,7 +31,7 @@ _SYS_VARS.mysql= MYSQL_PKGSRCDIR
.include "../../mk/bsd.prefs.mk"
MYSQL_VERSION_DEFAULT?= 55
-MYSQL_VERSIONS_ACCEPTED?= 55 51 50
+MYSQL_VERSIONS_ACCEPTED?= 56 55 51 50
# transform the list into individual variables
.for mv in ${MYSQL_VERSIONS_ACCEPTED}
@@ -41,8 +41,13 @@ _MYSQL_VERSION_${mv}_OK= yes
# check what is installed
.if ${OPSYS} == "Darwin"
. if exists(${LOCALBASE}/lib/libmysqlclient.18.dylib)
+. if exists(${LOCALBASE}/include/mysql/mysql/client_authentication.h)
+_MYSQL_VERSION_56_INSTALLED= yes
+_MYSQL_VERSION_INSTALLED= 56
+. else
_MYSQL_VERSION_55_INSTALLED= yes
_MYSQL_VERSION_INSTALLED= 55
+. endif
. endif
. if exists(${LOCALBASE}/lib/mysql/libmysqlclient.16.dylib)
_MYSQL_VERSION_51_INSTALLED= yes
@@ -54,8 +59,13 @@ _MYSQL_VERSION_INSTALLED= 50
. endif
.else
. if exists(${LOCALBASE}/lib/libmysqlclient.so.18)
+. if exists(${LOCALBASE}/include/mysql/mysql/client_authentication.h)
+_MYSQL_VERSION_56_INSTALLED= yes
+_MYSQL_VERSION_INSTALLED= 56
+. else
_MYSQL_VERSION_55_INSTALLED= yes
_MYSQL_VERSION_INSTALLED= 55
+. endif
. endif
. if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.16)
_MYSQL_VERSION_51_INSTALLED= yes
@@ -67,6 +77,7 @@ _MYSQL_VERSION_INSTALLED= 50
. endif
.endif
+
# if a version is explicitely required, take it
.if defined(MYSQL_VERSION_REQD)
_MYSQL_VERSION= ${MYSQL_VERSION_REQD}
@@ -104,7 +115,9 @@ _MYSQL_VERSION= ${_MYSQL_VERSION_FIRSTACCEPTED}
#
# set variables for the version we decided to use:
#
-.if ${_MYSQL_VERSION} == "55"
+.if ${_MYSQL_VERSION} == "56"
+MYSQL_PKGSRCDIR= ../../databases/mysql56-client
+.elif ${_MYSQL_VERSION} == "55"
MYSQL_PKGSRCDIR= ../../databases/mysql55-client
.elif ${_MYSQL_VERSION} == "51"
MYSQL_PKGSRCDIR= ../../databases/mysql51-client