From 59ab5cf20571f2de2e85256a1617db2ec9467983 Mon Sep 17 00:00:00 2001 From: jim wang <122244446+jimwang118@users.noreply.github.com> Date: Sun, 8 Sep 2024 18:36:00 +0000 Subject: [PATCH] [azure-kinect-sensor-sdk] Fix missing header files and adapt to new version of imgui (#40812) --- .../fix-build-imgui.patch | 44 +++++++++++++++++ .../azure-kinect-sensor-sdk/fix-header.patch | 48 +++++++++++++++++++ ports/azure-kinect-sensor-sdk/portfile.cmake | 1 + ports/azure-kinect-sensor-sdk/vcpkg.json | 2 +- versions/a-/azure-kinect-sensor-sdk.json | 5 ++ versions/baseline.json | 2 +- 6 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 ports/azure-kinect-sensor-sdk/fix-header.patch diff --git a/ports/azure-kinect-sensor-sdk/fix-build-imgui.patch b/ports/azure-kinect-sensor-sdk/fix-build-imgui.patch index eb94390e63..7d3b1c3d79 100644 --- a/ports/azure-kinect-sensor-sdk/fix-build-imgui.patch +++ b/ports/azure-kinect-sensor-sdk/fix-build-imgui.patch @@ -11,3 +11,47 @@ index 4289f71..407e912 100644 } ImGui::EndChild(); +diff --git a/tools/k4aviewer/k4asourceselectiondockcontrol.cpp b/tools/k4aviewer/k4asourceselectiondockcontrol.cpp +index 812608b..31e961d 100644 +--- a/tools/k4aviewer/k4asourceselectiondockcontrol.cpp ++++ b/tools/k4aviewer/k4asourceselectiondockcontrol.cpp +@@ -34,7 +34,7 @@ K4ASourceSelectionDockControl::K4ASourceSelectionDockControl() + + K4ADockControlStatus K4ASourceSelectionDockControl::Show() + { +- ImGui::SetNextTreeNodeOpen(true, ImGuiCond_FirstUseEver); ++ ImGui::SetNextItemOpen(true, ImGuiCond_FirstUseEver); + if (ImGui::TreeNode("Open Device")) + { + ImGuiExtensions::K4AComboBox("Device S/N", +diff --git a/tools/k4aviewer/k4adevicedockcontrol.cpp b/tools/k4aviewer/k4adevicedockcontrol.cpp +index 8fe5687..6d1e95a 100644 +--- a/tools/k4aviewer/k4adevicedockcontrol.cpp ++++ b/tools/k4aviewer/k4adevicedockcontrol.cpp +@@ -333,7 +333,7 @@ K4ADockControlStatus K4ADeviceDockControl::Show() + + if (m_firstRun || depthEnabledStateChanged) + { +- ImGui::SetNextTreeNodeOpen(m_config.EnableDepthCamera); ++ ImGui::SetNextItemOpen(m_config.EnableDepthCamera); + } + + ImGui::Indent(); +@@ -376,7 +376,7 @@ K4ADockControlStatus K4ADeviceDockControl::Show() + + if (m_firstRun || colorEnableStateChanged) + { +- ImGui::SetNextTreeNodeOpen(m_config.EnableColorCamera); ++ ImGui::SetNextItemOpen(m_config.EnableColorCamera); + } + + ImGui::Indent(); +@@ -710,7 +710,7 @@ K4ADockControlStatus K4ADeviceDockControl::Show() + + if (m_firstRun && (m_syncInConnected || m_syncOutConnected)) + { +- ImGui::SetNextTreeNodeOpen(true); ++ ImGui::SetNextItemOpen(true); + } + if (ImGui::TreeNode("External Sync")) + { diff --git a/ports/azure-kinect-sensor-sdk/fix-header.patch b/ports/azure-kinect-sensor-sdk/fix-header.patch new file mode 100644 index 0000000000..cd8fd9b1d6 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/fix-header.patch @@ -0,0 +1,48 @@ +diff --git a/tools/k4aviewer/k4aaudiochanneldatagraph.h b/tools/k4aviewer/k4aaudiochanneldatagraph.h +index 9aede89..56d2c77 100644 +--- a/tools/k4aviewer/k4aaudiochanneldatagraph.h ++++ b/tools/k4aviewer/k4aaudiochanneldatagraph.h +@@ -7,6 +7,7 @@ + // System headers + // + #include ++#include + + // Library headers + // +diff --git a/tools/k4aviewer/k4aaudiowindow.h b/tools/k4aviewer/k4aaudiowindow.h +index 87b63b3..fcfc86e 100644 +--- a/tools/k4aviewer/k4aaudiowindow.h ++++ b/tools/k4aviewer/k4aaudiowindow.h +@@ -8,6 +8,7 @@ + // + #include + #include ++#include + + // Library headers + // +diff --git a/tools/k4aviewer/k4amicrophonelistener.cpp b/tools/k4aviewer/k4amicrophonelistener.cpp +index db7b546..8baa05c 100644 +--- a/tools/k4aviewer/k4amicrophonelistener.cpp ++++ b/tools/k4aviewer/k4amicrophonelistener.cpp +@@ -8,6 +8,7 @@ + // System headers + // + #include ++#include + + // Library headers + // +diff --git a/tools/k4aviewer/perfcounter.h b/tools/k4aviewer/perfcounter.h +index b39e721..c3e28d2 100644 +--- a/tools/k4aviewer/perfcounter.h ++++ b/tools/k4aviewer/perfcounter.h +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + // Library headers + // diff --git a/ports/azure-kinect-sensor-sdk/portfile.cmake b/ports/azure-kinect-sensor-sdk/portfile.cmake index dbdcc27c4d..cedac7bdfe 100644 --- a/ports/azure-kinect-sensor-sdk/portfile.cmake +++ b/ports/azure-kinect-sensor-sdk/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( fix-linux.patch fix-calibration-c.patch fix-build-imgui.patch + fix-header.patch ) vcpkg_find_acquire_program(PYTHON3) diff --git a/ports/azure-kinect-sensor-sdk/vcpkg.json b/ports/azure-kinect-sensor-sdk/vcpkg.json index 5bff0fea5f..ced72efcfb 100644 --- a/ports/azure-kinect-sensor-sdk/vcpkg.json +++ b/ports/azure-kinect-sensor-sdk/vcpkg.json @@ -1,7 +1,7 @@ { "name": "azure-kinect-sensor-sdk", "version": "1.4.1", - "port-version": 6, + "port-version": 7, "description": "Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.", "homepage": "https://github.com/microsoft/Azure-Kinect-Sensor-SDK", "supports": "linux | windows", diff --git a/versions/a-/azure-kinect-sensor-sdk.json b/versions/a-/azure-kinect-sensor-sdk.json index 773adf3b19..7c42d33390 100644 --- a/versions/a-/azure-kinect-sensor-sdk.json +++ b/versions/a-/azure-kinect-sensor-sdk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a684e03aa0836ede2caba93683bee3fd3d1ed15f", + "version": "1.4.1", + "port-version": 7 + }, { "git-tree": "f5fbd0b39a805bc47da22f4bc462bec175518ae1", "version": "1.4.1", diff --git a/versions/baseline.json b/versions/baseline.json index 79900167bd..89fd556904 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -470,7 +470,7 @@ }, "azure-kinect-sensor-sdk": { "baseline": "1.4.1", - "port-version": 6 + "port-version": 7 }, "azure-macro-utils-c": { "baseline": "2022-01-21",