diff --git a/srcpkgs/MangoHud/patches/0001-musl-fix.patch b/srcpkgs/MangoHud/patches/0001-musl-fix.patch deleted file mode 100644 index ac50f6c8cb8..00000000000 --- a/srcpkgs/MangoHud/patches/0001-musl-fix.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 4cf755ad73587fba904debe918ef281491cdd919 Mon Sep 17 00:00:00 2001 -From: John Zimmermann -Date: Tue, 18 Feb 2025 23:57:44 +0100 -Subject: [PATCH] musl fix - ---- - src/gl/shim.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 53 insertions(+), 2 deletions(-) - -diff --git a/src/gl/shim.c b/src/gl/shim.c -index 98b61e9..322af56 100644 ---- a/src/gl/shim.c -+++ b/src/gl/shim.c -@@ -77,6 +77,59 @@ static bool load_adjacent_opengl_lib(void) - - return true; - } -+#else -+static inline void -+free_indirect(char **p) -+{ -+ free(*p); -+} -+static bool load_adjacent_opengl_lib(void) -+{ -+ __attribute__((cleanup(free_indirect))) char *location = NULL; -+ __attribute__((cleanup(free_indirect))) char *lib = NULL; -+ Dl_info info = {}; -+ -+ // The first argument can be any symbol in this shared library, -+ // mangoHudLoaded is a convenient one -+ if (!dladdr(&mangoHudLoaded, &info)) -+ { -+ fprintf(stderr, "shim: Unable to find my own location: %s\n", dlerror()); -+ return false; -+ } -+ -+ if (info.dli_fname == NULL) -+ { -+ fprintf(stderr, "shim: Unable to find my own location: NULL dli_fname\n"); -+ return false; -+ } -+ -+ location = realpath(info.dli_fname, NULL); -+ char *slash = strrchr(location, '/'); -+ -+ if (slash == NULL) -+ { -+ fprintf(stderr, "shim: Unable to find my own location: no directory separator\n"); -+ return false; -+ } -+ -+ *slash = '\0'; -+ -+ if (asprintf(&lib, "%s/libMangoHud_opengl.so", location) < 0) -+ { -+ fprintf(stderr, "shim: asprintf: %s\n", strerror(errno)); -+ return false; -+ } -+ -+ handle = dlopen(lib, RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); -+ -+ if (handle == NULL) -+ { -+ fprintf(stderr, "shim: Failed to load from \"%s\": %s\n", lib, dlerror()); -+ return false; -+ } -+ -+ return true; -+} - #endif - - // Load MangoHud after EGL/GLX functions have been intercepted -@@ -110,13 +163,11 @@ static void loadMangoHud() { - } - } - --#ifdef __GLIBC__ - if (load_adjacent_opengl_lib()) - { - mangoHudLoaded = true; - return; - } --#endif - - if (!mangoHudLoaded) - { --- -2.48.1 - diff --git a/srcpkgs/MangoHud/patches/dea0b9c8e8767d49af81eb975c818bcf9d2e674a.patch b/srcpkgs/MangoHud/patches/dea0b9c8e8767d49af81eb975c818bcf9d2e674a.patch deleted file mode 100644 index 693c12c5a7b..00000000000 --- a/srcpkgs/MangoHud/patches/dea0b9c8e8767d49af81eb975c818bcf9d2e674a.patch +++ /dev/null @@ -1,26 +0,0 @@ -From dea0b9c8e8767d49af81eb975c818bcf9d2e674a Mon Sep 17 00:00:00 2001 -From: fossdd -Date: Wed, 12 Feb 2025 09:03:42 +0100 -Subject: [PATCH] shim: Define RTLD_DEEPBIND if not already - -RTLD_DEEPBIND is a glibc quirc and is not defined on other libc like -musl libc ---- - src/gl/shim.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/gl/shim.c b/src/gl/shim.c -index 5ac335ed4d..98b61e9d56 100644 ---- a/src/gl/shim.c -+++ b/src/gl/shim.c -@@ -9,6 +9,10 @@ - #include - #include - -+#ifndef RTLD_DEEPBIND -+#define RTLD_DEEPBIND 0 -+#endif -+ - static void* handle = NULL; - static bool mangoHudLoaded = false; - diff --git a/srcpkgs/MangoHud/template b/srcpkgs/MangoHud/template index 7c11c0533e7..252e89ffade 100644 --- a/srcpkgs/MangoHud/template +++ b/srcpkgs/MangoHud/template @@ -1,6 +1,6 @@ # Template file for 'MangoHud' pkgname=MangoHud -version=0.8.0 +version=0.8.1 revision=1 build_style=meson configure_args="-Dwith_xnvctrl=disabled @@ -13,7 +13,7 @@ maintainer="Orphaned " license="MIT" homepage="https://github.com/flightlessmango/MangoHud" distfiles="https://github.com/flightlessmango/MangoHud/releases/download/v${version}/MangoHud-v${version}-Source-DFSG.tar.xz" -checksum=9627587e05e0a570935d2177bd5f704ef6b72d66f7f773a48d8d86ec0e8aa673 +checksum=40c024170eb57e55f7c602521f1fb385a44238ff87294de063dad3c36e6daa55 python_version=3 lib32files="/usr/share/vulkan/implicit_layer.d/MangoHud.x86.json"