From ede6a541e1c6a861461c189513187a69e3e5ce91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= <daniel@ekloef.se>
Date: Sat, 17 Dec 2022 18:15:14 +0100
Subject: [PATCH] =?UTF-8?q?modules:=20meson:=20add=20missing=20=E2=80=98m?=
 =?UTF-8?q?=E2=80=99=20(math)=20dependency?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The following modules used functions from the ‘m’ (math)
library (e.g. round()), but didn’t explicitly link against it. This
caused build failures when no other plugin that _did_ link against ‘m’
was enabled.

* cpu
* mem
* pulse
* pipewire
* foreign-toplevel

Closes #239
---
 
diff --git a/modules/meson.build b/modules/meson.build
index 49aba6d..f8d1e80 100644
--- a/modules/meson.build
+++ b/modules/meson.build
@@ -70,7 +70,7 @@ if plugin_clock_enabled
 endif
 
 if plugin_cpu_enabled
-  mod_data += {'cpu': [[], [dynlist]]}
+  mod_data += {'cpu': [[], [m, dynlist]]}
 endif
 
 if plugin_disk_io_enabled
@@ -82,7 +82,7 @@ if plugin_dwl_enabled
 endif
 
 if plugin_mem_enabled
-  mod_data += {'mem': [[], []]}
+  mod_data += {'mem': [[], [m]]}
 endif
 
 if plugin_mpd_enabled
@@ -102,11 +102,11 @@ if plugin_network_enabled
 endif
 
 if plugin_pipewire_enabled
-  mod_data += {'pipewire': [[], [pipewire, dynlist, json_pipewire]]}
+  mod_data += {'pipewire': [[], [m, pipewire, dynlist, json_pipewire]]}
 endif
 
 if plugin_pulse_enabled
-  mod_data += {'pulse': [[], [pulse]]}
+  mod_data += {'pulse': [[], [m, pulse]]}
 endif
 
 if plugin_removables_enabled
@@ -170,7 +170,7 @@ if plugin_foreign_toplevel_enabled
       command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
   endforeach
 
-  mod_data += {'foreign-toplevel': [[wl_proto_src + wl_proto_headers + ftop_proto_headers + ftop_proto_src], [dynlist, wayland_client]]}
+  mod_data += {'foreign-toplevel': [[wl_proto_src + wl_proto_headers + ftop_proto_headers + ftop_proto_src], [m, dynlist, wayland_client]]}
 endif
 
 foreach mod, data : mod_data
