From d1cd950f0ba184134a302bbe3ee1cf9d2e26a1bf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 12 May 2022 13:37:39 +0100 Subject: Fix FTBFS on 32-bit architectures --- ...-and-mangohudctl-for-any-CPU-architecture.patch | 63 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 64 insertions(+) create mode 100644 debian/patches/Build-mangoapp-and-mangohudctl-for-any-CPU-architecture.patch diff --git a/debian/patches/Build-mangoapp-and-mangohudctl-for-any-CPU-architecture.patch b/debian/patches/Build-mangoapp-and-mangohudctl-for-any-CPU-architecture.patch new file mode 100644 index 0000000..a721850 --- /dev/null +++ b/debian/patches/Build-mangoapp-and-mangohudctl-for-any-CPU-architecture.patch @@ -0,0 +1,63 @@ +From: Simon McVittie +Date: Thu, 12 May 2022 13:37:22 +0100 +Subject: Build mangoapp and mangohudctl for any CPU architecture + +On 32-bit-only machines, building these for the 32-bit architecture +makes sense. + +Signed-off-by: Simon McVittie +--- + meson.build | 13 +++++++------ + src/meson.build | 4 ++-- + 2 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/meson.build b/meson.build +index 43d6528..83a4fd6 100644 +--- a/meson.build ++++ b/meson.build +@@ -237,16 +237,17 @@ imgui_options = [ + sizeof_ptr = cc.sizeof('void*') + if sizeof_ptr == 8 + pre_args += '-DMANGOHUD_ARCH="64bit"' +- if get_option('mangoapp') +- imgui_options += [ +- 'opengl=enabled', +- 'glfw=enabled', +- ] +- endif + elif sizeof_ptr == 4 + pre_args += '-DMANGOHUD_ARCH="32bit"' + endif + ++if get_option('mangoapp') ++ imgui_options += [ ++ 'opengl=enabled', ++ 'glfw=enabled', ++ ] ++endif ++ + dearimgui_sp = subproject('imgui', default_options: imgui_options) + dearimgui_dep = dearimgui_sp.get_variable('imgui_dep') + +diff --git a/src/meson.build b/src/meson.build +index 3249e84..71d7e38 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -215,7 +215,7 @@ if is_unixy + ) + endif + +-if get_option('mangoapp') and sizeof_ptr == 8 ++if get_option('mangoapp') + pre_args += '-DIMGUI_IMPL_OPENGL_LOADER_GLEW' + pre_args += '-DMANGOAPP' + mangoapp = executable( +@@ -253,7 +253,7 @@ if get_option('mangoapp') and sizeof_ptr == 8 + ) + endif + +-if get_option('mangohudctl') and sizeof_ptr == 8 ++if get_option('mangohudctl') + mangoapp = executable( + 'mangohudctl', + files('app/control.cpp'), diff --git a/debian/patches/series b/debian/patches/series index 83bc65d..85c92a0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001_fix-json-dep.patch 0002_fix-libmangoapp-path.patch +Build-mangoapp-and-mangohudctl-for-any-CPU-architecture.patch -- cgit v1.2.3