databases/percona57: Fix build with SASL
If SASL is detected at build time it assumes you want SASL and also errors due to assuming we're Linux. This was already patched in our tree for MySQL. Also enable SASL support by default for the databases/percona57-client. This is expected to be the default by upstream now. Special thanks to mmokhi for figuring this out for us. PR: 220865 MFH: 2018Q1
This commit is contained in:
parent
ea95def0b7
commit
7adeb35eb8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=458861
@ -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:
|
||||
|
43
databases/percona57-client/files/patch-cmake_plugin.cmake
Normal file
43
databases/percona57-client/files/patch-cmake_plugin.cmake
Normal file
@ -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})
|
@ -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()
|
@ -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
|
||||
|
@ -2,4 +2,3 @@
|
||||
lib/mysql/plugin/auth_pam.so
|
||||
lib/mysql/plugin/auth_pam_compat.so
|
||||
lib/mysql/plugin/dialog.so
|
||||
@dir lib/mysql/plugin/debug
|
||||
|
@ -123,6 +123,9 @@ MANPAGES= my_print_defaults.1 myisam_ftdump.1 myisamchk.1 myisamlog.1 myisampack
|
||||
mysqltest.1 perror.1 replace.1 resolve_stack_dump.1 resolveip.1
|
||||
|
||||
CMAKE_ARGS+= -DWITH_EMBEDDED_SERVER="ON"
|
||||
# issue 220865: Currently there's no source to be built with server-side support.
|
||||
# But this keeps the pkg-plist not overlaping
|
||||
CMAKE_ARGS+= -DWITH_AUTHENTICATION_LDAP=0
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}/var/db/mysql
|
||||
@ -133,6 +136,9 @@ post-install:
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} 's/*.1/${MANPAGES}/' ${WRKSRC}/man/CMakeLists.txt
|
||||
# issue 220865: MySQL developers forgot that FreeBSD != Linux
|
||||
@${REINPLACE_CMD} -e 's|%%FREEBSD_LOCAL_LIB%%|${LOCALBASE}/lib|g' \
|
||||
${WRKSRC}/cmake/plugin.cmake
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
|
43
databases/percona57-server/files/patch-cmake_plugin.cmake
Normal file
43
databases/percona57-server/files/patch-cmake_plugin.cmake
Normal file
@ -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})
|
@ -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()
|
@ -90,7 +90,6 @@ bin/zlib_decompress
|
||||
include/mysql/mysqlx_ername.h
|
||||
include/mysql/mysqlx_error.h
|
||||
include/mysql/mysqlx_version.h
|
||||
@dir lib/mysql/plugin/debug
|
||||
@dir(mysql,mysql,) /var/db/mysql
|
||||
%%INNODBMEMCACHED%%lib/mysql/plugin/innodb_engine.so
|
||||
%%INNODBMEMCACHED%%lib/mysql/plugin/libmemcached.so
|
||||
|
Loading…
Reference in New Issue
Block a user