From e3bc85d7bfde1452e1ed103d2367fe76769fc366 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Sun, 4 Nov 2018 11:54:40 +0100
Subject: [PATCH] meson.build: require Meson 0.47.2

Meson 0.47.1 suffers from a bug which breaks linking the MPD
executable because the `-lpthread` flag is not propagated from our
`thread.a`.

See https://github.com/mesonbuild/meson/pull/3895

Closes #403
---
 NEWS         | 1 +
 doc/user.rst | 2 +-
 meson.build  | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index b6161eb57..cb584b220 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ ver 0.21.1 (not yet released)
 * fix build failure on Linux-PowerPC
 * fix build failure on FreeBSD
 * eliminate DLL dependencies on Windows
+* require Meson 0.47.2 because a Meson 0.47.1 bug breaks our build
 
 ver 0.21 (2018/10/31)
 * configuration
diff --git a/doc/user.rst b/doc/user.rst
index 0f6188b60..e9bd3e960 100644
--- a/doc/user.rst
+++ b/doc/user.rst
@@ -54,7 +54,7 @@ Download the source tarball from the `MPD home page <https://musicpd.org>`_ and
 In any case, you need:
 
 * a C++14 compiler (e.g. gcc 6.0 or clang 3.9)
-* `Meson 0.47 <http://mesonbuild.com/>`__ and `Ninja
+* `Meson 0.47.2 <http://mesonbuild.com/>`__ and `Ninja
   <https://ninja-build.org/>`__
 * Boost 1.58
 * pkg-config 
diff --git a/meson.build b/meson.build
index dc4142b8f..5d15133d5 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project(
   'mpd',
   ['c', 'cpp'],
   version: '0.21.1',
-  meson_version: '>= 0.47',
+  meson_version: '>= 0.47.2',
   default_options: [
     'c_std=c99',
     'cpp_std=c++14'