diff options
Diffstat (limited to '20006_all_cmake_elib-mysql-cluster-7.2.34.patch')
-rw-r--r-- | 20006_all_cmake_elib-mysql-cluster-7.2.34.patch | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/20006_all_cmake_elib-mysql-cluster-7.2.34.patch b/20006_all_cmake_elib-mysql-cluster-7.2.34.patch new file mode 100644 index 0000000..91bcea5 --- /dev/null +++ b/20006_all_cmake_elib-mysql-cluster-7.2.34.patch @@ -0,0 +1,225 @@ +diff -aurN a/cmake/install_layout.cmake b/cmake/install_layout.cmake +--- a/cmake/install_layout.cmake 2018-06-21 07:34:38.000000000 -0400 ++++ b/cmake/install_layout.cmake 2019-01-19 15:20:18.791407251 -0500 +@@ -55,7 +55,8 @@ + # - INSTALL_SBINDIR (directory with mysqld) + # - INSTALL_SCRIPTDIR (several scripts, rarely used) + # +-# - INSTALL_LIBDIR (directory with client end embedded libraries) ++# - INSTALL_LIBDIR (directory with client libraries) ++# - INSTALL_ELIBDIR (directory with embedded libraries) + # - INSTALL_PLUGINDIR (directory for plugins) + # + # - INSTALL_INCLUDEDIR (directory for MySQL headers) +@@ -156,6 +157,7 @@ + SET(INSTALL_SCRIPTDIR_STANDALONE "scripts") + # + SET(INSTALL_LIBDIR_STANDALONE "lib") ++SET(INSTALL_ELIBDIR_STANDALONE "lib") + SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin") + # + SET(INSTALL_INCLUDEDIR_STANDALONE "include") +@@ -329,9 +331,11 @@ + # + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + SET(INSTALL_LIBDIR_RPM "lib64") ++ SET(INSTALL_ELIBDIR_RPM "lib64") + SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") + ELSE() + SET(INSTALL_LIBDIR_RPM "lib") ++ SET(INSTALL_ELIBDIR_RPM "lib") + SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin") + ENDIF() + # +@@ -394,6 +398,7 @@ + SET(INSTALL_SCRIPTDIR_DEB "scripts") + # + SET(INSTALL_LIBDIR_DEB "lib") ++SET(INSTALL_ELIBDIR_DEB "lib") + SET(INSTALL_PLUGINDIR_DEB "lib/plugin") + # + SET(INSTALL_INCLUDEDIR_DEB "include") +@@ -422,6 +427,7 @@ + SET(INSTALL_SCRIPTDIR_SVR4 "scripts") + # + SET(INSTALL_LIBDIR_SVR4 "lib") ++SET(INSTALL_ELIBDIR_SVR4 "lib") + SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin") + # + SET(INSTALL_INCLUDEDIR_SVR4 "include") +@@ -453,7 +459,7 @@ + # Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR + # will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE + # layout is chosen) +-FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN ++FOREACH(var BIN SBIN LIB ELIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN + INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA PLUGINTEST + SECURE_FILE_PRIV SECURE_FILE_PRIV_EMBEDDED) + SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}} +diff -aurN a/cmake/libutils.cmake b/cmake/libutils.cmake +--- a/cmake/libutils.cmake 2019-01-19 15:15:56.294486959 -0500 ++++ b/cmake/libutils.cmake 2019-01-19 15:23:39.369054028 -0500 +@@ -40,6 +40,7 @@ + # - MERGE_LIBRARIES(target [STATIC|SHARED|MODULE] [linklib1 .... linklibN] + # [EXPORTS exported_func1 .... exported_func_N] + # [OUTPUT_NAME output_name] ++# [OUTPUT_DIR output_dir] + # This macro merges several static libraries into a single one or creates a shared + # library from several convenience libraries + +@@ -215,7 +216,7 @@ + #) + MACRO(MERGE_LIBRARIES) + MYSQL_PARSE_ARGUMENTS(ARG +- "EXPORTS;OUTPUT_NAME;COMPONENT" ++ "EXPORTS;OUTPUT_NAME;COMPONENT;OUTPUT_DIR" + "STATIC;SHARED;MODULE;NOINSTALL" + ${ARGN} + ) +@@ -266,7 +267,11 @@ + IF(ARG_COMPONENT) + SET(COMP COMPONENT ${ARG_COMPONENT}) + ENDIF() +- MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP}) ++ IF(ARG_OUTPUT_DIR) ++ MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${ARG_OUTPUT_DIR}" ${COMP}) ++ ELSE ++ MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP}) ++ ENDIF() + ENDIF() + SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "") + +diff -aurN a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt +--- a/libmysql/CMakeLists.txt 2019-01-19 15:15:56.504484491 -0500 ++++ b/libmysql/CMakeLists.txt 2019-01-19 15:26:57.836803741 -0500 +@@ -153,6 +153,11 @@ + + SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL}) + ++SET(INSTALL_STATIC_LIBS "") ++IF(NOT ENABLE_STATIC_LIBS) ++ SET(INSTALL_STATIC_LIBS "NOINSTALL") ++ENDIF() ++ + # + # On Windows platform client library includes the client-side + # Windows Native Authentication plugin. +@@ -165,7 +170,7 @@ + + # Merge several convenience libraries into one big mysqlclient + # and link them together into shared library. +-MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development) ++MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development OUTPUT_DIR ${INSTALL_LIBDIR} ${INSTALL_STATIC_LIBS}) + + # Visual Studio users need debug static library for debug projects + IF(MSVC) +@@ -195,9 +200,11 @@ + + IF(UNIX) + GET_TARGET_NAME(mysqlclient lib_name) +- INSTALL_SYMLINK(mysqlclient +- ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a +- ${INSTALL_LIBDIR} Development) ++ IF(ENABLE_STATIC_LIBS) ++ INSTALL_SYMLINK(mysqlclient ++ ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a ++ ${INSTALL_LIBDIR} Development) ++ ENDIF() + ENDIF() + + IF(NOT DISABLE_SHARED) +diff -aurN a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt +--- a/libmysqld/CMakeLists.txt 2019-01-19 15:15:56.504484491 -0500 ++++ b/libmysqld/CMakeLists.txt 2019-01-19 15:30:07.304860344 -0500 +@@ -135,8 +135,13 @@ + ENDIF() + ENDFOREACH() + ++SET(INSTALL_STATIC_LIBS "") ++IF(NOT ENABLE_STATIC_LIBS) ++ SET(INSTALL_STATIC_LIBS "NOINSTALL") ++ENDIF() ++ + MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS} +- OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT Embedded) ++ OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT Embedded OUTPUT_DIR ${INSTALL_ELIBDIR} ${INSTALL_STATIC_LIBS}) + + # Visual Studio users need debug static library + IF(MSVC) +@@ -149,12 +154,14 @@ + # to handle. So, for now, we just disable it for those builds. + # + IF(UNIX AND NOT INSTALL_LAYOUT MATCHES "SVR4") +- INSTALL_DEBUG_TARGET(mysqlserver DESTINATION ${INSTALL_LIBDIR} RENAME ++ INSTALL_DEBUG_TARGET(mysqlserver DESTINATION ${INSTALL_ELIBDIR} RENAME + ${CMAKE_STATIC_LIBRARY_PREFIX}mysqld-debug) + ENDIF() + + IF(NOT DISABLE_SHARED) +- MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${CLIENT_API_FUNCTIONS}) ++ MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${CLIENT_API_FUNCTIONS} ++ COMPONENT Embedded OUTPUT_DIR ${INSTALL_ELIBDIR}) ++ + IF(UNIX) + # Name the shared library, handle versioning (provides same api as client library + # hence the same version) +diff -aurN a/libservices/CMakeLists.txt b/libservices/CMakeLists.txt +--- a/libservices/CMakeLists.txt 2019-01-19 15:15:56.504484491 -0500 ++++ b/libservices/CMakeLists.txt 2019-01-19 15:31:15.404161862 -0500 +@@ -22,4 +22,6 @@ + my_thread_scheduler_service.c) + + ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) +-INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) ++IF(ENABLE_STATIC_LIBS) ++ INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) ++ENDIF() +diff -aurN a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt +--- a/scripts/CMakeLists.txt 2019-01-19 15:15:56.504484491 -0500 ++++ b/scripts/CMakeLists.txt 2019-01-19 15:31:59.513709368 -0500 +@@ -209,6 +209,7 @@ + SET(scriptdir ${prefix}/${INSTALL_BINDIR}) + SET(libexecdir ${prefix}/${INSTALL_SBINDIR}) + SET(pkgdatadir ${prefix}/${INSTALL_MYSQLSHAREDIR}) ++SET(elibdir ${prefix}/${INSTALL_ELIBDIR}) + IF(INSTALL_LAYOUT MATCHES "STANDALONE") + SET(localstatedir ${prefix}/data) + ELSE() +diff -aurN a/scripts/mysql_config.pl.in b/scripts/mysql_config.pl.in +--- a/scripts/mysql_config.pl.in 2018-06-21 07:34:38.000000000 -0400 ++++ b/scripts/mysql_config.pl.in 2019-01-19 15:33:17.682907458 -0500 +@@ -190,9 +190,10 @@ + else + { + my $linkpath = "-L$pkglibdir @RPATH_OPTION@"; ++ my $elinkpath = "-L@elibdir@ @RPATH_OPTION@"; + @lib_opts = ($linkpath,"-lmysqlclient"); + @lib_r_opts = ($linkpath,"-lmysqlclient_r"); +- @lib_e_opts = ($linkpath,"-lmysqld"); ++ @lib_e_opts = ($elinkpath,"-lmysqld"); + } + + my $flags; +diff -aurN a/scripts/mysql_config.sh b/scripts/mysql_config.sh +--- a/scripts/mysql_config.sh 2019-01-19 15:15:56.294486959 -0500 ++++ b/scripts/mysql_config.sh 2019-01-19 15:34:31.992145205 -0500 +@@ -92,6 +92,10 @@ + plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"` + fix_path plugindir $plugindir_rel @libsubdir@/mysql/plugin @libsubdir@/plugin + ++elibdir='@elibdir@' ++elibdir_rel=`echo $elibdir | sed -e "s;^$basedir/;;"` ++fix_path elibdir $elibdir_rel lib64/mysql lib64 lib/mysql lib ++ + pkgincludedir='@pkgincludedir@' + if [ -f "$basedir/include/mysql/mysql.h" ]; then + pkgincludedir="$basedir/include/mysql" +@@ -114,7 +118,7 @@ + libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" + libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " + libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ " +-embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ " ++embedded_libs=" $ldflags -L$elibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ " + + if [ -r "$pkglibdir/libmygcc.a" ]; then + # When linking against the static library with a different version of GCC |