From 6876ee94103a2b2e02d87d6a146b185ee67af811 Mon Sep 17 00:00:00 2001 From: silverqx Date: Fri, 19 Apr 2024 12:39:28 +0200 Subject: [PATCH] vcpkg removed old patched ports --- cmake/vcpkg/ports.old/libevent/portfile.cmake | 71 --------- .../libmysql/004-added-limits-include.patch | 12 -- cmake/vcpkg/ports.old/libmysql/portfile.cmake | 146 ------------------ 3 files changed, 229 deletions(-) delete mode 100644 cmake/vcpkg/ports.old/libevent/portfile.cmake delete mode 100644 cmake/vcpkg/ports.old/libmysql/004-added-limits-include.patch delete mode 100644 cmake/vcpkg/ports.old/libmysql/portfile.cmake diff --git a/cmake/vcpkg/ports.old/libevent/portfile.cmake b/cmake/vcpkg/ports.old/libevent/portfile.cmake deleted file mode 100644 index 161735444..000000000 --- a/cmake/vcpkg/ports.old/libevent/portfile.cmake +++ /dev/null @@ -1,71 +0,0 @@ -vcpkg_fail_port_install(ON_TARGET "uwp") - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO libevent/libevent - REF release-2.1.12-stable - SHA512 5d6c6f0072f69a68b190772d4c973ce8f33961912032cdc104ad0854c0950f9d7e28bc274ca9df23897937f0cd8e45d1f214543d80ec271c5a6678814a7f195e - PATCHES - fix-file_path.patch - fix-LibeventConfig_cmake_in_path.patch -) - -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - INVERTED_FEATURES - openssl EVENT__DISABLE_OPENSSL - thread EVENT__DISABLE_THREAD_SUPPORT -) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(LIBEVENT_LIB_TYPE SHARED) -else() - set(LIBEVENT_LIB_TYPE STATIC) -endif() - -if(VCPKG_CRT_LINKAGE STREQUAL "static") - set(LIBEVENT_STATIC_RUNTIME ON) -else() - set(LIBEVENT_STATIC_RUNTIME OFF) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS ${FEATURE_OPTIONS} - -DEVENT__LIBRARY_TYPE=${LIBEVENT_LIB_TYPE} - -DEVENT__MSVC_STATIC_RUNTIME=${LIBEVENT_STATIC_RUNTIME} - -DEVENT__DISABLE_BENCHMARK=ON - -DEVENT__DISABLE_TESTS=ON - -DEVENT__DISABLE_REGRESS=ON - -DEVENT__DISABLE_SAMPLES=ON -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libevent/) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/event_rpcgen.py ${CURRENT_PACKAGES_DIR}/tools/libevent/event_rpcgen.py) - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -set(_target_suffix) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(_target_suffix static) -else() - set(_target_suffix shared) -endif() -vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-${_target_suffix}.cmake - "${CURRENT_PACKAGES_DIR}" - "${CURRENT_INSTALLED_DIR}" -) - -vcpkg_copy_pdbs() - -#Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/cmake/vcpkg/ports.old/libmysql/004-added-limits-include.patch b/cmake/vcpkg/ports.old/libmysql/004-added-limits-include.patch deleted file mode 100644 index d02641ad7..000000000 --- a/cmake/vcpkg/ports.old/libmysql/004-added-limits-include.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 -+#include - - #include "my_dbug.h" - #include "my_macros.h" diff --git a/cmake/vcpkg/ports.old/libmysql/portfile.cmake b/cmake/vcpkg/ports.old/libmysql/portfile.cmake deleted file mode 100644 index 6308c9d90..000000000 --- a/cmake/vcpkg/ports.old/libmysql/portfile.cmake +++ /dev/null @@ -1,146 +0,0 @@ -vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "x86") - -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 -) - -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_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - 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_install_cmake(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}/libmysql) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/libmysql) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/libmysql ${CURRENT_PACKAGES_DIR}/share/libmysql) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/libmysql ${CURRENT_PACKAGES_DIR}/debug/share/libmysql) - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/libmysql/unofficial-libmysql TARGET_PATH share/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 -) - -file(READ ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h _contents) -string(REPLACE "#include " "#include \"mysql/udf_registration_types.h\"" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}") - -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)