diff --git a/x11-packages/mangohud/build.sh b/x11-packages/mangohud/build.sh new file mode 100644 index 000000000000000..012e2719218f1d3 --- /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 000000000000000..147a67255714492 --- /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 000000000000000..af7493ee9b600cd --- /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