From 4d2f194fdc8b8b3c5442462ef240691b0ed3c351 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Mon, 15 Dec 2025 21:24:16 +0100 Subject: [PATCH] [gperftools] update to 2.17.2 (#48873) Co-authored-by: toge --- ports/gperftools/install.diff | 39 +++++++------------ ports/gperftools/portfile.cmake | 16 +------- ports/gperftools/vcpkg.json | 5 +-- .../test_ports/vcpkg-ci-gperftools/vcpkg.json | 7 ---- versions/baseline.json | 2 +- versions/g-/gperftools.json | 5 +++ 6 files changed, 22 insertions(+), 52 deletions(-) diff --git a/ports/gperftools/install.diff b/ports/gperftools/install.diff index c4cdfbadc1..89eb7b125d 100644 --- a/ports/gperftools/install.diff +++ b/ports/gperftools/install.diff @@ -20,28 +20,26 @@ index e9647d5..092f40d 100644 src/stacktrace.cc src/base/elf_mem_image.cc src/base/vdso_support.cc) -@@ -926,4 +926,66 @@ if(MSVC) +@@ -926,4 +926,53 @@ if(MSVC) add_subdirectory(src/windows) endif() +foreach(lib IN ITEMS -+ common stacktrace + tcmalloc_minimal tcmalloc tcmalloc_minimal_debug tcmalloc_debug + profiler +) + if(TARGET "${lib}") + install(TARGETS "${lib}") -+ if(lib MATCHES "tcmalloc|profiler") -+ set(pc_file "${CMAKE_CURRENT_BINARY_DIR}/lib${lib}.pc") -+ set(pc_libs_private "${CMAKE_THREAD_LIBS_INIT}") -+ if("execinfo" IN_LIST unwind_libs AND lib MATCHES "tcmalloc") -+ string(APPEND pc_libs_private " -lexecinfo") -+ endif() -+ set(pc_requires_private "") -+ if(gperftools_enable_libunwind AND lib MATCHES "tcmalloc") -+ string(APPEND pc_requires_private " libunwind") -+ endif() -+ file(CONFIGURE OUTPUT "${pc_file}" CONTENT [[ ++ set(pc_file "${CMAKE_CURRENT_BINARY_DIR}/lib${lib}.pc") ++ set(pc_libs_private "${CMAKE_THREAD_LIBS_INIT}") ++ if("execinfo" IN_LIST unwind_libs AND lib MATCHES "tcmalloc") ++ string(APPEND pc_libs_private " -lexecinfo") ++ endif() ++ set(pc_requires_private "") ++ if(gperftools_enable_libunwind AND lib MATCHES "tcmalloc") ++ string(APPEND pc_requires_private " libunwind") ++ endif() ++ file(CONFIGURE OUTPUT "${pc_file}" CONTENT [[ +prefix= +exec_prefix=${prefix} +libdir=${prefix}/lib @@ -56,18 +54,7 @@ index e9647d5..092f40d 100644 +Libs.private: @pc_libs_private@ +Requires.private: @pc_requires_private@ +]] @ONLY) -+ install(FILES "${pc_file}" DESTINATION "lib/pkgconfig") -+ endif() -+ endif() -+endforeach() -+ -+foreach(exe IN ITEMS addr2line-pdb nm-pdb) -+ if(NOT TARGET "${exe}") -+ continue() -+ elseif(GPERFTOOLS_BUILD_TOOLS) -+ install(TARGETS "${exe}") -+ else() -+ set_target_properties("${exe}" PROPERTIES EXCLUDE_FROM_ALL 1) ++ install(FILES "${pc_file}" DESTINATION "lib/pkgconfig") + endif() +endforeach() + @@ -82,7 +69,7 @@ index e9647d5..092f40d 100644 + src/gperftools/nallocx.h + src/gperftools/profiler.h + src/gperftools/stacktrace.h -+ "${CMAKE_CURRENT_BINARY_DIR}/gperftools/tcmalloc.h" ++ src/gperftools/tcmalloc.h + DESTINATION include/gperftools +) + diff --git a/ports/gperftools/portfile.cmake b/ports/gperftools/portfile.cmake index 289401cc53..296a025809 100644 --- a/ports/gperftools/portfile.cmake +++ b/ports/gperftools/portfile.cmake @@ -2,14 +2,14 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gperftools/gperftools REF gperftools-${VERSION} - SHA512 a6eddee06cd6a9344c724522a5bb977082d6ee30eded1c6793d6bb508d4c8542a238dc0f62818c715f09312c858cc90cded0ee95ba2a3ea15fad8a0b78bcdaea + SHA512 c6f68c307f7ecc5a3ff49b616155cb6d5bcc8e7a14b52f480a4e7e6deed562e988af549cd6b3d6f9150d92561947460a2a97d3355c73b81a4d0414870c0b7d32 HEAD_REF master PATCHES libunwind.diff install.diff win32-override.diff ) -file(REMOVE_RECURSE "${SOURCE_PATH}/vendor") +file(REMOVE_RECURSE "${SOURCE_PATH}/vendor/googletest") if("override" IN_LIST FEATURES) vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT) @@ -20,7 +20,6 @@ vcpkg_check_features( FEATURES libunwind gperftools_enable_libunwind override GPERFTOOLS_WIN32_OVERRIDE - tools GPERFTOOLS_BUILD_TOOLS ) if(gperftools_enable_libunwind) @@ -35,10 +34,7 @@ vcpkg_cmake_configure( "-DCMAKE_PROJECT_INCLUDE=${CURRENT_PORT_DIR}/cmake-project-include.cmake" -Dgperftools_build_benchmark=OFF ${OPTIONS} - OPTIONS_DEBUG - -DGPERFTOOLS_BUILD_TOOLS=OFF MAYBE_UNUSED_VARIABLES - GPERFTOOLS_BUILD_TOOLS GPERFTOOLS_WIN32_OVERRIDE ) vcpkg_cmake_install() @@ -52,14 +48,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endforeach() endif() -if("tools" IN_LIST FEATURES) - if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) - vcpkg_copy_tools(TOOL_NAMES addr2line-pdb nm-pdb AUTO_CLEAN) - endif() - # Perl script - file(INSTALL "${SOURCE_PATH}/src/pprof" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") -endif() - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/ports/gperftools/vcpkg.json b/ports/gperftools/vcpkg.json index 449eac15eb..7d95acd4ce 100644 --- a/ports/gperftools/vcpkg.json +++ b/ports/gperftools/vcpkg.json @@ -1,6 +1,6 @@ { "name": "gperftools", - "version": "2.16", + "version": "2.17.2", "description": "A high-performance multi-threaded malloc() implementation, plus some performance analysis tools.", "homepage": "https://github.com/gperftools/gperftools", "license": "BSD-3-Clause", @@ -21,9 +21,6 @@ "override": { "description": "Override Windows allocators", "supports": "windows & staticcrt" - }, - "tools": { - "description": "Install tools" } } } diff --git a/scripts/test_ports/vcpkg-ci-gperftools/vcpkg.json b/scripts/test_ports/vcpkg-ci-gperftools/vcpkg.json index b987136a6a..cbc590d43f 100644 --- a/scripts/test_ports/vcpkg-ci-gperftools/vcpkg.json +++ b/scripts/test_ports/vcpkg-ci-gperftools/vcpkg.json @@ -6,13 +6,6 @@ "license": "MIT", "dependencies": [ "gperftools", - { - "name": "gperftools", - "features": [ - "tools" - ], - "platform": "native" - }, { "name": "gperftools", "features": [ diff --git a/versions/baseline.json b/versions/baseline.json index 7b4afe7e9e..400b0d4001 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3445,7 +3445,7 @@ "port-version": 0 }, "gperftools": { - "baseline": "2.16", + "baseline": "2.17.2", "port-version": 0 }, "gpgme": { diff --git a/versions/g-/gperftools.json b/versions/g-/gperftools.json index d375ba8c55..0be587a85c 100644 --- a/versions/g-/gperftools.json +++ b/versions/g-/gperftools.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "19a4b8ddfb0a2462157b915a18fc8bca61f1d561", + "version": "2.17.2", + "port-version": 0 + }, { "git-tree": "942debf1003954f938f11be718ad6582b3059c00", "version": "2.16",