File mangohud-remove-glew-dep.patch of Package mangohud
From 9da183900bc6f7af0f3cb907d9370aec54a11a91 Mon Sep 17 00:00:00 2001
From: flightlessmango <flightlessmangoyt@gmail.com>
Date: Mon, 17 Mar 2025 15:11:32 +0100
Subject: [PATCH] mangoapp: remove glew dependency
---
.github/workflows/ubuntu.yml | 1 -
meson.build | 1 -
pkgbuild/PKGBUILD | 2 +-
src/app/main.cpp | 12 +-----------
src/meson.build | 2 --
5 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 75f1ca6ef4..1f9ca0b917 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -25,7 +25,6 @@ jobs:
mesa-common-dev \
libcmocka-dev \
libdbus-1-dev \
- libglew-dev \
libglfw3-dev \
libwayland-dev \
libxnvctrl-dev \
diff --git a/meson.build b/meson.build
index ebe37c8ab4..6496b95a1c 100644
--- a/meson.build
+++ b/meson.build
@@ -261,7 +261,6 @@ endif
if get_option('mangoapp')
glfw3_dep = dependency('glfw3')
- glew_dep = dependency('glew')
endif
json_dep = dependency('nlohmann_json')
diff --git a/pkgbuild/PKGBUILD b/pkgbuild/PKGBUILD
index 5e9c3ab505..a7a2ef49f2 100644
--- a/pkgbuild/PKGBUILD
+++ b/pkgbuild/PKGBUILD
@@ -6,7 +6,7 @@ pkgrel=1
pkgdesc="Vulkan and OpenGL overlay to display performance information"
arch=('x86_64')
makedepends=('dbus' 'gcc' 'meson' 'python-mako' 'libx11' 'lib32-libx11' 'git' 'pkgconf' 'vulkan-headers')
-depends=('glslang' 'libglvnd' 'lib32-libglvnd' 'glew' 'glfw-x11' 'python-numpy' 'python-matplotlib'
+depends=('glslang' 'libglvnd' 'lib32-libglvnd' 'glfw-x11' 'python-numpy' 'python-matplotlib'
'libxrandr' 'libxkbcommon' 'lib32-libxkbcommon')
replaces=('vulkan-mesa-layer-mango')
license=('MIT')
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 0e86a21021..5854283050 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -16,7 +16,6 @@
#include "notify.h"
#include "mangoapp.h"
#include "mangoapp_proto.h"
-#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "amdgpu.h"
#ifdef __linux__
@@ -308,16 +307,7 @@ int main(int, char**)
Display *x11_display = glfwGetX11Display();
Window x11_window = glfwGetX11Window(window);
Atom overlay_atom = XInternAtom (x11_display, GamescopeOverlayProperty, False);
- // Initialize OpenGL loader
-
- bool err = glewInit() != GLEW_OK;
-
- if (err)
- {
- fprintf(stderr, "Failed to initialize OpenGL loader!\n");
- return 1;
- }
-
+
// Setup Platform/Renderer backends
int control_client = -1;
parse_overlay_config(¶ms, getenv("MANGOHUD_CONFIG"), false);
diff --git a/src/meson.build b/src/meson.build
index 5713539bdf..53daf21363 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -261,7 +261,6 @@ if get_option('mangoapp')
if not get_option('with_x11').enabled()
error('mangoapp also needs \'with_x11\'')
endif
- pre_args += '-DIMGUI_IMPL_OPENGL_LOADER_GLEW'
pre_args += '-DMANGOAPP'
mangoapp = executable(
'mangoapp',
@@ -287,7 +286,6 @@ if get_option('mangoapp')
dep_wayland_client,
glfw3_dep,
json_dep,
- glew_dep,
implot_dep
],
include_directories : [inc_common],