early-access version 2853
This commit is contained in:
12
externals/vcpkg/ports/libmysql/004-added-limits-include.patch
vendored
Executable file
12
externals/vcpkg/ports/libmysql/004-added-limits-include.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/sql-common/sql_string.cc b/sql-common/sql_string.cc
|
||||
index 40435729..8b6ee827 100644
|
||||
--- a/sql-common/sql_string.cc
|
||||
+++ b/sql-common/sql_string.cc
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "sql_string.h"
|
||||
|
||||
#include <algorithm>
|
||||
+#include <limits>
|
||||
|
||||
#include "my_dbug.h"
|
||||
#include "my_macros.h"
|
123
externals/vcpkg/ports/libmysql/export-cmake-targets.patch
vendored
Executable file
123
externals/vcpkg/ports/libmysql/export-cmake-targets.patch
vendored
Executable file
@@ -0,0 +1,123 @@
|
||||
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
|
||||
index c3a05ec..0d44ef2 100644
|
||||
--- a/cmake/install_macros.cmake
|
||||
+++ b/cmake/install_macros.cmake
|
||||
@@ -100,7 +100,7 @@ ENDFUNCTION()
|
||||
|
||||
FUNCTION(MYSQL_INSTALL_TARGETS)
|
||||
MYSQL_PARSE_ARGUMENTS(ARG
|
||||
- "DESTINATION;COMPONENT"
|
||||
+ "DESTINATION;COMPONENT;EXPORT"
|
||||
""
|
||||
${ARGN}
|
||||
)
|
||||
@@ -115,7 +115,20 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
|
||||
IF(ARG_COMPONENT)
|
||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||
ENDIF()
|
||||
- INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
+ IF (ARG_EXPORT)
|
||||
+ FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${ARG_EXPORT}-config.cmake"
|
||||
+"include(CMakeFindDependencyMacro)
|
||||
+find_dependency(ZLIB)
|
||||
+find_dependency(OpenSSL)
|
||||
+include(\"\${CMAKE_CURRENT_LIST_DIR}/${ARG_EXPORT}-targets.cmake\")
|
||||
+")
|
||||
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ARG_EXPORT}-config.cmake DESTINATION share/${ARG_EXPORT})
|
||||
+ set(EXPORT_ARGS EXPORT ${ARG_EXPORT}-targets)
|
||||
+ ENDIF()
|
||||
+ INSTALL(TARGETS ${TARGETS} ${EXPORT_ARGS} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ${COMP})
|
||||
+ IF (ARG_EXPORT)
|
||||
+ INSTALL(${EXPORT_ARGS} DESTINATION share/${ARG_EXPORT})
|
||||
+ ENDIF()
|
||||
SET(INSTALL_LOCATION ${ARG_DESTINATION} )
|
||||
INSTALL_DEBUG_SYMBOLS("${TARGETS}")
|
||||
SET(INSTALL_LOCATION)
|
||||
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
|
||||
index 5481fae..3fa58da 100644
|
||||
--- a/cmake/libutils.cmake
|
||||
+++ b/cmake/libutils.cmake
|
||||
@@ -237,7 +237,7 @@ MACRO(MERGE_LIBRARIES_SHARED)
|
||||
IF(ARG_COMPONENT)
|
||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||
ENDIF()
|
||||
- MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
|
||||
+ MYSQL_INSTALL_TARGETS(${TARGET} EXPORT unofficial-libmysql DESTINATION "${INSTALL_LIBDIR}" ${COMP})
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
@@ -372,7 +372,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES)
|
||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||
ENDIF()
|
||||
IF(INSTALL_STATIC_LIBRARIES)
|
||||
- MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
|
||||
+ MYSQL_INSTALL_TARGETS(${TARGET} EXPORT unofficial-libmysql DESTINATION "${INSTALL_LIBDIR}" ${COMP})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
|
||||
index 605288d..c5d0f5d 100644
|
||||
--- a/libmysql/CMakeLists.txt
|
||||
+++ b/libmysql/CMakeLists.txt
|
||||
@@ -245,8 +245,16 @@ ENDIF()
|
||||
# LDAP authentication SASL client plugin
|
||||
ADD_SUBDIRECTORY(authentication_ldap)
|
||||
|
||||
+IF (BUILD_SHARED_LIBS)
|
||||
+ set(INSTALL_SHARED )
|
||||
+ set(INSTALL_STATIC SKIP_INSTALL)
|
||||
+ELSE()
|
||||
+ set(INSTALL_SHARED SKIP_INSTALL)
|
||||
+ set(INSTALL_STATIC )
|
||||
+ENDIF()
|
||||
+
|
||||
# Merge several convenience libraries into one big mysqlclient
|
||||
-MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development)
|
||||
+MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} ${INSTALL_STATIC} COMPONENT Development)
|
||||
TARGET_LINK_LIBRARIES(mysqlclient PRIVATE ${LIBS_TO_LINK})
|
||||
|
||||
# Visual Studio users need debug static library for debug projects
|
||||
@@ -283,6 +291,7 @@ ENDIF()
|
||||
# Merge several convenience libraries into one big mysqlclient
|
||||
# and link them together into shared library.
|
||||
MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
|
||||
+ ${INSTALL_SHARED}
|
||||
EXPORTS
|
||||
${CLIENT_API_FUNCTIONS}
|
||||
${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
|
||||
@@ -370,6 +379,7 @@ CONFIGURE_FILE(api_test.c.in ${CMAKE_CURRENT_BINARY_DIR}/api_test.c)
|
||||
# from @CLIENT_API_FUNCTIONS@ are declared by <mysql.h>. It will fail
|
||||
# to run if not all of these symbols are exported by the library.
|
||||
#
|
||||
+IF (ENABLE_TESTING)
|
||||
MYSQL_ADD_EXECUTABLE(libmysql_api_test
|
||||
${CMAKE_CURRENT_BINARY_DIR}/api_test.c
|
||||
LINK_LIBRARIES libmysql ${LIBRT}
|
||||
@@ -398,3 +408,4 @@ ADD_CUSTOM_COMMAND(TARGET libmysql_api_test POST_BUILD
|
||||
COMMAND libmysql_api_test
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/libmysql_api_test.out
|
||||
)
|
||||
+ENDIF()
|
||||
\ No newline at end of file
|
||||
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
|
||||
index a5fa18e..0f2e15c 100644
|
||||
--- a/scripts/CMakeLists.txt
|
||||
+++ b/scripts/CMakeLists.txt
|
||||
@@ -329,13 +329,13 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
|
||||
STRING(REGEX REPLACE "^[ ]+" "" ${var} "${${var}}")
|
||||
STRING(REGEX REPLACE "[ ]+$" "" ${var} "${${var}}")
|
||||
ENDMACRO()
|
||||
-
|
||||
+IF (NOT BUILD_SHARED_LIBS)
|
||||
EXTRACT_LINK_LIBRARIES(mysqlclient CLIENT_LIBS)
|
||||
-
|
||||
-IF(MSVC)
|
||||
+ENDIF()
|
||||
+IF(MSVC AND NOT BUILD_SHARED_LIBS)
|
||||
GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION mysqlclient VERSION)
|
||||
GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME mysqlclient OUTPUT_NAME)
|
||||
-ELSE()
|
||||
+ELSEIF(BUILD_SHARED_LIBS)
|
||||
GET_TARGET_PROPERTY(LIBMYSQL_OS_SHLIB_VERSION libmysql VERSION)
|
||||
GET_TARGET_PROPERTY(LIBMYSQL_OS_OUTPUT_NAME libmysql OUTPUT_NAME)
|
||||
ENDIF()
|
13
externals/vcpkg/ports/libmysql/ignore-boost-version.patch
vendored
Executable file
13
externals/vcpkg/ports/libmysql/ignore-boost-version.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/boost.cmake b/cmake/boost.cmake
|
||||
index 592a67f..202a770 100644
|
||||
--- a/cmake/boost.cmake
|
||||
+++ b/cmake/boost.cmake
|
||||
@@ -297,7 +297,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10)
|
||||
COULD_NOT_FIND_BOOST()
|
||||
ENDIF()
|
||||
|
||||
-IF(NOT BOOST_MINOR_VERSION EQUAL 70)
|
||||
+IF(NOT BOOST_MINOR_VERSION EQUAL 70 AND NOT IGNORE_BOOST_VERSION)
|
||||
MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} "
|
||||
"we need 70"
|
||||
)
|
125
externals/vcpkg/ports/libmysql/openssl.patch
vendored
Executable file
125
externals/vcpkg/ports/libmysql/openssl.patch
vendored
Executable file
@@ -0,0 +1,125 @@
|
||||
diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
|
||||
index dea997b252c..81484f0652b 100644
|
||||
--- a/mysys/my_md5.cc
|
||||
+++ b/mysys/my_md5.cc
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/md5.h>
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+#include <openssl/evp.h>
|
||||
+#endif
|
||||
+
|
||||
static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
|
||||
int len) {
|
||||
MD5_CTX ctx;
|
||||
@@ -56,7 +60,11 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
|
||||
int compute_md5_hash(char *digest, const char *buf, int len) {
|
||||
int retval = 0;
|
||||
int fips_mode = 0;
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
fips_mode = FIPS_mode();
|
||||
+ #else
|
||||
+ fips_mode = EVP_default_properties_is_fips_enabled(NULL);
|
||||
+ #endif
|
||||
/* If fips mode is ON/STRICT restricted method calls will result into abort,
|
||||
* skipping call. */
|
||||
if (fips_mode == 0) {
|
||||
diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
|
||||
index 13bc6794ea5..8752bcea9bf 100644
|
||||
--- a/plugin/x/client/xconnection_impl.cc
|
||||
+++ b/plugin/x/client/xconnection_impl.cc
|
||||
@@ -51,6 +51,10 @@
|
||||
#include "plugin/x/src/config/config.h"
|
||||
#include "sql-common/net_ns.h"
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+#include <openssl/evp.h>
|
||||
+#endif
|
||||
+
|
||||
#ifndef WIN32
|
||||
#include <netdb.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -524,12 +528,20 @@ int set_fips_mode(const uint32_t fips_mode,
|
||||
if (fips_mode > 2) {
|
||||
goto EXIT;
|
||||
}
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
fips_mode_old = FIPS_mode();
|
||||
+ #else
|
||||
+ fips_mode_old = EVP_default_properties_is_fips_enabled(NULL);
|
||||
+ #endif
|
||||
if (fips_mode_old == fips_mode) {
|
||||
rc = 1;
|
||||
goto EXIT;
|
||||
}
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
if (!(rc = FIPS_mode_set(fips_mode))) {
|
||||
+ #else
|
||||
+ if (!(rc = EVP_default_properties_enable_fips(fips_mode))) {
|
||||
+ #endif
|
||||
err_library = ERR_get_error();
|
||||
ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1);
|
||||
err_string[OPENSSL_ERROR_LENGTH - 1] = '\0';
|
||||
diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
|
||||
index 6c04029ccb0..164b727e3dc 100644
|
||||
--- a/vio/viosslfactories.cc
|
||||
+++ b/vio/viosslfactories.cc
|
||||
@@ -40,6 +40,10 @@
|
||||
|
||||
#include <openssl/dh.h>
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+#include <openssl/evp.h>
|
||||
+#endif
|
||||
+
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10002000L
|
||||
#include <openssl/ec.h>
|
||||
#endif /* OPENSSL_VERSION_NUMBER < 0x10002000L */
|
||||
@@ -498,12 +502,20 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) {
|
||||
if (fips_mode > 2) {
|
||||
goto EXIT;
|
||||
}
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
fips_mode_old = FIPS_mode();
|
||||
+ #else
|
||||
+ fips_mode_old = EVP_default_properties_is_fips_enabled(NULL);
|
||||
+ #endif
|
||||
if (fips_mode_old == fips_mode) {
|
||||
rc = 1;
|
||||
goto EXIT;
|
||||
}
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
if (!(rc = FIPS_mode_set(fips_mode))) {
|
||||
+ #else
|
||||
+ if (!(rc = EVP_default_properties_enable_fips(NULL, fips_mode))) {
|
||||
+ #endif
|
||||
/*
|
||||
If OS doesn't have FIPS enabled openssl library and user sets FIPS mode
|
||||
ON, It fails with proper error. But in the same time it doesn't allow to
|
||||
@@ -511,7 +523,11 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) {
|
||||
error, setting old working FIPS mode value in the OpenSSL library. It will
|
||||
allow successful cryptographic operation and will not abort the server.
|
||||
*/
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
FIPS_mode_set(fips_mode_old);
|
||||
+ #else
|
||||
+ EVP_default_properties_enable_fips(NULL, fips_mode_old);
|
||||
+ #endif
|
||||
err_library = ERR_get_error();
|
||||
ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1);
|
||||
err_string[OPENSSL_ERROR_LENGTH - 1] = '\0';
|
||||
@@ -525,7 +541,13 @@ EXIT:
|
||||
|
||||
@returns openssl current fips mode
|
||||
*/
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
||||
uint get_fips_mode() { return FIPS_mode(); }
|
||||
+#else
|
||||
+uint get_fips_mode() {
|
||||
+ return EVP_default_properties_is_fips_enabled(NULL);
|
||||
+}
|
||||
+#endif
|
||||
|
||||
long process_tls_version(const char *tls_version) {
|
||||
const char *separator = ",";
|
145
externals/vcpkg/ports/libmysql/portfile.cmake
vendored
Executable file
145
externals/vcpkg/ports/libmysql/portfile.cmake
vendored
Executable file
@@ -0,0 +1,145 @@
|
||||
if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h")
|
||||
message(FATAL_ERROR "FATAL ERROR: ${PORT} and libmariadb are incompatible.")
|
||||
endif()
|
||||
|
||||
if (VCPKG_TARGET_IS_LINUX)
|
||||
message(WARNING "${PORT} needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mysql/mysql-server
|
||||
REF 7d10c82196c8e45554f27c00681474a9fb86d137 # 8.0.20
|
||||
SHA512 9f5e8cc254ea2a4cf76313287c7bb6fc693400810464dd2901e67d51ecb27f8916009464fd8aed8365c3038314b845b3d517db6e82ae5c7908612f0b3b72335f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
ignore-boost-version.patch
|
||||
system-libs.patch
|
||||
rename-version.patch
|
||||
export-cmake-targets.patch
|
||||
004-added-limits-include.patch
|
||||
openssl.patch
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/include/boost_1_70_0")
|
||||
|
||||
set(STACK_DIRECTION)
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(STACK_DIRECTION -DSTACK_DIRECTION=-1)
|
||||
endif()
|
||||
|
||||
#Skip the version check for Visual Studio
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(FORCE_UNSUPPORTED_COMPILER 1)
|
||||
endif()
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT_LINKAGE)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DWITHOUT_SERVER=ON
|
||||
-DWITH_UNIT_TESTS=OFF
|
||||
-DENABLED_PROFILING=OFF
|
||||
-DENABLE_TESTING=OFF
|
||||
-DWIX_DIR=OFF
|
||||
${STACK_DIRECTION}
|
||||
-DIGNORE_BOOST_VERSION=ON
|
||||
-DWITH_SYSTEMD=OFF
|
||||
-DWITH_TEST_TRACE_PLUGIN=OFF
|
||||
-DMYSQL_MAINTAINER_MODE=OFF
|
||||
-DBUNDLE_RUNTIME_LIBRARIES=OFF
|
||||
-DDOWNLOAD_BOOST=OFF
|
||||
-DENABLE_DOWNLOADS=OFF
|
||||
-DWITH_NDB_TEST=OFF
|
||||
-DWITH_NDB_NODEJS_DEFAULT=OFF
|
||||
-DWITH_NDBAPI_EXAMPLES=OFF
|
||||
-DMYSQLX_ADDITIONAL_TESTS_ENABLE=OFF
|
||||
-DWITH_SSL=system
|
||||
-DWITH_ICU=system
|
||||
-DWITH_LIBEVENT=system
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_ZLIB=system
|
||||
-DFORCE_UNSUPPORTED_COMPILER=${FORCE_UNSUPPORTED_COMPILER}
|
||||
-DINSTALL_STATIC_LIBRARIES=${BUILD_STATIC_LIBS}
|
||||
-DLINK_STATIC_RUNTIME_LIBRARIES=${STATIC_CRT_LINKAGE}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
||||
|
||||
list(APPEND MYSQL_TOOLS
|
||||
comp_err
|
||||
my_print_defaults
|
||||
mysql
|
||||
mysql_config_editor
|
||||
mysql_secure_installation
|
||||
mysql_ssl_rsa_setup
|
||||
mysqladmin
|
||||
mysqlbinlog
|
||||
mysqlcheck
|
||||
mysqldump
|
||||
mysqlimport
|
||||
mysqlpump
|
||||
mysqlshow
|
||||
mysqlslap
|
||||
mysqltest
|
||||
perror
|
||||
zlib_decompress
|
||||
)
|
||||
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND MYSQL_TOOLS
|
||||
echo
|
||||
)
|
||||
else()
|
||||
list(APPEND MYSQL_TOOLS
|
||||
mysql_config
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_tools(TOOL_NAMES ${MYSQL_TOOLS} AUTO_CLEAN)
|
||||
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share" "${CURRENT_PACKAGES_DIR}/${PORT}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/${PORT}")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/${PORT}" "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/${PORT}" "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}")
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libmysql CONFIG_PATH share/${PORT}/unofficial-libmysql)
|
||||
|
||||
# switch mysql into /mysql
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/mysql")
|
||||
|
||||
## delete useless vcruntime/scripts/bin/msg file
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/docs"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/docs"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/debug"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/plugin"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/plugin/debug"
|
||||
)
|
||||
|
||||
## remove misc files
|
||||
file(REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/LICENSE"
|
||||
"${CURRENT_PACKAGES_DIR}/README"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/LICENSE"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/README"
|
||||
)
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h" "#include <mysql/udf_registration_types.h>" "#include \"mysql/udf_registration_types.h\"")
|
||||
if (NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libmysql/mysql_config" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/../..")
|
||||
endif()
|
||||
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
# copy license
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
26
externals/vcpkg/ports/libmysql/rename-version.patch
vendored
Executable file
26
externals/vcpkg/ports/libmysql/rename-version.patch
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
diff --git a/VERSION b/VERSION.txt
|
||||
similarity index 100%
|
||||
rename from VERSION
|
||||
rename to VERSION.txt
|
||||
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
|
||||
index bed6e9f02e2..a924ef09bac 100644
|
||||
--- a/cmake/mysql_version.cmake
|
||||
+++ b/cmake/mysql_version.cmake
|
||||
@@ -30,7 +30,7 @@ SET(PROTOCOL_VERSION "10")
|
||||
|
||||
# Generate "something" to trigger cmake rerun when VERSION changes
|
||||
CONFIGURE_FILE(
|
||||
- ${CMAKE_SOURCE_DIR}/VERSION
|
||||
+ ${CMAKE_SOURCE_DIR}/VERSION.txt
|
||||
${CMAKE_BINARY_DIR}/VERSION.dep
|
||||
)
|
||||
|
||||
@@ -38,7 +38,7 @@ CONFIGURE_FILE(
|
||||
|
||||
MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
|
||||
IF(NOT ${var})
|
||||
- FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
|
||||
+ FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION.txt str REGEX "^[ ]*${keyword}=")
|
||||
IF(str)
|
||||
STRING(REPLACE "${keyword}=" "" str ${str})
|
||||
STRING(REGEX REPLACE "[ ].*" "" str "${str}")
|
149
externals/vcpkg/ports/libmysql/system-libs.patch
vendored
Executable file
149
externals/vcpkg/ports/libmysql/system-libs.patch
vendored
Executable file
@@ -0,0 +1,149 @@
|
||||
diff --git a/cmake/icu.cmake b/cmake/icu.cmake
|
||||
index fde3a75..9f694b9 100644
|
||||
--- a/cmake/icu.cmake
|
||||
+++ b/cmake/icu.cmake
|
||||
@@ -38,49 +38,11 @@
|
||||
# install_root is either 'system' or is assumed to be a path.
|
||||
#
|
||||
MACRO (FIND_ICU install_root)
|
||||
- IF("${install_root}" STREQUAL "system")
|
||||
- SET(EXTRA_FIND_LIB_ARGS)
|
||||
- SET(EXTRA_FIND_INC_ARGS)
|
||||
- ELSE()
|
||||
- SET(EXTRA_FIND_LIB_ARGS HINTS "${install_root}"
|
||||
- PATH_SUFFIXES "lib" "lib64" NO_DEFAULT_PATH)
|
||||
- SET(EXTRA_FIND_INC_ARGS HINTS "${install_root}"
|
||||
- PATH_SUFFIXES "include" NO_DEFAULT_PATH)
|
||||
- ENDIF()
|
||||
-
|
||||
- FIND_PATH(ICU_INCLUDE_DIR NAMES unicode/regex.h ${EXTRA_FIND_INC_ARGS})
|
||||
- IF (NOT ICU_INCLUDE_DIR)
|
||||
- MESSAGE(FATAL_ERROR "Cannot find ICU regular expression headers")
|
||||
- ENDIF()
|
||||
-
|
||||
- IF(WIN32)
|
||||
- SET(ICU_LIBS icuuc icuio icudt icuin)
|
||||
- ELSE()
|
||||
- SET(ICU_LIBS icuuc icuio icudata icui18n)
|
||||
- ENDIF()
|
||||
-
|
||||
- SET(ICU_SYSTEM_LIBRARIES)
|
||||
- FOREACH(ICU_LIB ${ICU_LIBS})
|
||||
- UNSET(ICU_LIB_PATH CACHE)
|
||||
- FIND_LIBRARY(ICU_LIB_PATH NAMES ${ICU_LIB} ${EXTRA_FIND_LIB_ARGS})
|
||||
- IF(NOT ICU_LIB_PATH)
|
||||
- MESSAGE(FATAL_ERROR "Cannot find the ICU library ${ICU_LIB}")
|
||||
- ENDIF()
|
||||
- LIST(APPEND ICU_SYSTEM_LIBRARIES ${ICU_LIB_PATH})
|
||||
- ENDFOREACH()
|
||||
-
|
||||
- # To do: If we include the path in ICU_INCLUDE_DIR, it leads to GUnit
|
||||
- # picking up the wrong regex.h header. And it looks like we don't need it;
|
||||
- # at least on Linux, the header gets installed in an OS path anyway.
|
||||
- IF(NOT "${install_root}" STREQUAL "system")
|
||||
- SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
|
||||
- ENDIF()
|
||||
-
|
||||
- SET(ICU_LIBRARIES ${ICU_SYSTEM_LIBRARIES})
|
||||
-
|
||||
- # Needed for version information.
|
||||
- SET(ICU_COMMON_DIR ${ICU_INCLUDE_DIR})
|
||||
|
||||
+ find_package(ICU REQUIRED COMPONENTS uc io dt in)
|
||||
+ set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in)
|
||||
+ set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR})
|
||||
+ SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (MYSQL_USE_BUNDLED_ICU)
|
||||
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
|
||||
index 3fa58da..88b53e7 100644
|
||||
--- a/cmake/libutils.cmake
|
||||
+++ b/cmake/libutils.cmake
|
||||
@@ -350,12 +350,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES)
|
||||
# On Windows, ssleay32.lib/libeay32.lib or libssl.lib/libcrypto.lib
|
||||
# must be merged into mysqlclient.lib
|
||||
IF(WIN32 AND ${TARGET} STREQUAL "mysqlclient")
|
||||
- SET(LINKER_EXTRA_FLAGS "")
|
||||
- FOREACH(LIB ${SSL_LIBRARIES})
|
||||
- STRING_APPEND(LINKER_EXTRA_FLAGS " ${LIB}")
|
||||
- ENDFOREACH()
|
||||
- SET_TARGET_PROPERTIES(${TARGET}
|
||||
- PROPERTIES STATIC_LIBRARY_FLAGS "${LINKER_EXTRA_FLAGS}")
|
||||
+ TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${SSL_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
IF(OSLIBS)
|
||||
diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake
|
||||
index 9aad130..68cbaba 100644
|
||||
--- a/cmake/lz4.cmake
|
||||
+++ b/cmake/lz4.cmake
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
MACRO (FIND_SYSTEM_LZ4)
|
||||
FIND_PATH(PATH_TO_LZ4 NAMES lz4frame.h)
|
||||
- FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4)
|
||||
+ FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4d lz4)
|
||||
IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY)
|
||||
SET(SYSTEM_LZ4_FOUND 1)
|
||||
INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4})
|
||||
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
|
||||
index 52feade..1e71bd7 100644
|
||||
--- a/cmake/ssl.cmake
|
||||
+++ b/cmake/ssl.cmake
|
||||
@@ -93,7 +93,20 @@ ENDMACRO()
|
||||
# Provides the following configure options:
|
||||
# WITH_SSL=[yes|system|<path/to/custom/installation>]
|
||||
MACRO (MYSQL_CHECK_SSL)
|
||||
+ find_package(OpenSSL REQUIRED)
|
||||
+ set(OPENSSL_LIBRARY OpenSSL::SSL CACHE STRING "")
|
||||
+ set(CRYPTO_LIBRARY OpenSSL::Crypto CACHE STRING "")
|
||||
+ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
|
||||
+ DOC "path to the openssl executable")
|
||||
+ SET(SSL_DEFINES "-DHAVE_OPENSSL")
|
||||
+ set(SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
|
||||
+ if(NOT WIN32)
|
||||
+ find_package(Threads REQUIRED)
|
||||
+ list(APPEND SSL_LIBRARIES Threads::Threads)
|
||||
+ endif()
|
||||
+ENDMACRO()
|
||||
|
||||
+MACRO (MYSQL_CHECK_SSL_OLD)
|
||||
IF(NOT WITH_SSL)
|
||||
SET(WITH_SSL "system" CACHE STRING ${WITH_SSL_DOC_STRING} FORCE)
|
||||
ENDIF()
|
||||
diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
|
||||
index 26c56fe..65bebb4 100644
|
||||
--- a/cmake/zlib.cmake
|
||||
+++ b/cmake/zlib.cmake
|
||||
@@ -51,28 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
|
||||
IF(WITH_ZLIB STREQUAL "bundled")
|
||||
MYSQL_USE_BUNDLED_ZLIB()
|
||||
ELSE()
|
||||
- SET(ZLIB_FIND_QUIETLY TRUE)
|
||||
- INCLUDE(FindZLIB)
|
||||
- IF(ZLIB_FOUND)
|
||||
- INCLUDE(CheckFunctionExists)
|
||||
- SET(SAVE_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
|
||||
- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} z)
|
||||
- CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32)
|
||||
- CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND)
|
||||
- CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND)
|
||||
- SET(CMAKE_REQUIRED_LIBRARIES ${SAVE_CMAKE_REQUIRED_LIBRARIES})
|
||||
- IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
|
||||
- SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES} CACHE INTERNAL "System zlib library")
|
||||
- SET(WITH_ZLIB "system" CACHE STRING
|
||||
- "Which zlib to use (possible values are 'bundled' or 'system')")
|
||||
- SET(ZLIB_SOURCES "")
|
||||
- ELSE()
|
||||
- SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
|
||||
- MESSAGE(STATUS "system zlib found but not usable")
|
||||
- ENDIF()
|
||||
- ENDIF()
|
||||
- IF(NOT ZLIB_FOUND)
|
||||
- MYSQL_USE_BUNDLED_ZLIB()
|
||||
- ENDIF()
|
||||
+ find_package(ZLIB REQUIRED)
|
||||
+ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
4
externals/vcpkg/ports/libmysql/usage
vendored
Executable file
4
externals/vcpkg/ports/libmysql/usage
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
The package libmysql provides CMake targets:
|
||||
|
||||
find_package(libmysql REQUIRED)
|
||||
target_link_libraries(main PRIVATE ${MYSQL_LIBRARIES})
|
9
externals/vcpkg/ports/libmysql/vcpkg-cmake-wrapper.cmake
vendored
Executable file
9
externals/vcpkg/ports/libmysql/vcpkg-cmake-wrapper.cmake
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
find_package(unofficial-libmysql CONFIG REQUIRED)
|
||||
if (TARGET mysqlclient)
|
||||
set(MYSQL_LIBRARY mysqlclient)
|
||||
elseif (TARGET libmysql)
|
||||
set(MYSQL_LIBRARY libmysql)
|
||||
endif()
|
||||
|
||||
set(libmysql_FOUND 1)
|
||||
set(MYSQL_LIBRARIES ${MYSQL_LIBRARY})
|
28
externals/vcpkg/ports/libmysql/vcpkg.json
vendored
Executable file
28
externals/vcpkg/ports/libmysql/vcpkg.json
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "libmysql",
|
||||
"version": "8.0.20",
|
||||
"port-version": 6,
|
||||
"description": "A MySQL client library for C development",
|
||||
"homepage": "https://github.com/mysql/mysql-server",
|
||||
"supports": "!(windows & x86) & !uwp",
|
||||
"dependencies": [
|
||||
"boost-algorithm",
|
||||
"boost-functional",
|
||||
"boost-geometry",
|
||||
"boost-graph",
|
||||
"boost-optional",
|
||||
"icu",
|
||||
"libevent",
|
||||
"lz4",
|
||||
"openssl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user