mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 06:49:00 +08:00
[libmysql] Update to 8.0.20 (#11303)
* [libmysql] Update to 8.0.20 * Fix the redefinition'MYSQL_BIND' between libmysql and libodb-mysql
This commit is contained in:
parent
21848ba4de
commit
184c724033
@ -1,6 +1,6 @@
|
||||
Source: libmysql
|
||||
Version: 8.0.4-7
|
||||
Version: 8.0.20
|
||||
Homepage: https://github.com/mysql/mysql-server
|
||||
Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib
|
||||
Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, lz4, zlib
|
||||
Description: A MySQL client library for C development.
|
||||
Supports: !(windows&x86)&!uwp
|
@ -1,13 +1,13 @@
|
||||
diff --git a/cmake/boost.cmake b/cmake/boost.cmake
|
||||
index 2851181..8788322 100644
|
||||
index 592a67f..202a770 100644
|
||||
--- a/cmake/boost.cmake
|
||||
+++ b/cmake/boost.cmake
|
||||
@@ -280,7 +280,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10)
|
||||
@@ -297,7 +297,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10)
|
||||
COULD_NOT_FIND_BOOST()
|
||||
ENDIF()
|
||||
|
||||
-IF(NOT BOOST_MINOR_VERSION EQUAL 65)
|
||||
+IF(NOT BOOST_MINOR_VERSION EQUAL 65 AND NOT IGNORE_BOOST_VERSION)
|
||||
-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 65"
|
||||
"we need 70"
|
||||
)
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff --git a/configure.cmake b/configure.cmake
|
||||
index 1f3d8e2..9e45f48 100644
|
||||
--- a/configure.cmake
|
||||
+++ b/configure.cmake
|
||||
@@ -456,7 +456,11 @@ IF(NOT HAVE_FCNTL_NONBLOCK)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
|
||||
- STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor)
|
||||
+ IF(${CMAKE_SYSTEM_PROCESSOR})
|
||||
+ STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor)
|
||||
+ ELSE()
|
||||
+ STRING(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} processor)
|
||||
+ ENDIF()
|
||||
IF(processor MATCHES "86" OR processor MATCHES "amd64" OR processor MATCHES "x64")
|
||||
IF(NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||
# The loader in some Solaris versions has a bug due to which it refuses to
|
||||
|
@ -1,34 +1,37 @@
|
||||
vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "x86")
|
||||
|
||||
if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h")
|
||||
message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.")
|
||||
message(FATAL_ERROR "FATAL ERROR: ${PORT} and libmariadb are incompatible.")
|
||||
endif()
|
||||
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
message(WARNING "libmysql needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.")
|
||||
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 mysql-8.0.4
|
||||
SHA512 8d9129e7670e88df14238299052a5fe6d4f3e40bf27ef7a3ca8f4f91fb40507b13463e9bd24435b34e5d06c5d056dfb259fb04e77cc251b188eea734db5642be
|
||||
REF 7d10c82196c8e45554f27c00681474a9fb86d137 # 8.0.20
|
||||
SHA512 9f5e8cc254ea2a4cf76313287c7bb6fc693400810464dd2901e67d51ecb27f8916009464fd8aed8365c3038314b845b3d517db6e82ae5c7908612f0b3b72335f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
ignore-boost-version.patch
|
||||
system-libs.patch
|
||||
linux_libmysql.patch
|
||||
re2_add_compile_flags.patch
|
||||
rename-version.patch
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0)
|
||||
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()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
@ -37,16 +40,14 @@ vcpkg_configure_cmake(
|
||||
-DWITH_UNIT_TESTS=OFF
|
||||
-DENABLED_PROFILING=OFF
|
||||
-DWIX_DIR=OFF
|
||||
-DHAVE_LLVM_LIBCPP_EXITCODE=1
|
||||
${STACK_DIRECTION}
|
||||
-DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved.
|
||||
-DIGNORE_BOOST_VERSION=ON
|
||||
-DWITH_SSL=system
|
||||
-DWITH_ICU=system
|
||||
-DWITH_LIBEVENT=system
|
||||
-DWITH_LZMA=system
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_ZLIB=system
|
||||
-DFORCE_UNSUPPORTED_COMPILER=${FORCE_UNSUPPORTED_COMPILER}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake(ADD_BIN_TO_PATH)
|
||||
@ -71,18 +72,13 @@ file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/lib/debug
|
||||
${CURRENT_PACKAGES_DIR}/lib/plugin/debug)
|
||||
|
||||
# remove misc files
|
||||
## remove misc files
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/LICENSE
|
||||
${CURRENT_PACKAGES_DIR}/README
|
||||
${CURRENT_PACKAGES_DIR}/debug/LICENSE
|
||||
${CURRENT_PACKAGES_DIR}/debug/README)
|
||||
|
||||
# remove not-related libs
|
||||
file (REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/lib/mysqlservices.lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mysqlservices.lib)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/lib/libmysql.lib
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/extra/re2/CMakeLists.txt b/extra/re2/CMakeLists.txt
|
||||
index ca39db726..965f2c8dc 100644
|
||||
--- a/extra/re2/CMakeLists.txt
|
||||
+++ b/extra/re2/CMakeLists.txt
|
||||
@@ -71,6 +71,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
HAVE_TAUTOLOGICAL_UNDEFINED_COMPARE)
|
||||
IF(HAVE_TAUTOLOGICAL_UNDEFINED_COMPARE)
|
||||
# Boost source has unused local typedefs.
|
||||
+ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
||||
ADD_COMPILE_FLAGS(${RE2_SOURCES}
|
||||
COMPILE_FLAGS "-Wno-tautological-undefined-compare")
|
||||
ENDIF()
|
@ -1,8 +1,8 @@
|
||||
diff --git a/cmake/icu.cmake b/cmake/icu.cmake
|
||||
index ce9cc67..64445c5 100644
|
||||
index fde3a75..9f694b9 100644
|
||||
--- a/cmake/icu.cmake
|
||||
+++ b/cmake/icu.cmake
|
||||
@@ -40,49 +40,10 @@ SET(DEFAULT_ICU "bundled")
|
||||
@@ -38,49 +38,11 @@
|
||||
# install_root is either 'system' or is assumed to be a path.
|
||||
#
|
||||
MACRO (FIND_ICU install_root)
|
||||
@ -48,16 +48,16 @@ index ce9cc67..64445c5 100644
|
||||
-
|
||||
- # 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})
|
||||
|
||||
+ 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/lz4.cmake b/cmake/lz4.cmake
|
||||
index 6e576c3..60cb8ba 100644
|
||||
index 9aad130..68cbaba 100644
|
||||
--- a/cmake/lz4.cmake
|
||||
+++ b/cmake/lz4.cmake
|
||||
@@ -25,7 +25,7 @@
|
||||
@ -69,69 +69,49 @@ index 6e576c3..60cb8ba 100644
|
||||
IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY)
|
||||
SET(SYSTEM_LZ4_FOUND 1)
|
||||
INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4})
|
||||
diff --git a/cmake/lzma.cmake b/cmake/lzma.cmake
|
||||
index ac8aaa7..78d8e8d 100644
|
||||
--- a/cmake/lzma.cmake
|
||||
+++ b/cmake/lzma.cmake
|
||||
@@ -24,15 +24,10 @@
|
||||
# bundled is the default
|
||||
|
||||
MACRO (FIND_SYSTEM_LZMA)
|
||||
- FIND_PATH(PATH_TO_LZMA NAMES lzma/lzma.h)
|
||||
- FIND_LIBRARY(LZMA_SYSTEM_LIBRARY NAMES lzma)
|
||||
- IF (PATH_TO_LZMA AND LZMA_SYSTEM_LIBRARY)
|
||||
- SET(SYSTEM_LZMA_FOUND 1)
|
||||
- SET(LZMA_INCLUDE_DIR ${PATH_TO_LZMA})
|
||||
- SET(LZMA_LIBRARY ${LZMA_SYSTEM_LIBRARY})
|
||||
- MESSAGE(STATUS "LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIR}")
|
||||
- MESSAGE(STATUS "LZMA_LIBRARY ${LZMA_LIBRARY}")
|
||||
- ENDIF()
|
||||
+ find_package(LibLZMA REQUIRED)
|
||||
+ set(LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIRS})
|
||||
+ set(LZMA_LIBRARY ${LZMA_LIBRARIES})
|
||||
+ set(SYSTEM_LZMA_FOUND 1)
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (MYSQL_USE_BUNDLED_LZMA)
|
||||
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
|
||||
index 8af9699..2bdfe14 100644
|
||||
index 52feade..4a0237a 100644
|
||||
--- a/cmake/ssl.cmake
|
||||
+++ b/cmake/ssl.cmake
|
||||
@@ -104,6 +104,17 @@ ENDMACRO()
|
||||
@@ -93,7 +93,20 @@ ENDMACRO()
|
||||
# Provides the following configure options:
|
||||
# WITH_SSL=[yes|bundled|system|<path/to/custom/installation>]
|
||||
# WITH_SSL=[yes|system|<path/to/custom/installation>]
|
||||
MACRO (MYSQL_CHECK_SSL)
|
||||
+ find_package(OpenSSL REQUIRED)
|
||||
+ find_package(Threads REQUIRED)
|
||||
+ set(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY} CACHE STRING "")
|
||||
+ set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "")
|
||||
+ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
|
||||
+ DOC "path to the openssl executable")
|
||||
+ SET(SSL_DEFINES "-DHAVE_OPENSSL")
|
||||
+ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES} Threads::Threads)
|
||||
+ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES})
|
||||
+ if(NOT WIN32)
|
||||
+ find_package(Threads REQUIRED)
|
||||
+ list(APPEND SSL_LIBRARIES Threads::Threads)
|
||||
+ endif()
|
||||
+ENDMACRO()
|
||||
+
|
||||
|
||||
+MACRO (MYSQL_CHECK_SSL_OLD)
|
||||
IF(NOT WITH_SSL)
|
||||
IF(WIN32)
|
||||
CHANGE_SSL_SETTINGS("bundled")
|
||||
SET(WITH_SSL "system" CACHE STRING ${WITH_SSL_DOC_STRING} FORCE)
|
||||
ENDIF()
|
||||
diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
|
||||
index e74b8c9..6695075 100644
|
||||
index 26c56fe..65bebb4 100644
|
||||
--- a/cmake/zlib.cmake
|
||||
+++ b/cmake/zlib.cmake
|
||||
@@ -51,27 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
|
||||
@@ -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(CMAKE_REQUIRED_LIBRARIES z)
|
||||
- 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)
|
||||
- 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
|
||||
@ -145,7 +125,7 @@ index e74b8c9..6695075 100644
|
||||
- IF(NOT ZLIB_FOUND)
|
||||
- MYSQL_USE_BUNDLED_ZLIB()
|
||||
- ENDIF()
|
||||
+ find_package(ZLIB REQUIRED)
|
||||
+ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library")
|
||||
+ find_package(ZLIB REQUIRED)
|
||||
+ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: libodb-mysql
|
||||
Version: 2.4.0-6
|
||||
Version: 2.4.0-7
|
||||
Homepage: https://www.codesynthesis.com/products/odb/
|
||||
Description: MySQL support for the ODB ORM library
|
||||
Build-Depends: libodb, libmysql
|
||||
|
32
ports/libodb-mysql/fix-redefinttion.patch
Normal file
32
ports/libodb-mysql/fix-redefinttion.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/odb/mysql/mysql-types.hxx b/odb/mysql/mysql-types.hxx
|
||||
index 5396791..32a2a03 100644
|
||||
--- a/odb/mysql/mysql-types.hxx
|
||||
+++ b/odb/mysql/mysql-types.hxx
|
||||
@@ -7,13 +7,24 @@
|
||||
|
||||
#include <odb/mysql/details/config.hxx>
|
||||
|
||||
+#include <odb/mysql/version.hxx>
|
||||
+
|
||||
typedef bool my_bool;
|
||||
+
|
||||
+#if !defined(LIBODB_MYSQL_MARIADB) && MYSQL_VERSION_ID >= 80011
|
||||
+struct MYSQL_BIND;
|
||||
+#else
|
||||
typedef struct st_mysql_bind MYSQL_BIND;
|
||||
+#endif
|
||||
|
||||
-#ifdef LIBODB_MYSQL_INCLUDE_SHORT
|
||||
-# include <mysql_time.h>
|
||||
+#ifdef LIBODB_MYSQL_MARIADB
|
||||
+# include <mysql/mysql.h>
|
||||
#else
|
||||
-# include <mysql/mysql_time.h>
|
||||
+# ifdef LIBODB_MYSQL_INCLUDE_SHORT
|
||||
+# include <mysql_time.h>
|
||||
+# else
|
||||
+# include <mysql/mysql_time.h>
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#endif // ODB_MYSQL_MYSQL_TYPES_HXX
|
@ -1,5 +1,3 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.codesynthesis.com/download/odb/2.4/libodb-mysql-2.4.0.tar.gz"
|
||||
FILENAME "libodb-mysql-2.4.0.tar.gz"
|
||||
@ -10,7 +8,8 @@ vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE ${ARCHIVE}
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/adapter_mysql_8.0.patch
|
||||
adapter_mysql_8.0.patch
|
||||
fix-redefinttion.patch
|
||||
)
|
||||
|
||||
file(COPY
|
||||
|
Loading…
Reference in New Issue
Block a user