[libmysql] Fix for missing "ADD_COMPILE_FLAGS" command (#10162)

* [libmysql] Apply patch to prevent configuration error in extra/re2

Configuration of the embedded extra/re2 produces an error on Mac with Clang:

    CMake Error at extra/re2/CMakeLists.txt:74 (ADD_COMPILE_FLAGS):
      Unknown CMake command "ADD_COMPILE_FLAGS".

cmake/compile_flags.cmake was not included.

* [libmysql] Remove empty directory /lib/plugin/debug after installation

* [libmysql] Update version to 8.0.4-6

* [libmysql] Remove deprecated include(vcpkg_common_functions)

* [libmysql] x64-osx is now expected to pass CI

* [libmysql] Simplify copying of copyright file

* [libmysql] Handle unsupported triplets with vcpkg_fail_port_install
This commit is contained in:
Tobias Brückner 2020-02-29 06:56:22 +01:00 committed by GitHub
parent 053ade685f
commit 64f7f2590d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 19 deletions

View File

@ -1,5 +1,5 @@
Source: libmysql
Version: 8.0.4-5
Version: 8.0.4-6
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
Description: A MySQL client library for C development.

View File

@ -1,21 +1,13 @@
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.")
endif()
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "libmysql cannot currently be cross-compiled for UWP")
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT CMAKE_SYSTEM_NAME OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Oracle has dropped support in libmysql for 32-bit Windows.")
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.")
endif()
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mysql/mysql-server
@ -26,6 +18,7 @@ vcpkg_from_github(
ignore-boost-version.patch
system-libs.patch
linux_libmysql.patch
re2_add_compile_flags.patch
)
file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0)
@ -74,7 +67,8 @@ file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/bin
${CURRENT_PACKAGES_DIR}/docs
${CURRENT_PACKAGES_DIR}/debug/docs
${CURRENT_PACKAGES_DIR}/lib/debug)
${CURRENT_PACKAGES_DIR}/lib/debug
${CURRENT_PACKAGES_DIR}/lib/plugin/debug)
# remove misc files
file(REMOVE
@ -120,5 +114,4 @@ string(REPLACE "#include <mysql/udf_registration_types.h>" "#include \"mysql/udf
file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}")
# copy license
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -0,0 +1,12 @@
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()

View File

@ -7,10 +7,10 @@
## fail - the port does not build in the CI system.
## This is not necessarily the same as if a port is expected to build
## on a developers machine because it may fail due to the machine
## configuration. When set to fail the CI system will still attempt
## configuration. When set to fail the CI system will still attempt
## to build the port and will report a CI failure until this file is updated.
## skip - Do not build this port in the CI system.
## This is added to ports that may be flaky or conflict with other
## This is added to ports that may be flaky or conflict with other
## ports. Please comment for why a port is skipped so it can be
## removed when the issue is resolved.
## ignore - attempt to build the port, but do not fail the CI test if the
@ -27,7 +27,7 @@
## x64-windows
## x64-windows-static
## x86-windows
##
##
# Add new items alphabetically
@ -833,7 +833,6 @@ libmodplug:arm-uwp=fail
libmodplug:x64-uwp=fail
libmupdf:x64-linux=fail
libmupdf:x64-osx=fail
libmysql:x64-osx=fail
libmysql:x86-windows=fail
libnice:x64-linux=fail
libnice:x64-osx=fail
@ -1540,7 +1539,7 @@ rpclib:x86-windows=ignore
rpclib:x64-windows-static=ignore
rttr:arm-uwp=fail
rttr:x64-uwp=fail
rxspencer:x64-uwp=fail
rxspencer:x64-uwp=fail
rxspencer:arm-uwp=fail
scintilla:arm-uwp=fail
scintilla:x64-linux=fail