meson: update boost subproject

Update the boost subproject version to match openbmc-build-scripts.  The
meson wrapdb doesn't provide a boost wrap, so this wrap, and the
associated subproject build logic are derivatives of that found in
bmcweb.  Tested by building and running the unit tests using the boost
subproject.

Change-Id: Ida616f70eabf2be5a0032f8fef22947b23e3a60e
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
diff --git a/meson.build b/meson.build
index e7930ee..838d8aa 100644
--- a/meson.build
+++ b/meson.build
@@ -25,15 +25,23 @@
 sdbusplus = dependency('sdbusplus')
 boost = dependency(
     'boost',
-    version: '>=1.79.0',
+    version: '>=1.87.0',
     required: false,
     include_type: 'system',
 )
 if not boost.found()
-    subproject('boost', required: false)
-    boost_inc = include_directories('subprojects/boost_1_79_0/', is_system: true)
-    boost = declare_dependency(include_directories: boost_inc)
-    boost = boost.as_system('system')
+    cmake = import('cmake')
+    opt = cmake.subproject_options()
+    boost_libs = ['asio', 'callable_traits']
+    opt.add_cmake_defines({'BOOST_INCLUDE_LIBRARIES': ';'.join(boost_libs)})
+
+    boost_deps = []
+    boost_proj = cmake.subproject('boost', required: true, options: opt)
+    foreach boost_lib : boost_libs
+        boost_lib_instance = boost_proj.dependency('boost_' + boost_lib).as_system()
+        boost_deps += [boost_lib_instance]
+    endforeach
+    boost = declare_dependency(dependencies: boost_deps)
 endif
 add_project_arguments(
     ['-DBOOST_ASIO_DISABLE_THREADS', '-DBOOST_ASIO_NO_DEPRECATED'],
diff --git a/subprojects/boost.wrap b/subprojects/boost.wrap
index 9d36198..b6ce680 100644
--- a/subprojects/boost.wrap
+++ b/subprojects/boost.wrap
@@ -1,5 +1,9 @@
 [wrap-file]
-source_url = https://downloads.yoctoproject.org/mirror/sources/boost_1_79_0.tar.bz2
-source_hash = 475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39
-source_filename = 1_79_0.tar.bz2
+directory = boost-1.87.0
 
+source_url = https://github.com/boostorg/boost/releases/download/boost-1.87.0/boost-1.87.0-cmake.tar.gz
+source_hash = 78fbf579e3caf0f47517d3fb4d9301852c3154bfecdc5eeebd9b2b0292366f5b
+source_filename = 1_87_0.tar.gz
+
+[provide]
+boost = boost_dep