Skip to content

Commit

Permalink
addpkg(x11/mangohud): 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 committed Dec 14, 2024
1 parent 3dbda88 commit 43a68f3
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
19 changes: 19 additions & 0 deletions x11-packages/mangohud/build.sh
Original file line number Diff line number Diff line change
@@ -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"
}
11 changes: 11 additions & 0 deletions x11-packages/mangohud/meson.build.patch
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions x11-packages/mangohud/src-hud_elements.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- a/src/hud_elements.h
+++ b/src/hud_elements.h
@@ -1,4 +1,5 @@
#pragma once
+#include <map>
#include <vector>
#include <string>
#include <utility>
12 changes: 12 additions & 0 deletions x11-packages/mangohud/src-overlay.cpp.patch
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 43a68f3

Please sign in to comment.