Skip to content

Commit 11eda8a

Browse files
committed
[tracy] update to 0.13
1 parent ae8fa5a commit 11eda8a

File tree

15 files changed

+259
-25
lines changed

15 files changed

+259
-25
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2+
index 740b484..e4397a4 100644
3+
--- a/src/CMakeLists.txt
4+
+++ b/src/CMakeLists.txt
5+
@@ -128,6 +128,14 @@ set_target_properties(${TARGET_NAME} PROPERTIES
6+
7+
if (NFD_INSTALL)
8+
include(GNUInstallDirs)
9+
+ include(CMakePackageConfigHelpers)
10+
+
11+
+ write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-config-version.cmake"
12+
+ VERSION "${PROJECT_VERSION}"
13+
+ COMPATIBILITY SameMajorVersion
14+
+ )
15+
+
16+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-config-version.cmake" DESTINATION lib/cmake/${TARGET_NAME})
17+
18+
install(TARGETS ${TARGET_NAME} EXPORT ${TARGET_NAME}-export
19+
LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}

ports/nativefiledialog-extended/portfile.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ vcpkg_from_github(
44
REF v${VERSION}
55
SHA512 4ec3e174a90354c524d9be2776422740f80b73021df94e1942e60ab4310995245554f83097b9b2dcca04d016a8548d3fc0760f73daf724c5c3d72c15cf776bed
66
HEAD_REF master
7+
PATCHES
8+
fix-version.cmake
79
)
810

911
vcpkg_cmake_configure(

ports/nativefiledialog-extended/vcpkg.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "nativefiledialog-extended",
33
"version": "1.2.1",
4+
"port-version": 1,
45
"description": "Native File Dialog Extended",
56
"homepage": "https://github.com/btzy/nativefiledialog-extended",
67
"license": "Zlib",

ports/tidy-html5/fix-version.cmake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 8efec25..6007610 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -700,4 +700,13 @@ install(FILES
6+
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
7+
)
8+
9+
+
10+
+include(CMakePackageConfigHelpers)
11+
+
12+
+write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-tidy-html5Config-version.cmake"
13+
+ VERSION "${LIBTIDY_VERSION}"
14+
+ COMPATIBILITY SameMajorVersion
15+
+)
16+
+
17+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-tidy-html5Config-version.cmake DESTINATION ${LIB_INSTALL_DIR}/cmake/unofficial-tidy-html5)
18+
# eof

ports/tidy-html5/portfile.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ vcpkg_from_github(
1010
debug-postfix.patch
1111
fix_unsupport_func_uwp.patch
1212
cmake_find_package_support.patch
13+
fix-version.cmake
1314
)
1415

1516
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIB)

ports/tidy-html5/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tidy-html5",
33
"version": "5.8.0",
4-
"port-version": 2,
4+
"port-version": 3,
55
"description": "Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools.",
66
"homepage": "https://www.html-tidy.org",
77
"license": null,

ports/tracy/disable-git.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt
2+
index d01731d3..1d36eee1 100644
3+
--- a/profiler/CMakeLists.txt
4+
+++ b/profiler/CMakeLists.txt
5+
@@ -266,7 +266,7 @@ if(NOT DEFINED GIT_REV)
6+
endif()
7+
8+
find_package(Git)
9+
-if(Git_FOUND)
10+
+if(0)
11+
add_custom_target(git-ref
12+
COMMAND ${CMAKE_COMMAND} -E echo "#pragma once" > GitRef.hpp.tmp
13+
COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR} log -1 "--format=namespace tracy { static inline const char* GitRef = %x22%h%x22; }" ${GIT_REV} >> GitRef.hpp.tmp || echo "namespace tracy { static inline const char* GitRef = \"unknown\"; }" >> GitRef.hpp.tmp
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp
2+
index c79948b8..7bd717b7 100644
3+
--- a/profiler/src/profiler/TracySourceView.cpp
4+
+++ b/profiler/src/profiler/TracySourceView.cpp
5+
@@ -713,7 +713,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
6+
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
7+
break;
8+
case CpuArchArm64:
9+
- rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle );
10+
+ rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
11+
break;
12+
default:
13+
assert( false );
14+
@@ -778,9 +778,9 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
15+
}
16+
break;
17+
case CpuArchArm64:
18+
- if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM )
19+
+ if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
20+
{
21+
- jumpAddr = (uint64_t)detail.aarch64.operands[0].imm;
22+
+ jumpAddr = (uint64_t)detail.arm64.operands[0].imm;
23+
}
24+
break;
25+
default:
26+
@@ -865,18 +865,18 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
27+
}
28+
break;
29+
case CpuArchArm64:
30+
- for( uint8_t i=0; i<detail.aarch64.op_count; i++ )
31+
+ for( uint8_t i=0; i<detail.arm64.op_count; i++ )
32+
{
33+
uint8_t type = 0;
34+
- switch( detail.aarch64.operands[i].type )
35+
+ switch( detail.arm64.operands[i].type )
36+
{
37+
- case AARCH64_OP_IMM:
38+
+ case ARM64_OP_IMM:
39+
type = 0;
40+
break;
41+
- case AARCH64_OP_REG:
42+
+ case ARM64_OP_REG:
43+
type = 1;
44+
break;
45+
- case AARCH64_OP_MEM:
46+
+ case ARM64_OP_MEM:
47+
type = 2;
48+
break;
49+
default:
50+
diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp
51+
index b1dffe1a..cb1e179f 100644
52+
--- a/server/TracyWorker.cpp
53+
+++ b/server/TracyWorker.cpp
54+
@@ -3912,7 +3912,7 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
55+
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
56+
break;
57+
case CpuArchArm64:
58+
- rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle );
59+
+ rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
60+
break;
61+
default:
62+
assert( false );
63+
@@ -3952,9 +3952,9 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
64+
}
65+
break;
66+
case CpuArchArm64:
67+
- if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM )
68+
+ if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
69+
{
70+
- callAddr = (uint64_t)detail.aarch64.operands[0].imm;
71+
+ callAddr = (uint64_t)detail.arm64.operands[0].imm;
72+
}
73+
break;
74+
default:
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
diff --git a/cmake/server.cmake b/cmake/server.cmake
2+
index a76d1c13..d8c1a26f 100644
3+
--- a/cmake/server.cmake
4+
+++ b/cmake/server.cmake
5+
@@ -29,7 +29,7 @@ list(TRANSFORM TRACY_SERVER_SOURCES PREPEND "${TRACY_SERVER_DIR}/")
6+
7+
add_library(TracyServer STATIC EXCLUDE_FROM_ALL ${TRACY_COMMON_SOURCES} ${TRACY_SERVER_SOURCES})
8+
target_include_directories(TracyServer PUBLIC ${TRACY_COMMON_DIR} ${TRACY_SERVER_DIR})
9+
-target_link_libraries(TracyServer PUBLIC TracyCapstone libzstd PPQSort::PPQSort)
10+
+target_link_libraries(TracyServer PUBLIC TracyCapstone zstd::libzstd PPQSort::PPQSort)
11+
if(NO_STATISTICS)
12+
target_compile_definitions(TracyServer PUBLIC TRACY_NO_STATISTICS)
13+
endif()
14+
diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake
15+
index a54f7c53..73b16592 100644
16+
--- a/cmake/vendor.cmake
17+
+++ b/cmake/vendor.cmake
18+
@@ -136,6 +136,7 @@ target_include_directories(TracyGetOpt PUBLIC ${GETOPT_DIR})
19+
CPMAddPackage(
20+
NAME ImGui
21+
GITHUB_REPOSITORY ocornut/imgui
22+
+ FORCE TRUE
23+
GIT_TAG v1.92.1-docking
24+
DOWNLOAD_ONLY TRUE
25+
PATCHES
26+
@@ -153,6 +154,9 @@ set(IMGUI_SOURCES
27+
backends/imgui_impl_opengl3.cpp
28+
)
29+
30+
+# Make ImGui_SOURCE_DIR available to the parent scope
31+
+set(ImGui_SOURCE_DIR "${ImGui_SOURCE_DIR}" PARENT_SCOPE)
32+
+
33+
list(TRANSFORM IMGUI_SOURCES PREPEND "${ImGui_SOURCE_DIR}/")
34+
35+
add_library(TracyImGui STATIC EXCLUDE_FROM_ALL ${IMGUI_SOURCES})
36+
@@ -198,7 +202,7 @@ CPMAddPackage(
37+
# json
38+
39+
CPMAddPackage(
40+
- NAME json
41+
+ NAME nlohmann_json
42+
GITHUB_REPOSITORY nlohmann/json
43+
GIT_TAG v3.12.0
44+
EXCLUDE_FROM_ALL TRUE
45+
@@ -233,7 +237,7 @@ if(NOT EMSCRIPTEN)
46+
# tidy
47+
48+
CPMAddPackage(
49+
- NAME tidy
50+
+ NAME unofficial-tidy-html5
51+
GITHUB_REPOSITORY htacg/tidy-html5
52+
GIT_TAG 5.8.0
53+
PATCHES
54+
@@ -293,4 +297,4 @@ if(NOT EMSCRIPTEN)
55+
target_include_directories(TracyLibcurl INTERFACE ${libcurl_SOURCE_DIR}/include)
56+
endif()
57+
58+
-endif()
59+
\ No newline at end of file
60+
+endif()
61+
diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt
62+
index d01731d3..9c07e971 100644
63+
--- a/profiler/CMakeLists.txt
64+
+++ b/profiler/CMakeLists.txt
65+
@@ -242,7 +242,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
66+
TracyImGui
67+
Threads::Threads
68+
nlohmann_json::nlohmann_json
69+
- md4c
70+
+ md4c::md4c
71+
)
72+
target_include_directories(${PROJECT_NAME} PRIVATE
73+
${tidy_SOURCE_DIR}/include
74+
@@ -254,8 +254,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE
75+
if(NOT EMSCRIPTEN)
76+
target_link_libraries(${PROJECT_NAME} PRIVATE
77+
TracyLibcurl
78+
- base64
79+
- tidy-static
80+
+ aklomp::base64
81+
+ unofficial::tidy-html5::tidy
82+
TracyPugixml
83+
usearch
84+
)

ports/tracy/portfile.cmake

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
vcpkg_download_distfile(PATCH_MISSING_CHRONO_INCLUDE
2-
URLS https://github.com/wolfpld/tracy/commit/50ff279aaddfd91dc3cdcfd5b7aec3978e63da25.diff?full_index=1
3-
SHA512 f9594297ea68612b68bd631497cd312ea01b34280a0f098de0d2b99810149345251a8985a6430337d0b55d2f181ceac10d563b64cfe48f78959f79ec7a6ea3b5
4-
FILENAME wolfpld-tracy-PR982.diff
5-
)
6-
71
vcpkg_from_github(
82
OUT_SOURCE_PATH SOURCE_PATH
93
REPO wolfpld/tracy
104
REF "v${VERSION}"
11-
SHA512 d3d99284e3c3172236c3f02b3bc52df111ef650fb8609e54fb3302ece28e55a06cd16713ed532f1e1aad66678ff09639dfc7e01a1e96880fb923b267a1b1b79b
5+
SHA512 ee1c6596e7313bdccb8e2e9354c1e2ec14e78a6252b4f53861256807a09bac19f9ff0d7ffb95e60f1d16f5cec22cb95989a216f5c637d32cee9a8c4257a567fa
126
HEAD_REF master
137
PATCHES
148
build-tools.patch
15-
"${PATCH_MISSING_CHRONO_INCLUDE}"
9+
disable-git.patch
10+
fix-vendor-versions.patch
11+
downgrade-capstone-5.patch
1612
)
1713

1814
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@@ -40,16 +36,25 @@ vcpkg_cmake_configure(
4036
OPTIONS
4137
-DDOWNLOAD_CAPSTONE=OFF
4238
-DLEGACY=ON
39+
-DCPM_USE_LOCAL_PACKAGES=ON
40+
-DCPM_LOCAL_PACKAGES_ONLY=ON
41+
-DCPM_DONT_UPDATE_MODULE_PATH=ON
42+
-DFETCHCONTENT_FULLY_DISCONNECTED=ON
43+
-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS
4344
${FEATURE_OPTIONS}
4445
OPTIONS_RELEASE
4546
${TOOLS_OPTIONS}
4647
MAYBE_UNUSED_VARIABLES
4748
DOWNLOAD_CAPSTONE
4849
LEGACY
50+
CPM_DONT_UPDATE_MODULE_PATH
51+
CPM_LOCAL_PACKAGES_ONLY
52+
CPM_USE_LOCAL_PACKAGES
53+
FETCHCONTENT_TRY_FIND_PACKAGE_MODE
4954
)
5055
vcpkg_cmake_install()
5156
vcpkg_copy_pdbs()
52-
vcpkg_cmake_config_fixup(PACKAGE_NAME Tracy)
57+
vcpkg_cmake_config_fixup(PACKAGE_NAME Tracy CONFIG_PATH "lib/cmake/Tracy")
5358

5459
function(tracy_copy_tool tool_name tool_dir)
5560
vcpkg_copy_tools(

0 commit comments

Comments
 (0)