diff --git a/ports/libmariadb/export-cmake-targets.patch b/ports/libmariadb/export-cmake-targets.patch index c841a1fe917a0b..13c6c1a61bc29c 100644 --- a/ports/libmariadb/export-cmake-targets.patch +++ b/ports/libmariadb/export-cmake-targets.patch @@ -3,14 +3,14 @@ index c109a20..e1fa3f1 100644 --- a/libmariadb/CMakeLists.txt +++ b/libmariadb/CMakeLists.txt @@ -405,6 +405,7 @@ ELSE() - TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE mariadbclient) + ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def) SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) ENDIF() +TARGET_INCLUDE_DIRECTORIES(libmariadb PUBLIC $) TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS}) -@@ -453,13 +454,25 @@ ENDIF() +@@ -453,13 +454,30 @@ ENDIF() INSTALL(TARGETS mariadbclient COMPONENT Development @@ -23,15 +23,20 @@ index c109a20..e1fa3f1 100644 LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+install(EXPORT unofficial-libmariadb-targets DESTINATION share/unofficial-libmariadb) ++install(EXPORT unofficial-libmariadb-targets ++ NAMESPACE unofficial:: ++ DESTINATION share/unofficial-libmariadb ++) + -+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake" ++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake.in" +[[include(CMakeFindDependencyMacro) +find_dependency(ZLIB) -+find_dependency(OpenSSL) ++if("@WITH_SSL@" STREQUAL "OPENSSL") ++ find_dependency(OpenSSL) ++endif() +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libmariadb-targets.cmake") +]]) -+ ++configure_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake" @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake DESTINATION share/unofficial-libmariadb) IF(0) diff --git a/ports/libmariadb/fix-InstallPath.patch b/ports/libmariadb/fix-InstallPath.patch index bdf81788e3554a..c9794fc58fa4e3 100644 --- a/ports/libmariadb/fix-InstallPath.patch +++ b/ports/libmariadb/fix-InstallPath.patch @@ -23,11 +23,11 @@ index bcfd4de..c109a20 100644 + ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") ELSE() -- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} mariadbclient.def) -+ ADD_LIBRARY(libmariadb ${libmariadb_RC} mariadbclient.def) - TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE mariadbclient) +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def) ++ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def) SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) ENDIF() + @@ -453,13 +453,15 @@ ENDIF() INSTALL(TARGETS mariadbclient diff --git a/ports/libmariadb/fix-build-error-with-cmake3.20.patch b/ports/libmariadb/fix-build-error-with-cmake3.20.patch deleted file mode 100644 index 1eed4ee4741b0d..00000000000000 --- a/ports/libmariadb/fix-build-error-with-cmake3.20.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/ConnectorName.cmake b/cmake/ConnectorName.cmake -index b7bbbad..357b8ac 100644 ---- a/cmake/ConnectorName.cmake -+++ b/cmake/ConnectorName.cmake -@@ -22,7 +22,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows") - SET(MACHINE_NAME "x64") - ELSE() - SET(MACHINE_NAME "32") -- END() -+ ENDIF() - ENDIF() - - SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}") diff --git a/ports/libmariadb/fix-openssl.patch b/ports/libmariadb/fix-openssl.patch new file mode 100644 index 00000000000000..01b3b5e0101fcf --- /dev/null +++ b/ports/libmariadb/fix-openssl.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 33565f5..d83176d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -280,7 +280,7 @@ IF(NOT WITH_SSL STREQUAL "OFF") + IF(OPENSSL_FOUND) + ADD_DEFINITIONS(-DHAVE_OPENSSL -DHAVE_TLS) + SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/openssl.c") +- SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) ++ SET(SSL_LIBRARIES OpenSSL::SSL) + IF(WIN32) + CHECK_INCLUDE_FILES (${OPENSSL_INCLUDE_DIR}/openssl/applink.c HAVE_OPENSSL_APPLINK_C) + ENDIF() diff --git a/ports/libmariadb/no-extra-static-lib.patch b/ports/libmariadb/no-extra-static-lib.patch new file mode 100644 index 00000000000000..333be12495de45 --- /dev/null +++ b/ports/libmariadb/no-extra-static-lib.patch @@ -0,0 +1,19 @@ +diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt +index 39fa709..a726a6d 100644 +--- a/libmariadb/CMakeLists.txt ++++ b/libmariadb/CMakeLists.txt +@@ -455,10 +455,14 @@ IF(NOT WIN32) + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}") + ENDIF() + ++if(VCPKG_MARIADBCLIENT) + INSTALL(TARGETS mariadbclient + COMPONENT Development + EXPORT unofficial-libmariadb-targets + LIBRARY DESTINATION lib) ++else() ++ set_target_properties(mariadbclient PROPERTIES EXCLUDE_FROM_ALL 1) ++endif() + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries + EXPORT unofficial-libmariadb-targets diff --git a/ports/libmariadb/pkgconfig.patch b/ports/libmariadb/pkgconfig.patch new file mode 100644 index 00000000000000..a0cc1c18d48d2e --- /dev/null +++ b/ports/libmariadb/pkgconfig.patch @@ -0,0 +1,60 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0be0fb1..33565f5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -393,7 +393,7 @@ ENDIF() + INCLUDE(${CC_SOURCE_DIR}/plugins/CMakeLists.txt) + ADD_SUBDIRECTORY(include) + ADD_SUBDIRECTORY(libmariadb) +-IF(NOT WIN32) ++IF(1) + ADD_SUBDIRECTORY(mariadb_config) + ENDIF() + +diff --git a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt +index 70e619b..7a22fa1 100644 +--- a/mariadb_config/CMakeLists.txt ++++ b/mariadb_config/CMakeLists.txt +@@ -30,6 +30,15 @@ IF(${rllength} GREATER 0) + LIST(REMOVE_DUPLICATES SYSTEM_LIBS) + ENDIF() + ++set(REQUIRES_PRIVATE "" CACHE STRING "") ++if(WITH_SSL STREQUAL "OPENSSL") ++ list(REMOVE_ITEM SYSTEM_LIBS ${SSL_LIBRARIES}) ++ string(APPEND REQUIRES_PRIVATE " openssl") ++endif() ++if(WITH_EXTERNAL_ZLIB) ++ string(APPEND REQUIRES_PRIVATE " zlib") ++endif() ++ + FOREACH (LIB_NAME ${SYSTEM_LIBS}) + GET_LIB_NAME(${LIB_NAME} LIB_OUT) + SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} ${LIB_OUT}") +@@ -50,6 +59,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mariadb_config.c.in + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmariadb.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc @ONLY) + ++if(0) + ADD_EXECUTABLE(mariadb_config ${CMAKE_CURRENT_BINARY_DIR}/mariadb_config.c) + + IF(CMAKE_SYSTEM_NAME MATCHES AIX) +@@ -61,6 +71,7 @@ ENDIF() + INSTALL(TARGETS mariadb_config + DESTINATION "bin" + COMPONENT Development) ++endif() + + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc + DESTINATION "${INSTALL_PCDIR}" +diff --git a/mariadb_config/libmariadb.pc.in b/mariadb_config/libmariadb.pc.in +index 968181a..3f0410d 100644 +--- a/mariadb_config/libmariadb.pc.in ++++ b/mariadb_config/libmariadb.pc.in +@@ -16,5 +16,6 @@ Description: MariaDB Connector/C dynamic library + Cflags: -I${includedir} + Libs: -L${libdir} -lmariadb + Libs.private: @extra_dynamic_LDFLAGS@ ++Requires.private: @REQUIRES_PRIVATE@ + + diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 6f8da25bea9370..5ec7726802d862 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -2,11 +2,19 @@ if (EXISTS "${CURRENT_INSTALLED_DIR}/share/libmysql") message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") endif() +if("openssl" IN_LIST FEATURES AND "schannel" IN_LIST FEATURES) + message(FATAL_ERROR "Only one SSL backend must be selected.") +endif() + +if("schannel" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature schannel not supported on non-Windows platforms.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mariadb-corporation/mariadb-connector-c - REF 7d304d26c787a3f0430624db977b615aba56e4bb # v3.1.12 - SHA512 16e74b2cbe401492ef294e2442a00ef1739089152a88d9263ca4d17b65260554b330630e9405813fd9089fa445d676e3b6aa91ac94128ad6b0a299e8b7edc1b3 + REF b2bb1b213c79169b7c994a99f21f47f11be465d4 # v3.1.15 + SHA512 51ebd2e9fd505eebc7691c60fe0b86cfc5368f8b370fba6c3ec8f5514319ef1e0de4910ad5e093cd7d5e5c7782120e22e8c85c94af9389fa4e240cedf012d755 HEAD_REF 3.1 PATCHES arm64.patch @@ -15,68 +23,55 @@ vcpkg_from_github( fix-InstallPath.patch fix-iconv.patch export-cmake-targets.patch - fix-build-error-with-cmake3.20.patch #This can be removed in next release, which has been merged to upstream. + pkgconfig.patch + no-extra-static-lib.patch + fix-openssl.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - zlib WITH_EXTERNAL_ZLIB iconv WITH_ICONV + mariadbclient VCPKG_MARIADBCLIENT ) if("openssl" IN_LIST FEATURES) set(WITH_SSL OPENSSL) +elseif("schannel" IN_LIST FEATURES) + set(WITH_SSL ON) else() set(WITH_SSL OFF) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} - -DINSTALL_PLUGINDIR=plugin/${PORT} + -DINSTALL_INCLUDEDIR=include/mysql # legacy port decisiong + -DINSTALL_LIBDIR=lib + -DINSTALL_PLUGINDIR=plugins/${PORT} -DWITH_UNIT_TESTS=OFF -DWITH_CURL=OFF + -DWITH_EXTERNAL_ZLIB=ON -DWITH_SSL=${WITH_SSL} + -DREMOTEIO_PLUGIN_TYPE=OFF + -DAUTH_GSSAPI_PLUGIN_TYPE=OFF + MAYBE_UNUSED_VARIABLES + AUTH_GSSAPI_PLUGIN_TYPE ) -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libmariadb TARGET_PATH share/unofficial-libmariadb) - -vcpkg_fixup_pkgconfig() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - # remove debug header - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -endif() +vcpkg_cmake_install() -if(VCPKG_BUILD_TYPE STREQUAL "debug") - # move headers - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/include) -endif() +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libmariadb) -if (NOT VCPKG_TARGET_IS_WINDOWS) - vcpkg_copy_tools(TOOL_NAMES mariadb_config AUTO_CLEAN) +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libmariadb.pc" " -lmariadb" " -llibmariadb") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libmariadb.pc" " -lmariadb" " -llibmariadb") + endif() endif() +vcpkg_fixup_pkgconfig() -# remove plugin folder -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/lib/mariadb - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb) - -# copy & remove header files -file(REMOVE - ${CURRENT_PACKAGES_DIR}/include/mariadb/my_config.h.in - ${CURRENT_PACKAGES_DIR}/include/mariadb/mysql_version.h.in - ${CURRENT_PACKAGES_DIR}/include/mariadb/CMakeLists.txt - ${CURRENT_PACKAGES_DIR}/include/mariadb/Makefile.am) -file(RENAME - ${CURRENT_PACKAGES_DIR}/include/mariadb - ${CURRENT_PACKAGES_DIR}/include/mysql) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # copy license file -file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file +file(INSTALL "${SOURCE_PATH}/COPYING.LIB" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmariadb/vcpkg.json b/ports/libmariadb/vcpkg.json index 5658ced391a47c..6d0742e7fd14f0 100644 --- a/ports/libmariadb/vcpkg.json +++ b/ports/libmariadb/vcpkg.json @@ -1,13 +1,23 @@ { "name": "libmariadb", - "version-semver": "3.1.12", - "port-version": 2, + "version-semver": "3.1.15", "description": "MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases", "homepage": "https://github.com/MariaDB/mariadb-connector-c", - "default-features": [ - "openssl", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, "zlib" ], + "default-features": [ + "ssl" + ], "features": { "iconv": { "description": "Enables character set conversion", @@ -15,17 +25,41 @@ "libiconv" ] }, + "mariadbclient": { + "description": "Build the static mariadbclient library" + }, "openssl": { - "description": "Enable SSL support", + "description": "SSL support (OpenSSL)", "dependencies": [ "openssl" ] }, - "zlib": { - "description": "Use internal zlib", + "schannel": { + "description": "SSL support (Secure Channel)" + }, + "ssl": { + "description": "Default SSL backend", "dependencies": [ - "zlib" + { + "name": "libmariadb", + "default-features": false, + "features": [ + "schannel" + ], + "platform": "windows | mingw" + }, + { + "name": "libmariadb", + "default-features": false, + "features": [ + "openssl" + ], + "platform": "!windows & !mingw" + } ] + }, + "zlib": { + "description": "Obsolete. zlib is always used. This feature is left for compatibility." } } } diff --git a/ports/poco/fix_dependency.patch b/ports/poco/fix_dependency.patch index 2fd917affa77de..4b47bfddb299eb 100644 --- a/ports/poco/fix_dependency.patch +++ b/ports/poco/fix_dependency.patch @@ -33,7 +33,7 @@ index 4e05272..44dd7cb 100644 + find_package(libmysql) + if (NOT libmysql_FOUND) + find_package(unofficial-libmariadb CONFIG REQUIRED) -+ set(MYSQL_LIBRARIES libmariadb) ++ set(MYSQL_LIBRARIES unofficial::libmariadb) + endif() endif() diff --git a/ports/poco/vcpkg.json b/ports/poco/vcpkg.json index 0f6f37ab5ac9cf..2090861431af97 100644 --- a/ports/poco/vcpkg.json +++ b/ports/poco/vcpkg.json @@ -1,6 +1,7 @@ { "name": "poco", "version-semver": "1.11.0", + "port-version": 1, "description": "Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.", "homepage": "https://github.com/pocoproject/poco", "supports": "!uwp", diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index bbcb9d010a8a1d..19c7102d5bbb4b 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -611,7 +611,6 @@ libmariadb:x64-uwp = skip libmariadb:x64-windows = skip libmariadb:x64-windows-static = skip libmariadb:x64-windows-static-md=skip -libmariadb:x86-windows = skip # libmesh installs tons of problematic files that conflict with other ports (boost, eigen, etc) libmesh:arm64-windows=skip libmesh:arm-uwp=skip diff --git a/versions/baseline.json b/versions/baseline.json index 0caeab705254ab..2b12d8e8addf22 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3609,8 +3609,8 @@ "port-version": 1 }, "libmariadb": { - "baseline": "3.1.12", - "port-version": 2 + "baseline": "3.1.15", + "port-version": 0 }, "libmaxminddb": { "baseline": "1.4.3", @@ -5278,7 +5278,7 @@ }, "poco": { "baseline": "1.11.0", - "port-version": 0 + "port-version": 1 }, "podofo": { "baseline": "0.9.7", diff --git a/versions/l-/libmariadb.json b/versions/l-/libmariadb.json index ea10d0ad8f7689..2a3c4716b4dcd0 100644 --- a/versions/l-/libmariadb.json +++ b/versions/l-/libmariadb.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c51d4e78081ee708c1cdebeaaa201aa0064079e3", + "version-semver": "3.1.15", + "port-version": 0 + }, { "git-tree": "64479ab60db54486912b858f760af83dd2474f1c", "version-semver": "3.1.12", diff --git a/versions/p-/poco.json b/versions/p-/poco.json index c66b34c0a4778f..69062dd6e92abc 100644 --- a/versions/p-/poco.json +++ b/versions/p-/poco.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "83279266114bf6eab34a86e6009313e10f3aa11e", + "version-semver": "1.11.0", + "port-version": 1 + }, { "git-tree": "e8f4d5c1548d23526e05b069ee626d7d7f9a4399", "version-semver": "1.11.0",