From 216bb6975d5cccd35c27a14fb39acec3ae0e8285 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Thu, 28 May 2026 00:32:49 -0700 Subject: [PATCH] [quickfix] Remove vendored double-conversion (#52056) Co-authored-by: Billy O'Neal --- .../00001-devendor-double-conversion.patch | 79 +++++++++++++++++++ ports/quickfix/00001-fix-build.patch | 38 --------- ports/quickfix/portfile.cmake | 10 ++- ports/quickfix/vcpkg.json | 2 + versions/baseline.json | 2 +- versions/q-/quickfix.json | 5 ++ 6 files changed, 96 insertions(+), 40 deletions(-) create mode 100644 ports/quickfix/00001-devendor-double-conversion.patch delete mode 100644 ports/quickfix/00001-fix-build.patch diff --git a/ports/quickfix/00001-devendor-double-conversion.patch b/ports/quickfix/00001-devendor-double-conversion.patch new file mode 100644 index 0000000000..0ae03e1485 --- /dev/null +++ b/ports/quickfix/00001-devendor-double-conversion.patch @@ -0,0 +1,79 @@ +diff --git a/src/C++/CMakeLists.txt b/src/C++/CMakeLists.txt +index 9582c7f..38684f4 100644 +--- a/src/C++/CMakeLists.txt ++++ b/src/C++/CMakeLists.txt +@@ -1,4 +1,5 @@ + add_subdirectory(test) ++find_package(double-conversion CONFIG REQUIRED) + + set(quickfix_VERSION_MAJOR 17) + set(quickfix_VERSION_MINOR 0) +@@ -83,6 +84,7 @@ else() + target_link_libraries(${PROJECT_NAME} ${OPENSSL_LIBRARIES} ${MYSQL_CLIENT_LIBS} ${PostgreSQL_LIBRARIES} ${ODBC_LIBRARIES} pthread) + endif() + ++target_link_libraries(${PROJECT_NAME} double-conversion::double-conversion) + include(CheckFunctionExists) + check_symbol_exists(ftime "sys/timeb.h" HAVE_FTIME) + if(HAVE_FTIME) +@@ -90,12 +92,12 @@ if(HAVE_FTIME) + endif() + + target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) +-target_include_directories(${PROJECT_NAME} INTERFACE ${PROJECT_SOURCE_DIR}/include) + target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/C++) ++target_include_directories(${PROJECT_NAME} PUBLIC $) + + set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${quickfix_VERSION} SOVERSION ${quickfix_VERSION_MAJOR} ) + +-install(TARGETS ${PROJECT_NAME} DESTINATION lib) ++install(TARGETS ${PROJECT_NAME} EXPORT quickfix-config DESTINATION lib) + + get_target_property(debug_postfix ${PROJECT_NAME} DEBUG_POSTFIX) + if(${debug_postfix} STREQUAL debug_postfix-NOTFOUND) +@@ -115,3 +117,4 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/C++/ DESTINATION include/quickfix + FILES_MATCHING PATTERN "*.h" + PATTERN double-conversion EXCLUDE + PATTERN test EXCLUDE) ++install(EXPORT quickfix-config DESTINATION share/cmake/quickfix) +diff --git a/src/C++/FieldConvertors.cpp b/src/C++/FieldConvertors.cpp +index 3e0637a..883306f 100644 +--- a/src/C++/FieldConvertors.cpp ++++ b/src/C++/FieldConvertors.cpp +@@ -25,21 +25,10 @@ + + #include "FieldConvertors.h" + #include ++#include + + namespace FIX { + +-// we include "double-conversion" project in FIX namespace +-// to avoid linking errors if quickfix is linked statically +-// and "double-conversion" is already used by target project +- +-#include "double-conversion/bignum-dtoa.cc" +-#include "double-conversion/bignum.cc" +-#include "double-conversion/cached-powers.cc" +-#include "double-conversion/diy-fp.cc" +-#include "double-conversion/double-conversion.cc" +-#include "double-conversion/fast-dtoa.cc" +-#include "double-conversion/fixed-dtoa.cc" +-#include "double-conversion/strtod.cc" + + static double_conversion::DoubleToStringConverter g_dtoa_converter( + double_conversion::DoubleToStringConverter::NO_FLAGS, +diff --git a/src/C++/UtilitySSL.cpp b/src/C++/UtilitySSL.cpp +index af916bc..13a48fc 100644 +--- a/src/C++/UtilitySSL.cpp ++++ b/src/C++/UtilitySSL.cpp +@@ -135,6 +135,9 @@ + + #ifdef _MSC_VER + ++#include ++#include ++ + #if !defined(snprintf) + #define snprintf _snprintf + #endif diff --git a/ports/quickfix/00001-fix-build.patch b/ports/quickfix/00001-fix-build.patch deleted file mode 100644 index d5a1d5503e..0000000000 --- a/ports/quickfix/00001-fix-build.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/C++/CMakeLists.txt b/src/C++/CMakeLists.txt -index 1bcc0d7c..51abba35 100644 ---- a/src/C++/CMakeLists.txt -+++ b/src/C++/CMakeLists.txt -@@ -84,12 +84,12 @@ else() - endif() - - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) --target_include_directories(${PROJECT_NAME} INTERFACE ${PROJECT_SOURCE_DIR}/include) - target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/C++) -+target_include_directories(${PROJECT_NAME} PUBLIC $) - - set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${quickfix_VERSION} SOVERSION ${quickfix_VERSION_MAJOR} ) - --install(TARGETS ${PROJECT_NAME} DESTINATION lib) -+install(TARGETS ${PROJECT_NAME} EXPORT quickfix-config DESTINATION lib) - - get_target_property(debug_postfix ${PROJECT_NAME} DEBUG_POSTFIX) - if(${debug_postfix} STREQUAL debug_postfix-NOTFOUND) -@@ -109,3 +109,4 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/C++/ DESTINATION include/quickfix - FILES_MATCHING PATTERN "*.h" - PATTERN double-conversion EXCLUDE - PATTERN test EXCLUDE) -+install(EXPORT quickfix-config DESTINATION share/cmake/quickfix) -diff --git a/src/C++/UtilitySSL.cpp b/src/C++/UtilitySSL.cpp -index af916bca..13a48fc6 100644 ---- a/src/C++/UtilitySSL.cpp -+++ b/src/C++/UtilitySSL.cpp -@@ -135,6 +135,9 @@ - - #ifdef _MSC_VER - -+#include -+#include -+ - #if !defined(snprintf) - #define snprintf _snprintf - #endif diff --git a/ports/quickfix/portfile.cmake b/ports/quickfix/portfile.cmake index 6111e48bae..37968b69cb 100644 --- a/ports/quickfix/portfile.cmake +++ b/ports/quickfix/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_from_github( SHA512 fbd45940334ea4d9f6e1f4164b0dfc0f509bd75689aa39b80ab5303b9be4f2123428e71d967f46bc5bc47ae1a521180af5ba7b619daff5f835c3dfb6dec03d50 HEAD_REF master PATCHES - 00001-fix-build.patch + 00001-devendor-double-conversion.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" QUICKFIX_SHARED_LIBS) @@ -28,6 +28,14 @@ vcpkg_cmake_install() vcpkg_copy_pdbs() vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/quickfix) +set(quickfix_config "${CURRENT_PACKAGES_DIR}/share/${PORT}/quickfix-config.cmake") +file(READ "${quickfix_config}" quickfix_config_contents) +file(WRITE "${quickfix_config}" + "include(CMakeFindDependencyMacro)\n" + "find_dependency(double-conversion CONFIG)\n" + "${quickfix_config_contents}" +) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/quickfix/vcpkg.json b/ports/quickfix/vcpkg.json index 46b2150db4..be2c898a7f 100644 --- a/ports/quickfix/vcpkg.json +++ b/ports/quickfix/vcpkg.json @@ -1,10 +1,12 @@ { "name": "quickfix", "version": "1.16.0", + "port-version": 1, "description": "QuickFIX is a free and open source implementation of the FIX protocol.", "homepage": "https://github.com/quickfix/quickfix", "supports": "!uwp & !(osx & arm64)", "dependencies": [ + "double-conversion", "openssl", { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index fa44169d1b..50a562fa99 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8554,7 +8554,7 @@ }, "quickfix": { "baseline": "1.16.0", - "port-version": 0 + "port-version": 1 }, "quickjs-ng": { "baseline": "0.15.0", diff --git a/versions/q-/quickfix.json b/versions/q-/quickfix.json index 9d75ca9e74..90424b90bc 100644 --- a/versions/q-/quickfix.json +++ b/versions/q-/quickfix.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1ba32d0e429273c51ebcd0e4185ffaeabd18701e", + "version": "1.16.0", + "port-version": 1 + }, { "git-tree": "fa55be5f298cd85950c0ed1b05141aced69c1107", "version": "1.16.0",