From c8ebaf352179cc0c90c24fe7ba32e1e0095e3156 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Nov 2022 12:10:05 +0100 Subject: [PATCH 1/3] python/build/meson.py: use "meson setup" instead of the deprecated syntax --- python/build/meson.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/meson.py b/python/build/meson.py index 2ad2904bb..d86c48e6a 100644 --- a/python/build/meson.py +++ b/python/build/meson.py @@ -82,8 +82,8 @@ endian = '{endian}' def configure(toolchain, src, build, args=()): cross_file = make_cross_file(toolchain) configure = [ - 'meson', - src, build, + 'meson', 'setup', + build, src, '--prefix', toolchain.install_prefix, From ab99a5799748ff032f90b27568535d461a76ce45 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Nov 2022 12:16:56 +0100 Subject: [PATCH 2/3] test/meson.build: reduce test_translate_song. dependencies --- src/storage/meson.build | 1 - test/meson.build | 3 ++- test/test_translate_song.cxx | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/storage/meson.build b/src/storage/meson.build index 2fbddeb7d..0102d6927 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -31,4 +31,3 @@ storage_glue_dep = declare_dependency( storage_plugins_dep, ], ) - diff --git a/test/meson.build b/test/meson.build index 6c6cc0b3f..c4746407a 100644 --- a/test/meson.build +++ b/test/meson.build @@ -288,7 +288,8 @@ if enable_database dependencies: [ log_dep, tag_dep, - storage_glue_dep, + fs_dep, + storage_plugins_dep, gtest_dep, ], ), diff --git a/test/test_translate_song.cxx b/test/test_translate_song.cxx index 6619066d6..962ae550f 100644 --- a/test/test_translate_song.cxx +++ b/test/test_translate_song.cxx @@ -14,6 +14,7 @@ #include "ls.hxx" #include "Log.hxx" #include "db/DatabaseSong.hxx" +#include "storage/Registry.hxx" #include "storage/StorageInterface.hxx" #include "storage/plugins/LocalStorage.hxx" #include "Mapper.hxx" @@ -36,6 +37,13 @@ uri_supported_scheme(const char *uri) noexcept return strncmp(uri, "http://", 7) == 0; } +const StoragePlugin * +GetStoragePluginByUri(const char *) noexcept +{ + // dummy symbol + return nullptr; +} + static constexpr auto music_directory = PATH_LITERAL("/music"); static Storage *storage; From c2d0f35e7a1a9fbc8cb23a30a191c966b26c140e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Nov 2022 12:19:41 +0100 Subject: [PATCH 3/3] storage/meson.build: move StorageState.cxx to "mpd" executable Fixes spurious linker errors. --- meson.build | 1 + src/storage/meson.build | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c7cb2d74f..6fb9b529e 100644 --- a/meson.build +++ b/meson.build @@ -390,6 +390,7 @@ endif if enable_database sources += [ + 'src/storage/StorageState.cxx', 'src/queue/PlaylistUpdate.cxx', 'src/command/StorageCommands.cxx', 'src/command/DatabaseCommands.cxx', diff --git a/src/storage/meson.build b/src/storage/meson.build index 0102d6927..cc214548c 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -17,7 +17,6 @@ storage_glue = static_library( 'CompositeStorage.cxx', 'MemoryDirectoryReader.cxx', 'Configured.cxx', - 'StorageState.cxx', include_directories: inc, dependencies: [ boost_dep,