summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2022-05-12 13:37:39 +0100
committerSimon McVittie <smcv@debian.org>2022-05-12 13:37:39 +0100
commitd1cd950f0ba184134a302bbe3ee1cf9d2e26a1bf (patch)
treeca7186c6b091aad948e2110dd48348676ce5c800
parentb98cd34f2929cea29f6f24ee4d0673e0e76f01f4 (diff)
Fix FTBFS on 32-bit architectures
-rw-r--r--debian/patches/Build-mangoapp-and-mangohudctl-for-any-CPU-architecture.patch63
-rw-r--r--debian/patches/series1
2 files changed, 64 insertions, 0 deletions
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 <smcv@debian.org>
+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 <smcv@debian.org>
+---
+ 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