git: bb7d3a48145b - main - benchmarks/mangohud: unbreak the port and update to version 0.6.9
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Oct 2026 16:01:55 UTC
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=bb7d3a48145b12346753e9bbde1d8d8ed4366963
commit bb7d3a48145b12346753e9bbde1d8d8ed4366963
Author: Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2026-10-20 16:01:06 +0000
Commit: Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2026-10-20 16:01:06 +0000
benchmarks/mangohud: unbreak the port and update to version 0.6.9
Using system Vulkan is no longer possible -- newer versions of the
XML and headers don't play nice, particularly, the VK_LAYER_EXPORT
macro was removed and the XML was reworked quite significantly, so
the generator no longer works.
Reported by: portscout
---
MOVED | 1 -
benchmarks/Makefile | 1 +
benchmarks/mangohud/Makefile | 55 +++++++++++++
benchmarks/mangohud/distinfo | 11 +++
benchmarks/mangohud/files/patch-data_meson.build | 11 +++
benchmarks/mangohud/files/patch-include_elfhacks.h | 19 +++++
benchmarks/mangohud/files/patch-meson.build | 20 +++++
benchmarks/mangohud/files/patch-src_cpu.cpp | 72 +++++++++++++++++
benchmarks/mangohud/files/patch-src_elfhacks.cpp | 29 +++++++
.../mangohud/files/patch-src_file__utils.cpp | 94 ++++++++++++++++++++++
benchmarks/mangohud/files/patch-src_file__utils.h | 10 +++
benchmarks/mangohud/files/patch-src_meson.build | 28 +++++++
benchmarks/mangohud/files/patch-src_overlay.cpp | 31 +++++++
.../mangohud/files/patch-src_real__dlsym.cpp | 11 +++
benchmarks/mangohud/pkg-descr | 2 +
15 files changed, 394 insertions(+), 1 deletion(-)
diff --git a/MOVED b/MOVED
index 6a66f26ec0aa..3aa8906eae56 100644
--- a/MOVED
+++ b/MOVED
@@ -5742,7 +5742,6 @@ devel/compiler-rt||2026-10-15|Now ships with the base system
textproc/py-pypa-docs-theme||2026-10-15|Has expired: Upstream archived the repo on Mar 16, 2024
www/py-wikitools||2026-10-18|Has expired: Not compatible with Python 3
japanese/fcitx-mozc|japanese/fcitx5-mozc|2026-10-18|Deprecated: Use fcitx5 instead
-benchmarks/mangohud||2026-10-19|Broken for years in tree
cad/yosys-systemverilog||2026-10-19|Broken for years in tree
deskutils/gnome-todo||2026-10-19|Broken for several months in tree
devel/rubygem-mmap2||2026-10-19|Broken for over a year in tree
diff --git a/benchmarks/Makefile b/benchmarks/Makefile
index e923c3a579dd..7448d44704d1 100644
--- a/benchmarks/Makefile
+++ b/benchmarks/Makefile
@@ -50,6 +50,7 @@
SUBDIR += linux-vdbench
SUBDIR += lmbench
SUBDIR += lzbench
+ SUBDIR += mangohud
SUBDIR += mdtest
SUBDIR += mst-bench
SUBDIR += nbench
diff --git a/benchmarks/mangohud/Makefile b/benchmarks/mangohud/Makefile
new file mode 100644
index 000000000000..ba726267a0b2
--- /dev/null
+++ b/benchmarks/mangohud/Makefile
@@ -0,0 +1,55 @@
+PORTNAME= mangohud
+PORTVERSION= 0.6.9
+DISTVERSIONPREFIX= v
+CATEGORIES= benchmarks graphics
+MASTER_SITES= https://wrapdb.mesonbuild.com/v1/projects/imgui/1.81/1/get_zip?dummy=/:igw \
+ https://wrapdb.mesonbuild.com/v1/projects/vulkan-headers/1.2.158/2/get_zip?dummy=/:vhw
+DISTFILES= imgui-1.81-1-wrap.zip:igw vulkan-headers-1.2.158-2-wrap.zip:vhw
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Vulkan/OpenGL overlay for CPU/GPU monitoring
+WWW= https://github.com/flightlessmango/MangoHud
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${LOCALBASE}/include/nlohmann/json.hpp:devel/nlohmann-json \
+ glslangValidator:graphics/glslang \
+ ${PYTHON_PKGNAMEPREFIX}mako>=0:textproc/py-mako@${PY_FLAVOR}
+LIB_DEPENDS= libinotify.so:devel/libinotify \
+ libspdlog.so:devel/spdlog
+
+USES= compiler:c++14-lang meson pkgconfig python:build xorg
+USE_GITHUB= yes
+GH_ACCOUNT= flightlessmango ocornut:ig KhronosGroup:vh
+GH_PROJECT= MangoHud imgui:ig Vulkan-Headers:vh
+GH_TAGNAME= v1.81:ig v1.2.158:vh
+GH_SUBDIR= subprojects/imgui-1.81:ig
+GH_SUBDIR+= subprojects/Vulkan-Headers-1.2.158:vh
+USE_XORG= x11
+MESON_ARGS= -Duse_system_spdlog=enabled -Dwith_xnvctrl=disabled -Dtests=disabled
+
+CPPFLAGS+= -DPROCDIR=\\\"${LINUXBASE}/proc\\\"
+
+PLIST_FILES= bin/mangohud lib/mangohud/libMangoHud.so \
+ lib/mangohud/libMangoHud_dlsym.so share/man/man1/mangohud.1.gz \
+ share/icons/hicolor/scalable/apps/io.github.flightlessmango.mangohud.svg \
+ share/metainfo/io.github.flightlessmango.mangohud.metainfo.xml \
+ share/vulkan/implicit_layer.d/MangoHud.${ARCH:S/amd64/x86_64/:S/i386/x86/}.json
+PORTEXAMPLES= MangoHud.conf.example
+
+OPTIONS_DEFINE= DBUS EXAMPLES
+OPTIONS_DEFAULT= DBUS
+
+DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus
+DBUS_MESON_OFF= -Dwith_dbus=disabled
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,cygwin,${OPSYS:tl}, ; \
+ /^prog_python = /s,3,${PYTHON_VER},' ${WRKSRC}/meson.build
+ @${REINPLACE_CMD} -e 's,/usr/share/doc,${PREFIX}/share/examples,' \
+ ${WRKSRC}/data/mangohud.1
+ @${REINPLACE_CMD} -e 's,def __linux__,ndef _WIN32,' \
+ ${WRKSRC}/src/overlay_params.cpp
+
+.include <bsd.port.mk>
diff --git a/benchmarks/mangohud/distinfo b/benchmarks/mangohud/distinfo
new file mode 100644
index 000000000000..ed4e6cdd2b34
--- /dev/null
+++ b/benchmarks/mangohud/distinfo
@@ -0,0 +1,11 @@
+TIMESTAMP = 1681407623
+SHA256 (imgui-1.81-1-wrap.zip) = 6d00b442690b6a5c5d8f898311daafbce16d370cf64f53294c3b8c5c661e435f
+SIZE (imgui-1.81-1-wrap.zip) = 1850
+SHA256 (vulkan-headers-1.2.158-2-wrap.zip) = 860358cf5e73f458cd1e88f8c38116d123ab421d5ce2e4129ec38eaedd820e17
+SIZE (vulkan-headers-1.2.158-2-wrap.zip) = 1107
+SHA256 (flightlessmango-MangoHud-v0.6.9_GH0.tar.gz) = a2b700ea8e2f4abdceafddfbde4609ad32609bc232e17371b1dfcb43bbe2b8bf
+SIZE (flightlessmango-MangoHud-v0.6.9_GH0.tar.gz) = 14851891
+SHA256 (ocornut-imgui-v1.81_GH0.tar.gz) = f7c619e03a06c0f25e8f47262dbc32d61fd033d2c91796812bf0f8c94fca78fb
+SIZE (ocornut-imgui-v1.81_GH0.tar.gz) = 1413443
+SHA256 (KhronosGroup-Vulkan-Headers-v1.2.158_GH0.tar.gz) = 53361271cfe274df8782e1e47bdc9e61b7af432ba30acbfe31723f9df2c257f3
+SIZE (KhronosGroup-Vulkan-Headers-v1.2.158_GH0.tar.gz) = 831647
diff --git a/benchmarks/mangohud/files/patch-data_meson.build b/benchmarks/mangohud/files/patch-data_meson.build
new file mode 100644
index 000000000000..b89908e1ec29
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-data_meson.build
@@ -0,0 +1,11 @@
+--- data/meson.build.orig 2023-04-13 17:40:23 UTC
++++ data/meson.build
+@@ -43,7 +43,7 @@ endif
+
+ install_data(
+ files('MangoHud.conf'),
+- install_dir : join_paths(get_option('datadir'), 'doc', 'mangohud'),
++ install_dir : join_paths(get_option('datadir'), 'examples', 'mangohud'),
+ rename : ['MangoHud.conf.example'],
+ install_tag : 'doc',
+ )
diff --git a/benchmarks/mangohud/files/patch-include_elfhacks.h b/benchmarks/mangohud/files/patch-include_elfhacks.h
new file mode 100644
index 000000000000..f9b8c85afcfb
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-include_elfhacks.h
@@ -0,0 +1,19 @@
+--- include/elfhacks.h.orig 2020-08-16 16:54:20 UTC
++++ include/elfhacks.h
+@@ -58,6 +58,16 @@ extern "C" {
+ # endif
+ #endif
+
++#ifndef __ELF_NATIVE_CLASS
++#define __ELF_NATIVE_CLASS __WORDSIZE
++#endif
++
++/* We use this macro to refer to ELF types independent of the native wordsize.
++ `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
++#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
++#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
++#define _ElfW_1(e,w,t) e##w##t
++
+ /**
+ * \defgroup elfhacks elfhacks
+ * Elfhacks is a collection of functions that aim for retvieving
diff --git a/benchmarks/mangohud/files/patch-meson.build b/benchmarks/mangohud/files/patch-meson.build
new file mode 100644
index 000000000000..29047bfba768
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-meson.build
@@ -0,0 +1,20 @@
+--- meson.build.orig 2023-04-13 17:40:23 UTC
++++ meson.build
+@@ -113,6 +113,7 @@ inc_common = [
+ include_directories('include'),
+ ]
+
++dep_inotify = dependency('libinotify')
+ dep_pthread = dependency('threads')
+
+ add_project_arguments(
+@@ -215,8 +216,7 @@ endif
+ dearimgui_sp = subproject('imgui', default_options: imgui_options)
+ dearimgui_dep = dearimgui_sp.get_variable('imgui_dep')
+
+-spdlog_dep = cpp.find_library('spdlog', required: get_option('use_system_spdlog'))
+-if not spdlog_dep.found()
++if get_option('use_system_spdlog').disabled()
+ spdlog_sp = subproject('spdlog', default_options: [
+ 'default_library=static',
+ 'compile_library=true',
diff --git a/benchmarks/mangohud/files/patch-src_cpu.cpp b/benchmarks/mangohud/files/patch-src_cpu.cpp
new file mode 100644
index 000000000000..45bfa5e47df2
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-src_cpu.cpp
@@ -0,0 +1,72 @@
+--- src/cpu.cpp.orig 2023-04-13 17:40:23 UTC
++++ src/cpu.cpp
+@@ -225,6 +225,7 @@ bool CPUStats::UpdateCPUData()
+
+ bool CPUStats::UpdateCoreMhz() {
+ m_coreMhz.clear();
++#if defined(__linux__)
+ FILE *fp;
+ for (auto& cpu : m_cpuData)
+ {
+@@ -237,6 +238,13 @@ bool CPUStats::UpdateCoreMhz() {
+ fclose(fp);
+ }
+ }
++#elif defined(__FreeBSD__)
++ char sysctl_name[32];
++ for (int i = 0; i < m_cpuData.size(); i++) {
++ snprintf(sysctl_name, sizeof(sysctl_name), "dev.cpu.%d.freq", i);
++ m_cpuData[i].mhz = read_sysctl<int>(sysctl_name);
++ }
++#endif
+
+ m_cpuDataTotal.cpu_mhz = 0;
+ for (auto data : m_cpuData)
+@@ -259,6 +267,7 @@ bool CPUStats::ReadcpuTempFile(int& temp) {
+ }
+
+ bool CPUStats::UpdateCpuTemp() {
++#if defined(__linux__)
+ if (cpu_type == "APU"){
+ m_cpuDataTotal.temp = gpu_info.apu_cpu_temp;
+ return true;
+@@ -269,6 +278,23 @@ bool CPUStats::UpdateCpuTemp() {
+
+ return ret;
+ }
++#elif defined(__FreeBSD__)
++ char sysctl_name[32];
++ int dK, i, temp;
++ for (temp = i = 0; i < m_cpuData.size(); i++) {
++ snprintf(sysctl_name, sizeof(sysctl_name), "dev.cpu.%d.temperature", i);
++ dK = read_sysctl<int>(sysctl_name);
++ if (dK < 0) {
++ // If we could not read some core's temperature, store
++ // the last read (bogus) value and return false early.
++ m_cpuDataTotal.temp = dK;
++ return false;
++ }
++ temp += dK - 2731;
++ }
++ m_cpuDataTotal.temp = temp / (10 * m_cpuData.size());
++ return m_cpuDataTotal.temp > 0;
++#endif
+ }
+
+ static bool get_cpu_power_k10temp(CPUPowerData* cpuPowerData, float& power) {
+@@ -426,6 +452,7 @@ static bool find_fallback_input(const std::string& pat
+ return false;
+ }
+
++#ifdef __linux__
+ bool CPUStats::GetCpuFile() {
+ if (m_cpuTempFile)
+ return true;
+@@ -466,6 +493,7 @@ bool CPUStats::GetCpuFile() {
+ }
+ return true;
+ }
++#endif
+
+ static CPUPowerData_k10temp* init_cpu_power_data_k10temp(const std::string path) {
+ auto powerData = std::make_unique<CPUPowerData_k10temp>();
diff --git a/benchmarks/mangohud/files/patch-src_elfhacks.cpp b/benchmarks/mangohud/files/patch-src_elfhacks.cpp
new file mode 100644
index 000000000000..09e496ae30d5
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-src_elfhacks.cpp
@@ -0,0 +1,29 @@
+--- src/elfhacks.cpp.orig 2020-08-16 16:54:20 UTC
++++ src/elfhacks.cpp
+@@ -195,22 +195,22 @@ int eh_init_obj(eh_obj_t *obj)
+ if (obj->strtab)
+ return ENOTSUP;
+
+- obj->strtab = (const char *) obj->dynamic[p].d_un.d_ptr;
++ obj->strtab = (const char *) (obj->dynamic[p].d_un.d_ptr + obj->addr);
+ } else if (obj->dynamic[p].d_tag == DT_HASH) {
+ if (obj->hash)
+ return ENOTSUP;
+
+- obj->hash = (ElfW(Word) *) obj->dynamic[p].d_un.d_ptr;
++ obj->hash = (ElfW(Word) *) (obj->dynamic[p].d_un.d_ptr + obj->addr);
+ } else if (obj->dynamic[p].d_tag == DT_GNU_HASH) {
+ if (obj->gnu_hash)
+ return ENOTSUP;
+
+- obj->gnu_hash = (Elf32_Word *) obj->dynamic[p].d_un.d_ptr;
++ obj->gnu_hash = (Elf32_Word *) (obj->dynamic[p].d_un.d_ptr + obj->addr);
+ } else if (obj->dynamic[p].d_tag == DT_SYMTAB) {
+ if (obj->symtab)
+ return ENOTSUP;
+
+- obj->symtab = (ElfW(Sym) *) obj->dynamic[p].d_un.d_ptr;
++ obj->symtab = (ElfW(Sym) *) (obj->dynamic[p].d_un.d_ptr + obj->addr);
+ }
+ p++;
+ }
diff --git a/benchmarks/mangohud/files/patch-src_file__utils.cpp b/benchmarks/mangohud/files/patch-src_file__utils.cpp
new file mode 100644
index 000000000000..1136d335647c
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-src_file__utils.cpp
@@ -0,0 +1,94 @@
+--- src/file_utils.cpp.orig 2023-04-13 17:40:23 UTC
++++ src/file_utils.cpp
+@@ -2,6 +2,7 @@
+ #include "string_utils.h"
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysctl.h>
+ #include <unistd.h>
+ #include <dirent.h>
+ #include <limits.h>
+@@ -35,7 +36,6 @@ std::string get_basename(const std::string&& path)
+ return path;
+ }
+
+-#ifdef __linux__
+ std::vector<std::string> ls(const char* root, const char* prefix, LS_FLAGS flags)
+ {
+ std::vector<std::string> list;
+@@ -109,9 +109,36 @@ std::string read_symlink(const std::string&& link)
+ return read_symlink(link.c_str());
+ }
+
++template <>
++int read_sysctl(const char* name)
++{
++ int value;
++ size_t len = sizeof(value);
++
++ if (sysctlbyname(name, &value, &len, NULL, 0) == 0)
++ return value;
++ else return -1;
++}
++
++template <>
++std::string read_sysctl(const char* name)
++{
++ size_t len;
++
++ // How large buffer do we need?
++ if (sysctlbyname(name, NULL, &len, NULL, 0) != 0)
++ return "";
++
++ char value[len];
++ // Now read the actual value into it.
++ if (sysctlbyname(name, value, &len, NULL, 0) == 0)
++ return value;
++ else return "";
++}
++
+ std::string get_exe_path()
+ {
+- return read_symlink("/proc/self/exe");
++ return read_symlink(PROCDIR "/self/exe");
+ }
+
+ std::string get_wine_exe_name(bool keep_ext)
+@@ -121,14 +148,14 @@ std::string get_wine_exe_name(bool keep_ext)
+ return std::string();
+ }
+
+- std::string line = read_line("/proc/self/comm"); // max 16 characters though
++ std::string line = read_line(PROCDIR "/self/comm"); // max 16 characters though
+ if (ends_with(line, ".exe", true))
+ {
+ auto dot = keep_ext ? std::string::npos : line.find_last_of('.');
+ return line.substr(0, dot);
+ }
+
+- std::ifstream cmdline("/proc/self/cmdline");
++ std::ifstream cmdline(PROCDIR "/self/cmdline");
+ // Iterate over arguments (separated by NUL byte).
+ while (std::getline(cmdline, line, '\0')) {
+ auto n = std::string::npos;
+@@ -185,16 +212,13 @@ std::string get_config_dir()
+ }
+
+ bool lib_loaded(const std::string& lib) {
+- fs::path path("/proc/self/map_files/");
+- for (auto& p : fs::directory_iterator(path)) {
+- auto file = p.path().string();
+- auto sym = read_symlink(file.c_str());
+- if (sym.find(lib) != std::string::npos) {
++ std::ifstream proc_maps(PROCDIR "/self/maps");
++ std::string line;
++ while (std::getline(proc_maps, line)) {
++ if (line.find(lib) != std::string::npos) {
+ return true;
+ }
+ }
+ return false;
+
+ }
+-
+-#endif // __linux__
diff --git a/benchmarks/mangohud/files/patch-src_file__utils.h b/benchmarks/mangohud/files/patch-src_file__utils.h
new file mode 100644
index 000000000000..90ac01c788d5
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-src_file__utils.h
@@ -0,0 +1,10 @@
+--- src/file_utils.h.orig 2023-04-13 17:40:23 UTC
++++ src/file_utils.h
+@@ -17,6 +17,7 @@ bool file_exists(const std::string& path);
+ bool dir_exists(const std::string& path);
+ std::string read_symlink(const char * link);
+ std::string read_symlink(const std::string&& link);
++template <typename T> T read_sysctl(const char*);
+ std::string get_basename(const std::string&& path); //prefix so it doesn't conflict libgen
+ std::string get_exe_path();
+ std::string get_wine_exe_name(bool keep_ext = false);
diff --git a/benchmarks/mangohud/files/patch-src_meson.build b/benchmarks/mangohud/files/patch-src_meson.build
new file mode 100644
index 000000000000..ec399b2e9b34
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-src_meson.build
@@ -0,0 +1,28 @@
+--- src/meson.build.orig 2023-04-13 17:40:23 UTC
++++ src/meson.build
+@@ -3,7 +3,7 @@ glslang = find_program('glslangValidator')
+ # Needs prefix for configure_file()
+ if get_option('append_libdir_mangohud')
+ libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'), 'mangohud')
+- ld_libdir_mangohud = get_option('prefix') + '/\$LIB/mangohud/'
++ ld_libdir_mangohud = get_option('prefix') + '/lib/mangohud/'
+ else
+ libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'))
+ ld_libdir_mangohud = get_option('prefix') + '/\$LIB/'
+@@ -143,6 +143,7 @@ endif
+ link_args = cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro', '-Wl,--exclude-libs,ALL', '-lGL'])
+ # meson fails to check version-script so just force add
+ link_args += '-Wl,--version-script,@0@'.format(join_paths(meson.current_source_dir(), 'mangohud.version'))
++link_args += '-Wl,--undefined-version' # required for LLVM 17+
+
+ mangohud_static_lib = static_library(
+ 'MangoHud',
+@@ -168,7 +169,7 @@ mangohud_static_lib = static_library(
+ spdlog_dep,
+ dbus_dep,
+ dep_dl,
+- dep_rt,
++ dep_inotify,
+ dep_pthread,
+ dep_vulkan,
+ windows_deps,
diff --git a/benchmarks/mangohud/files/patch-src_overlay.cpp b/benchmarks/mangohud/files/patch-src_overlay.cpp
new file mode 100644
index 000000000000..f56fbfa12996
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-src_overlay.cpp
@@ -0,0 +1,31 @@
+--- src/overlay.cpp.orig 2023-04-13 17:40:23 UTC
++++ src/overlay.cpp
+@@ -106,11 +106,11 @@ void update_hw_info(const struct overlay_params& param
+ if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_stats] || logger->is_active()) {
+ cpuStats.UpdateCPUData();
+
+-#ifdef __linux__
+ if (params.enabled[OVERLAY_PARAM_ENABLED_core_load] || params.enabled[OVERLAY_PARAM_ENABLED_cpu_mhz])
+ cpuStats.UpdateCoreMhz();
+ if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_temp] || logger->is_active() || params.enabled[OVERLAY_PARAM_ENABLED_graphs])
+ cpuStats.UpdateCpuTemp();
++#ifdef __linux__
+ if (params.enabled[OVERLAY_PARAM_ENABLED_cpu_power])
+ cpuStats.UpdateCpuPower();
+ #endif
+@@ -928,6 +928,7 @@ std::string get_device_name(uint32_t vendorID, uint32_
+ }
+
+ void update_fan(){
++#ifdef __linux__
+ // This just handles steam deck fan for now
+ static bool init;
+ string hwmon_path;
+@@ -948,6 +949,7 @@ void update_fan(){
+ fan_speed = stoi(read_line(hwmon_path));
+ else
+ fan_speed = -1;
++#endif
+ }
+
+ void next_hud_position(struct overlay_params& params){
diff --git a/benchmarks/mangohud/files/patch-src_real__dlsym.cpp b/benchmarks/mangohud/files/patch-src_real__dlsym.cpp
new file mode 100644
index 000000000000..1b0668169732
--- /dev/null
+++ b/benchmarks/mangohud/files/patch-src_real__dlsym.cpp
@@ -0,0 +1,11 @@
+--- src/real_dlsym.cpp.orig 2023-04-13 17:40:23 UTC
++++ src/real_dlsym.cpp
+@@ -23,6 +23,8 @@ static void get_real_functions()
+ const char* libs[] = {
+ #if defined(__GLIBC__)
+ "*libdl.so*",
++#elif defined(__FreeBSD__)
++ "*ld-elf.so*",
+ #endif
+ "*libc.so*",
+ "*libc.*.so*",
diff --git a/benchmarks/mangohud/pkg-descr b/benchmarks/mangohud/pkg-descr
new file mode 100644
index 000000000000..526a7b1dc251
--- /dev/null
+++ b/benchmarks/mangohud/pkg-descr
@@ -0,0 +1,2 @@
+MangoHud is a Vulkan/OpenGL overlay for monitoring FPS, temperatures,
+CPU/GPU load, and more.