3
0
Fork 0
forked from mirrors/nixpkgs

cygwin: mysql patches

This commit is contained in:
Florian Friesdorf 2014-10-23 20:03:22 +02:00 committed by Rok Garbas
parent 387ad260c0
commit 447adb305f
3 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,44 @@
--- mysql-5.5.17/cmake/install_macros.cmake 2011-10-12 07:10:24.000000000 -0500
+++ mysql-5.5.17/cmake/install_macros.cmake 2011-11-07 23:19:35.772837800 -0600
@@ -230,7 +230,13 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ENDIF()
- INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
+ IF(${ARG_DESTINATION} STREQUAL "${INSTALL_LIBDIR}")
+ INSTALL(TARGETS ${TARGETS} LIBRARY DESTINATION ${ARG_DESTINATION}
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION ${ARG_DESTINATION} ${COMP})
+ ELSE()
+ INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
+ ENDIF()
SET(INSTALL_LOCATION ${ARG_DESTINATION} )
INSTALL_DEBUG_SYMBOLS("${TARGETS}")
SET(INSTALL_LOCATION)
--- mysql-5.5.17/libmysql/CMakeLists.txt 2011-10-12 07:10:24.000000000 -0500
+++ mysql-5.5.17/libmysql/CMakeLists.txt 2011-11-08 03:19:31.379219300 -0600
@@ -214,6 +214,7 @@ IF(NOT DISABLE_SHARED)
SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(libmysql PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ IF(NOT CYGWIN)
# Install links to libmysqlclient.so (client_r)
GET_VERSIONED_LIBNAME(
"${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r"
@@ -231,5 +232,6 @@ IF(NOT DISABLE_SHARED)
linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
ENDFOREACH()
+ ENDIF(NOT CYGWIN)
ENDIF()
ENDIF()
--- mysql-5.5.17/strings/dtoa.c 2011-10-12 07:10:25.000000000 -0500
+++ mysql-5.5.17/strings/dtoa.c 2011-11-07 20:38:05.064690100 -0600
@@ -36,6 +36,7 @@
***************************************************************/
+#define __STRICT_ANSI__
#include <my_base.h> /* for EOVERFLOW on Windows */
#include <my_global.h>
#include <m_string.h> /* for memcpy and NOT_FIXED_DEC */

View file

@ -0,0 +1,22 @@
--- mysql-5.5.17/libmysql/CMakeLists.txt 2011-10-12 07:10:24.000000000 -0500
+++ mysql-5.5.17/libmysql/CMakeLists.txt 2011-11-08 03:19:31.379219300 -0600
@@ -25,6 +25,11 @@ INCLUDE_DIRECTORIES(
ADD_DEFINITIONS(${SSL_DEFINES})
SET(CLIENT_API_FUNCTIONS
+dynstr_free
+dynstr_append_mem
+dynstr_append_os_quoted
+dynstr_realloc
+init_dynamic_string
get_tty_password
handle_options
load_defaults
@@ -131,6 +136,7 @@ mysql_server_end
mysql_set_character_set
mysql_get_character_set_info
mysql_stmt_next_result
+strfill
CACHE INTERNAL "Functions exported by client API"

View file

@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "0jn7py2wsq78rwi7vfihxs6z3h5hr338b9g46fl3z2g4ddki4yw8";
};
patches = if stdenv.isCygwin then [
./5.5.17-cygwin.patch
./5.5.17-export-symbols.patch
] else null;
preConfigure = stdenv.lib.optional stdenv.isDarwin ''
ln -s /bin/ps $TMPDIR/ps
export PATH=$PATH:$TMPDIR