diff --git a/android/build.py b/android/build.py index 32507b427..bdf10ace3 100755 --- a/android/build.py +++ b/android/build.py @@ -32,7 +32,6 @@ from build.toolchain import AndroidNdkToolchain # a list of third-party libraries to be used by MPD on Android from build.libs import * thirdparty_libs = [ - libmpdclient, libid3tag, libmodplug, wildmidi, diff --git a/meson.build b/meson.build index 8a2c4102a..57f339b9c 100644 --- a/meson.build +++ b/meson.build @@ -18,6 +18,7 @@ project( 'fmt:default_library=static', 'gtest:default_library=static', 'lame:default_library=static', + 'libmpdclient:default_library=static', 'liburing:default_library=static', 'ogg:default_library=static', 'openssl:default_library=static', @@ -76,6 +77,8 @@ project( 'curl:tftp=disabled', 'lame:decoder=false', 'lame:tools=disabled', + 'libmpdclient:documentation=false', + 'libmpdclient:test=false', 'openssl:build_cli=false', 'openssl:asm=disabled', # work around "call to undeclared function "asm" on Android 'opus:docs=disabled', diff --git a/python/build/libs.py b/python/build/libs.py index d7881316f..a35978f50 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -8,12 +8,6 @@ from build.cmake import CmakeProject from build.autotools import AutotoolsProject from build.ffmpeg import FfmpegProject -libmpdclient = MesonProject( - 'https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.20.tar.xz', - '18793f68e939c3301e34d8fcadea1f7daa24143941263cecadb80126194e277d', - 'lib/libmpdclient.a', -) - libsamplerate = CmakeProject( 'https://github.com/libsndfile/libsamplerate/releases/download/0.2.2/libsamplerate-0.2.2.tar.xz', '97c010fc25156c33cddc272c1935afab', diff --git a/subprojects/.gitignore b/subprojects/.gitignore index b21704d8a..59adee2e2 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -6,6 +6,7 @@ /fmt-*/ /googletest-*/ /lame-*/ +/libmpdclient/ /openssl-*/ /opus-*/ /sqlite-*/ diff --git a/subprojects/libmpdclient.wrap b/subprojects/libmpdclient.wrap new file mode 100644 index 000000000..9f999ad8a --- /dev/null +++ b/subprojects/libmpdclient.wrap @@ -0,0 +1,8 @@ +[wrap-git] +url = https://github.com/MusicPlayerDaemon/libmpdclient +revision = v2.21 + +diff_files = libmpdclient_unicode.patch + +[provide] +libmpdclient = libmpdclient_dep diff --git a/subprojects/packagefiles/libmpdclient_unicode.patch b/subprojects/packagefiles/libmpdclient_unicode.patch new file mode 100644 index 000000000..2a66a09e7 --- /dev/null +++ b/subprojects/packagefiles/libmpdclient_unicode.patch @@ -0,0 +1,27 @@ +commit 14e9b3be33a7b7e94bb6504a519e03072bae033d +Author: Max Kellermann +Date: Wed Dec 20 17:13:54 2023 +0100 + + ierror: use FormatMessageA() instead of FormatMessage() + + Just in case _UNICODE is defined. + +diff --git a/src/ierror.c b/src/ierror.c +index 1642dbd2..e068dc8c 100644 +--- a/src/ierror.c ++++ b/src/ierror.c +@@ -103,10 +103,10 @@ mpd_error_system_message(struct mpd_error_info *error, int code) + mpd_error_system(error, code); + + #ifdef _WIN32 +- nbytes = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | +- FORMAT_MESSAGE_IGNORE_INSERTS | +- FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, code, 0, +- (LPSTR)buffer, sizeof(buffer), NULL); ++ nbytes = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | ++ FORMAT_MESSAGE_IGNORE_INSERTS | ++ FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, code, 0, ++ (LPSTR)buffer, sizeof(buffer), NULL); + mpd_error_message(error, nbytes > 0 ? buffer : "Unknown error"); + #else + mpd_error_message(error, strerror(code)); diff --git a/win32/build.py b/win32/build.py index 94ed9eed7..d43f274ce 100755 --- a/win32/build.py +++ b/win32/build.py @@ -38,7 +38,6 @@ root_path = os.path.join(arch_path, 'root') # a list of third-party libraries to be used by MPD on Android from build.libs import * thirdparty_libs = [ - libmpdclient, zlib, libid3tag, libmodplug,