From 43a68f336e1928d65345be6038129f4875183bca Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 14 Dec 2024 16:10:21 +0000 Subject: [PATCH] addpkg(x11/mangohud): 0.7.2 --- x11-packages/mangohud/build.sh | 19 +++++++++++++++++++ x11-packages/mangohud/meson.build.patch | 11 +++++++++++ .../mangohud/src-hud_elements.h.patch | 8 ++++++++ x11-packages/mangohud/src-overlay.cpp.patch | 12 ++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 x11-packages/mangohud/build.sh create mode 100644 x11-packages/mangohud/meson.build.patch create mode 100644 x11-packages/mangohud/src-hud_elements.h.patch create mode 100644 x11-packages/mangohud/src-overlay.cpp.patch diff --git a/x11-packages/mangohud/build.sh b/x11-packages/mangohud/build.sh new file mode 100644 index 00000000000000..012e2719218f1d --- /dev/null +++ b/x11-packages/mangohud/build.sh @@ -0,0 +1,19 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/flightlessmango/MangoHud/ +TERMUX_PKG_DESCRIPTION="A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more" +TERMUX_PKG_LICENSE="MIT" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="0.7.2" +TERMUX_PKG_SRCURL=https://github.com/flightlessmango/MangoHud/releases/download/v${TERMUX_PKG_VERSION}/MangoHud-v${TERMUX_PKG_VERSION}-Source.tar.xz +TERMUX_PKG_SHA256=114ad3ea87b1db7358816c7b8e7843aaee356ff048b9e15d6fff02d89414841b +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_DEPENDS="libwayland, libx11, libxkbcommon" +TERMUX_PKG_BUILD_DEPENDS="dbus, libandroid-wordexp, nlohmann-json" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Ddynamic_string_tokens=false +-Dwith_xnvctrl=disabled +" + +termux_step_pre_configure() { + # Workaround linker error wit version script + LDFLAGS+=" -Wl,--undefined-version" +} diff --git a/x11-packages/mangohud/meson.build.patch b/x11-packages/mangohud/meson.build.patch new file mode 100644 index 00000000000000..147a6725571449 --- /dev/null +++ b/x11-packages/mangohud/meson.build.patch @@ -0,0 +1,11 @@ +--- a/meson.build ++++ b/meson.build +@@ -36,7 +36,7 @@ + endif + # TODO: this is very incomplete + is_unixy = false +-if ['linux', 'cygwin', 'gnu'].contains(host_machine.system()) ++if ['android', 'linux', 'cygwin', 'gnu'].contains(host_machine.system()) + pre_args += '-D_GNU_SOURCE' + pre_args += '-DHAVE_PTHREAD' + is_unixy = true diff --git a/x11-packages/mangohud/src-hud_elements.h.patch b/x11-packages/mangohud/src-hud_elements.h.patch new file mode 100644 index 00000000000000..af7493ee9b600c --- /dev/null +++ b/x11-packages/mangohud/src-hud_elements.h.patch @@ -0,0 +1,8 @@ +--- a/src/hud_elements.h ++++ b/src/hud_elements.h +@@ -1,4 +1,5 @@ + #pragma once ++#include + #include + #include + #include diff --git a/x11-packages/mangohud/src-overlay.cpp.patch b/x11-packages/mangohud/src-overlay.cpp.patch new file mode 100644 index 00000000000000..8f78bc7e6c3ed9 --- /dev/null +++ b/x11-packages/mangohud/src-overlay.cpp.patch @@ -0,0 +1,12 @@ +Workaround [error] [file_utils.cpp:50] Error opening directory '/sys/class/hwmon/': Permission denied + +--- a/src/overlay.cpp ++++ b/src/overlay.cpp +@@ -114,7 +114,6 @@ + + void update_hw_info(const struct overlay_params& params, uint32_t vendorID) + { +- update_fan(); + if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_stats] || logger->is_active()) { + cpuStats.UpdateCPUData(); +