From 85e00b2aab89381feda50f683d79287ec9f13e86 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 26 Nov 2020 15:31:40 -0800 Subject: [PATCH 1/2] fix: build fails with meson < 0.53.0 meson.build:12:0: ERROR: Module "fs" does not exist Fixes #909 --- meson.build | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 7f4ffaca..1e7e22c2 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,7 @@ project( 'waybar', 'cpp', 'c', version: '0.9.4', license: 'MIT', + meson_version: '>= 0.49.0', default_options : [ 'cpp_std=c++17', 'buildtype=release', @@ -9,8 +10,6 @@ project( ], ) -fs = import('fs') - compiler = meson.get_compiler('cpp') cpp_args = [] @@ -318,9 +317,9 @@ if scdoc.found() foreach file : man_files path = '@0@'.format(file) - basename = fs.name(path) + basename = path.split('/')[-1] - topic = basename.split('.')[-3].split('/')[-1] + topic = basename.split('.')[-3] section = basename.split('.')[-2] output = '@0@.@1@'.format(topic, section) From 2695985da04675a18f21d2ba4e09bb2c232b1eee Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 26 Nov 2020 15:38:41 -0800 Subject: [PATCH 2/2] fix: compilation error with gcc 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../src/modules/network.cpp:22:6: error: ‘optional’ in namespace ‘std’ does not name a template type 22 | std::optional read_netstat(std::string_view category, std::string_view key) { | ^~~~~~~~ ../src/modules/network.cpp:7:1: note: ‘std::optional’ is defined in header ‘’; did you forget to ‘#include ’? 6 | #include "util/format.hpp" +++ |+#include 7 | #ifdef WANT_RFKILL --- src/modules/network.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index 74ae9130..7d9da8b5 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "util/format.hpp" #ifdef WANT_RFKILL #include "util/rfkill.hpp"