aboutsummaryrefslogtreecommitdiff
path: root/databases/percona57-client
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2018-01-12 17:53:30 +0000
committerMark Felder <feld@FreeBSD.org>2018-01-12 17:53:30 +0000
commit7adeb35eb84dcfadcdbb191c668d417753131d7f (patch)
tree36ae934067e96ddd6a20fd594c230623dd42023f /databases/percona57-client
parentea95def0b70e0e6004d523570c33855df454c93d (diff)
downloadports-7adeb35eb84dcfadcdbb191c668d417753131d7f.tar.gz
ports-7adeb35eb84dcfadcdbb191c668d417753131d7f.zip
Notes
Diffstat (limited to 'databases/percona57-client')
-rw-r--r--databases/percona57-client/Makefile12
-rw-r--r--databases/percona57-client/files/patch-cmake_plugin.cmake43
-rw-r--r--databases/percona57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt18
-rw-r--r--databases/percona57-client/pkg-plist1
4 files changed, 73 insertions, 1 deletions
diff --git a/databases/percona57-client/Makefile b/databases/percona57-client/Makefile
index a2ab5f0c2b2c..d963ec3c3217 100644
--- a/databases/percona57-client/Makefile
+++ b/databases/percona57-client/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= percona
-PORTREVISION?= 0
+PORTREVISION?= 1
PKGNAMESUFFIX= 57-client
COMMENT= Multithreaded SQL database (client)
@@ -31,6 +31,16 @@ MANPAGES= comp_err.1 mysql.1 mysql_config.1 mysql_config_editor.1 \
CLIENT_ONLY= yes
+OPTIONS_GROUP+= PLUGINS
+PLUGINS_DESC= Default Client Plugins
+OPTIONS_GROUP_PLUGINS= SASLCLIENT
+SASLCLIENT_DESC= SASL client plugin module
+SASLCLIENT_CMAKE_BOOL= WITH_AUTHENTICATION_LDAP
+SASLCLIENT_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
+SASLCLIENT_BUILD_DEPENDS= ${LOCALBASE}/include/sasl/sasl.h:net/openldap24-sasl-client
+OPTIONS_DEFAULT+= SASLCLIENT
+OPTIONS_SUB= yes
+
# Percona renamed the libraries, until we decide how to deal with it create some symlinks
# to prevent breaking installed ports.
post-install:
diff --git a/databases/percona57-client/files/patch-cmake_plugin.cmake b/databases/percona57-client/files/patch-cmake_plugin.cmake
new file mode 100644
index 000000000000..8716c1b962b4
--- /dev/null
+++ b/databases/percona57-client/files/patch-cmake_plugin.cmake
@@ -0,0 +1,43 @@
+--- cmake/plugin.cmake.orig 2017-06-22 14:13:19 UTC
++++ cmake/plugin.cmake
+@@ -219,9 +219,16 @@ MACRO(MYSQL_ADD_PLUGIN)
+ # Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
+ # an additional dependency.
+ # Use MYSQL_PLUGIN_IMPORT for static data symbols to be exported.
+- IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
++ #
++ # P.S. "FreeBSD" is obviously not "Linux" but it behaves near similar in this case.
++ IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ TARGET_LINK_LIBRARIES (${target} mysqld ${ARG_LINK_LIBRARIES})
+ ENDIF()
++ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
++ SET_TARGET_PROPERTIES(${target} PROPERTIES
++ LINK_FLAGS "-L%%FREEBSD_LOCAL_LIB%% ${LINK_FLAGS} "
++ )
++ ENDIF()
+ ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
+
+ IF(NOT ARG_MODULE_ONLY)
+@@ -239,13 +246,17 @@ MACRO(MYSQL_ADD_PLUGIN)
+ MYSQL_INSTALL_TARGETS(${target}
+ DESTINATION ${INSTALL_PLUGINDIR}
+ COMPONENT ${INSTALL_COMPONENT})
+- INSTALL_DEBUG_TARGET(${target}
+- DESTINATION ${INSTALL_PLUGINDIR}/debug
+- COMPONENT ${INSTALL_COMPONENT})
++ IF(CMAKE_BUILD_TYPE MATCHES "Debug")
++ INSTALL_DEBUG_TARGET(${target}
++ DESTINATION ${INSTALL_PLUGINDIR}/debug
++ COMPONENT ${INSTALL_COMPONENT})
++ # Add installed files to list for RPMs
++ FILE(APPEND ${CMAKE_BINARY_DIR}/support-files/plugins.files
++ "%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/debug/${ARG_MODULE_OUTPUT_NAME}.so\n")
++ ENDIF()
+ # Add installed files to list for RPMs
+ FILE(APPEND ${CMAKE_BINARY_DIR}/support-files/plugins.files
+- "%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/${ARG_MODULE_OUTPUT_NAME}.so\n"
+- "%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/debug/${ARG_MODULE_OUTPUT_NAME}.so\n")
++ "%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/${ARG_MODULE_OUTPUT_NAME}.so\n")
+ # For internal testing in PB2, append collections files
+ IF(DEFINED ENV{PB2WORKDIR})
+ PLUGIN_APPEND_COLLECTIONS(${plugin})
diff --git a/databases/percona57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt b/databases/percona57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt
new file mode 100644
index 000000000000..05783d914af4
--- /dev/null
+++ b/databases/percona57-client/files/patch-libmysql_authentication__ldap_CMakeLists.txt
@@ -0,0 +1,18 @@
+--- libmysql/authentication_ldap/CMakeLists.txt.orig 2017-07-20 22:54:16 UTC
++++ libmysql/authentication_ldap/CMakeLists.txt
+@@ -52,8 +52,10 @@ ELSE ()
+ SET(SASL_LIBRARY "sasl2")
+ ENDIF ()
+
+-MYSQL_ADD_PLUGIN(authentication_ldap_sasl_client
+- auth_ldap_sasl_client.cc log_client.cc
+- LINK_LIBRARIES ${SASL_LIBRARY}
+- MODULE_ONLY
+- MODULE_OUTPUT_NAME "authentication_ldap_sasl_client")
++IF (WITH_AUTHENTICATION_LDAP)
++ MYSQL_ADD_PLUGIN(authentication_ldap_sasl_client
++ auth_ldap_sasl_client.cc log_client.cc
++ LINK_LIBRARIES ${SASL_LIBRARY}
++ MODULE_ONLY
++ MODULE_OUTPUT_NAME "authentication_ldap_sasl_client")
++ENDIF()
diff --git a/databases/percona57-client/pkg-plist b/databases/percona57-client/pkg-plist
index 8d1e78983d81..4971e8b943c0 100644
--- a/databases/percona57-client/pkg-plist
+++ b/databases/percona57-client/pkg-plist
@@ -128,6 +128,7 @@ lib/mysql/libmysqlservices.a
lib/mysql/libperconaserverclient.a
lib/mysql/libperconaserverclient.so
lib/mysql/libperconaserverclient.so.20
+%%SASLCLIENT%%lib/mysql/plugin/authentication_ldap_sasl_client.so
libdata/pkgconfig/perconaserverclient.pc
man/man1/comp_err.1.gz
man/man1/mysql.1.gz