diff options
author | 2016-04-27 14:05:53 -0400 | |
---|---|---|
committer | 2016-04-27 14:05:53 -0400 | |
commit | c6601b758d82903807230a8a643d702be94d139c (patch) | |
tree | 8e2581dd8f2103a30ed061218afe136c2ebb0466 /20006_all_cmake_elib-mysql-5.7.patch | |
parent | Respin 2 patches for MySQL 5.7 (diff) | |
download | mysql-extras-c6601b758d82903807230a8a643d702be94d139c.tar.gz mysql-extras-c6601b758d82903807230a8a643d702be94d139c.tar.bz2 mysql-extras-c6601b758d82903807230a8a643d702be94d139c.zip |
Respin elib patch for MySQL 5.7
Diffstat (limited to '20006_all_cmake_elib-mysql-5.7.patch')
-rw-r--r-- | 20006_all_cmake_elib-mysql-5.7.patch | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/20006_all_cmake_elib-mysql-5.7.patch b/20006_all_cmake_elib-mysql-5.7.patch new file mode 100644 index 0000000..7672f79 --- /dev/null +++ b/20006_all_cmake_elib-mysql-5.7.patch @@ -0,0 +1,191 @@ +diff -ur mysql-old/cmake/install_layout.cmake mysql/cmake/install_layout.cmake +--- mysql-old/cmake/install_layout.cmake 2014-01-20 00:14:06.581799638 -0100 ++++ mysql/cmake/install_layout.cmake 2014-01-20 00:15:27.647802721 -0100 +@@ -43,7 +43,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) +@@ -117,6 +118,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") +@@ -148,9 +150,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() + # +@@ -178,6 +182,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") +@@ -204,6 +209,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") +@@ -456,8 +456,8 @@ + # 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 DOCREADME SUPPORTFILES MYSQLDATA PLUGINTEST + SECURE_FILE_PRIV SECURE_FILE_PRIV_EMBEDDED MYSQLKEYRING) + SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}} + CACHE STRING "${var} installation directory" ${FORCE}) +diff -ur mysql-old/cmake/libutils.cmake mysql/cmake/libutils.cmake +--- mysql-old/cmake/libutils.cmake 2014-01-20 00:14:06.581799638 -0100 ++++ mysql/cmake/libutils.cmake 2014-01-20 00:15:27.647802721 -0100 +@@ -40,6 +40,8 @@ + # - 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 + +@@ -214,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} + ) +@@ -265,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 -ur mysql-old/libmysql/CMakeLists.txt mysql/libmysql/CMakeLists.txt +--- mysql-old/libmysql/CMakeLists.txt 2014-01-20 00:14:06.580799638 -0100 ++++ mysql/libmysql/CMakeLists.txt 2014-01-20 00:15:27.647802721 -0100 +@@ -179,8 +179,13 @@ + LIST(APPEND LIBS auth_win_client) + ENDIF() + ++SET(INSTALL_STATIC_LIBS "") ++IF(NOT ENABLE_STATIC_LIBS) ++ SET(INSTALL_STATIC_LIBS "NOINSTALL") ++ENDIF() ++ + # Merge several convenience libraries into one big mysqlclient +-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 + INSTALL_DEBUG_SYMBOLS(clientlib) +diff -ur mysql-old/libmysqld/CMakeLists.txt mysql/libmysqld/CMakeLists.txt +--- mysql-old/libmysqld/CMakeLists.txt 2014-01-20 00:14:06.453799634 -0100 ++++ mysql/libmysqld/CMakeLists.txt 2014-01-20 00:25:46.375826250 -0100 +@@ -126,8 +126,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) +@@ -135,12 +135,14 @@ + ENDIF() + + IF(UNIX) +- 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) +--- mysql-old/libservices/CMakeLists.txt 2014-02-06 14:35:25.162325748 -0500 ++++ mysql/libservices/CMakeLists.txt 2014-02-06 14:36:20.051137978 -0500 +@@ -26,4 +26,6 @@ + my_thread_scheduler_service.c) + + ADD_CONVENIENCE_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 mysql.old/scripts/CMakeLists.txt mysql/scripts/CMakeLists.txt +--- mysql.old/scripts/CMakeLists.txt 2014-03-14 15:07:28.000000000 -0400 ++++ mysql/scripts/CMakeLists.txt 2014-04-25 22:46:35.000000000 -0400 +@@ -239,6 +239,7 @@ + SET(pkglibdir ${prefix}/${INSTALL_LIBDIR}) + SET(pkgplugindir ${prefix}/${INSTALL_PLUGINDIR}) + SET(localstatedir ${MYSQL_DATADIR}) ++SET(elibdir ${prefix}/${INSTALL_ELIBDIR}) + + SET(RPATH_OPTION "") + IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") +diff -aurN mysql.old/scripts/mysql_config.sh mysql/scripts/mysql_config.sh +--- mysql.old/scripts/mysql_config.sh 2014-03-14 15:07:28.000000000 -0400 ++++ mysql/scripts/mysql_config.sh 2014-04-25 22:48:26.000000000 -0400 +@@ -91,6 +91,10 @@ + plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"` + fix_path plugindir $plugindir_rel lib/mysql/plugin lib/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" +@@ -116,7 +116,7 @@ + # Create options + libs="-L$pkglibdir@RPATH_OPTION@" + libs="$libs -l@LIBMYSQL_OS_OUTPUT_NAME@ @CONFIG_CLIENT_LIBS@" +-embedded_libs="-L$pkglibdir@RPATH_OPTION@" ++embedded_libs="-L$elibdir@RPATH_OPTION@" + embedded_libs="$embedded_libs -l@LIBEMBED_OS_OUTPUT_NAME@ @CONFIG_EMBEDD_LIBS@" + + cflags="-I$pkgincludedir @CFLAGS@" libs="$libs @QUOTED_CMAKE_C_LINK_FLAGS@" |