From 3882a5a263caa681778a21b1f5f13a1b64536796 Mon Sep 17 00:00:00 2001 From: aeolio Date: Wed, 20 Apr 2022 16:10:39 +0200 Subject: [PATCH 01/21] src/lib/icu: fix iconv() detection when libiconv is installed --- src/lib/icu/meson.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/icu/meson.build b/src/lib/icu/meson.build index 59215e704..972c1fda3 100644 --- a/src/lib/icu/meson.build +++ b/src/lib/icu/meson.build @@ -12,17 +12,23 @@ if is_windows icu_sources += 'Win32.cxx' endif +iconv_dep = [] if icu_dep.found() icu_sources += [ 'Util.cxx', 'Init.cxx', ] elif not get_option('iconv').disabled() - have_iconv = compiler.has_function('iconv', prefix : '#include ') - conf.set('HAVE_ICONV', have_iconv) + # an installed iconv library will make the builtin iconf() unavailable, + # so search for the library first and pass it as (possible) dependency + iconv_dep = compiler.find_library('libiconv', required: false) + have_iconv = compiler.has_function('iconv', + dependencies: iconv_dep, + prefix : '#include ') if not have_iconv and get_option('iconv').enabled() error('iconv() not available') endif + conf.set('HAVE_ICONV', have_iconv) endif icu = static_library( @@ -31,6 +37,7 @@ icu = static_library( include_directories: inc, dependencies: [ icu_dep, + iconv_dep, fmt_dep, ], ) From ee39af34199aa875e109f7002a401d6ebbd66c22 Mon Sep 17 00:00:00 2001 From: Andreas Ziegler Date: Sun, 24 Apr 2022 04:14:17 +0000 Subject: [PATCH 02/21] fix typo in comment --- src/lib/icu/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/icu/meson.build b/src/lib/icu/meson.build index 972c1fda3..6e489876b 100644 --- a/src/lib/icu/meson.build +++ b/src/lib/icu/meson.build @@ -19,7 +19,7 @@ if icu_dep.found() 'Init.cxx', ] elif not get_option('iconv').disabled() - # an installed iconv library will make the builtin iconf() unavailable, + # an installed iconv library will make the builtin iconv() unavailable, # so search for the library first and pass it as (possible) dependency iconv_dep = compiler.find_library('libiconv', required: false) have_iconv = compiler.has_function('iconv', From 3929f17aef532bf4a5864453e704b913b1818a41 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 15:56:52 +0200 Subject: [PATCH 03/21] NEWS: mention the libiconv fix --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index cbea44148..452fdb85c 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.23.7 (not yet released) - opus: fix missing song length on high-latency files * mixer - software: update volume of disabled outputs +* support libiconv ver 0.23.6 (2022/03/14) * protocol From 2c82a6b2e0095ae9921be36fcf32ebd2507acb98 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 15:28:23 +0200 Subject: [PATCH 04/21] output/shout: handle shout_metadata_add() errors Fixes -Wunused-result --- src/output/plugins/ShoutOutputPlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 507220ee4..0dafe8b5c 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -446,9 +446,9 @@ ShoutOutput::SendTag(const Tag &tag) char song[1024]; shout_tag_to_metadata(tag, song, sizeof(song)); - shout_metadata_add(meta, "song", song); - shout_metadata_add(meta, "charset", "UTF-8"); - if (SHOUTERR_SUCCESS != shout_set_metadata(shout_conn, meta)) { + if (SHOUTERR_SUCCESS != shout_metadata_add(meta, "song", song) || + SHOUTERR_SUCCESS != shout_metadata_add(meta, "charset", "UTF-8") || + SHOUTERR_SUCCESS != shout_set_metadata(shout_conn, meta)) { LogWarning(shout_output_domain, "error setting shout metadata"); } From e08c13ad7e5f6e63d9c4a7a2a04cada1b51054b7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 15:29:01 +0200 Subject: [PATCH 05/21] output/shout: add "noexcept" --- src/output/plugins/ShoutOutputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 0dafe8b5c..e2e10cba7 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -418,7 +418,7 @@ ShoutOutput::Pause() } static void -shout_tag_to_metadata(const Tag &tag, char *dest, size_t size) +shout_tag_to_metadata(const Tag &tag, char *dest, size_t size) noexcept { const char *artist = tag.GetValue(TAG_ARTIST); const char *title = tag.GetValue(TAG_TITLE); From c779fc37eb2e1f776c592363426104c956939b1c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 16:45:34 +0200 Subject: [PATCH 06/21] output/shout: declare minimum version 2.4.0 This version was released 7 years ago, and it's reasonable to require at least this version. --- NEWS | 2 ++ src/output/plugins/meson.build | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 452fdb85c..4572e675b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.23.7 (not yet released) * decoder - opus: fix missing song length on high-latency files +* output + - shout: require at least libshout 2.4.0 * mixer - software: update volume of disabled outputs * support libiconv diff --git a/src/output/plugins/meson.build b/src/output/plugins/meson.build index a50146021..caac2c949 100644 --- a/src/output/plugins/meson.build +++ b/src/output/plugins/meson.build @@ -99,7 +99,7 @@ if get_option('recorder') need_encoder = true endif -libshout_dep = dependency('shout', required: get_option('shout')) +libshout_dep = dependency('shout', version: '>= 2.4.0', required: get_option('shout')) output_features.set('HAVE_SHOUT', libshout_dep.found()) if libshout_dep.found() output_plugins_sources += 'ShoutOutputPlugin.cxx' From 83072d6b9cdebc5c89d61545a49944398898ea73 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 16:48:52 +0200 Subject: [PATCH 07/21] output/shout: pass reference to Setup() --- src/output/plugins/ShoutOutputPlugin.cxx | 46 ++++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index e2e10cba7..874ad4a0e 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -59,7 +59,7 @@ class ShoutConfig { public: ShoutConfig(const ConfigBlock &block, const char *mime_type); - void Setup(shout_t *connection) const; + void Setup(shout_t &connection) const; }; struct ShoutOutput final : AudioOutput { @@ -230,40 +230,40 @@ ShoutOutput::Create(EventLoop &, const ConfigBlock &block) } inline void -ShoutConfig::Setup(shout_t *connection) const +ShoutConfig::Setup(shout_t &connection) const { - if (shout_set_host(connection, host) != SHOUTERR_SUCCESS || - shout_set_port(connection, port) != SHOUTERR_SUCCESS || - shout_set_password(connection, passwd) != SHOUTERR_SUCCESS || - shout_set_mount(connection, mount) != SHOUTERR_SUCCESS || - shout_set_name(connection, name) != SHOUTERR_SUCCESS || - shout_set_user(connection, user) != SHOUTERR_SUCCESS || - shout_set_public(connection, is_public) != SHOUTERR_SUCCESS || - shout_set_format(connection, format) != SHOUTERR_SUCCESS || - shout_set_protocol(connection, protocol) != SHOUTERR_SUCCESS || + if (shout_set_host(&connection, host) != SHOUTERR_SUCCESS || + shout_set_port(&connection, port) != SHOUTERR_SUCCESS || + shout_set_password(&connection, passwd) != SHOUTERR_SUCCESS || + shout_set_mount(&connection, mount) != SHOUTERR_SUCCESS || + shout_set_name(&connection, name) != SHOUTERR_SUCCESS || + shout_set_user(&connection, user) != SHOUTERR_SUCCESS || + shout_set_public(&connection, is_public) != SHOUTERR_SUCCESS || + shout_set_format(&connection, format) != SHOUTERR_SUCCESS || + shout_set_protocol(&connection, protocol) != SHOUTERR_SUCCESS || #ifdef SHOUT_TLS - shout_set_tls(connection, tls) != SHOUTERR_SUCCESS || + shout_set_tls(&connection, tls) != SHOUTERR_SUCCESS || #endif - shout_set_agent(connection, "MPD") != SHOUTERR_SUCCESS) - throw std::runtime_error(shout_get_error(connection)); + shout_set_agent(&connection, "MPD") != SHOUTERR_SUCCESS) + throw std::runtime_error(shout_get_error(&connection)); /* optional paramters */ - if (genre != nullptr && shout_set_genre(connection, genre)) - throw std::runtime_error(shout_get_error(connection)); + if (genre != nullptr && shout_set_genre(&connection, genre)) + throw std::runtime_error(shout_get_error(&connection)); if (description != nullptr && - shout_set_description(connection, description)) - throw std::runtime_error(shout_get_error(connection)); + shout_set_description(&connection, description)) + throw std::runtime_error(shout_get_error(&connection)); - if (url != nullptr && shout_set_url(connection, url)) - throw std::runtime_error(shout_get_error(connection)); + if (url != nullptr && shout_set_url(&connection, url)) + throw std::runtime_error(shout_get_error(&connection)); if (quality != nullptr) - shout_set_audio_info(connection, SHOUT_AI_QUALITY, quality); + shout_set_audio_info(&connection, SHOUT_AI_QUALITY, quality); if (bitrate != nullptr) - shout_set_audio_info(connection, SHOUT_AI_BITRATE, bitrate); + shout_set_audio_info(&connection, SHOUT_AI_BITRATE, bitrate); } void @@ -274,7 +274,7 @@ ShoutOutput::Enable() throw std::bad_alloc{}; try { - config.Setup(shout_conn); + config.Setup(*shout_conn); } catch (...) { shout_free(shout_conn); throw; From 4a30c2d79c057b7619f1cd5b0a730d142c415aac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 16:47:27 +0200 Subject: [PATCH 08/21] output/shout: use shout_set_meta() --- src/output/plugins/ShoutOutputPlugin.cxx | 29 ++++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 874ad4a0e..5b22a9a11 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -229,6 +229,20 @@ ShoutOutput::Create(EventLoop &, const ConfigBlock &block) return new ShoutOutput(block); } +static void +SetMeta(shout_t &connection, const char *name, const char *value) +{ + if (shout_set_meta(&connection, name, value) != SHOUTERR_SUCCESS) + throw std::runtime_error(shout_get_error(&connection)); +} + +static void +SetOptionalMeta(shout_t &connection, const char *name, const char *value) +{ + if (value != nullptr) + SetMeta(connection, name, value); +} + inline void ShoutConfig::Setup(shout_t &connection) const { @@ -236,7 +250,6 @@ ShoutConfig::Setup(shout_t &connection) const shout_set_port(&connection, port) != SHOUTERR_SUCCESS || shout_set_password(&connection, passwd) != SHOUTERR_SUCCESS || shout_set_mount(&connection, mount) != SHOUTERR_SUCCESS || - shout_set_name(&connection, name) != SHOUTERR_SUCCESS || shout_set_user(&connection, user) != SHOUTERR_SUCCESS || shout_set_public(&connection, is_public) != SHOUTERR_SUCCESS || shout_set_format(&connection, format) != SHOUTERR_SUCCESS || @@ -247,17 +260,13 @@ ShoutConfig::Setup(shout_t &connection) const shout_set_agent(&connection, "MPD") != SHOUTERR_SUCCESS) throw std::runtime_error(shout_get_error(&connection)); + SetMeta(connection, SHOUT_META_NAME, name); + /* optional paramters */ - if (genre != nullptr && shout_set_genre(&connection, genre)) - throw std::runtime_error(shout_get_error(&connection)); - - if (description != nullptr && - shout_set_description(&connection, description)) - throw std::runtime_error(shout_get_error(&connection)); - - if (url != nullptr && shout_set_url(&connection, url)) - throw std::runtime_error(shout_get_error(&connection)); + SetOptionalMeta(connection, SHOUT_META_GENRE, genre); + SetOptionalMeta(connection, SHOUT_META_DESCRIPTION, description); + SetOptionalMeta(connection, SHOUT_META_URL, url); if (quality != nullptr) shout_set_audio_info(&connection, SHOUT_AI_QUALITY, quality); From 1d04490ed3120d1aedb35c9ffdaf4959250b1a47 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 17:38:30 +0200 Subject: [PATCH 09/21] output/shout: use shout_set_content_format() --- src/output/plugins/ShoutOutputPlugin.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 5b22a9a11..81bcb168d 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -252,7 +252,13 @@ ShoutConfig::Setup(shout_t &connection) const shout_set_mount(&connection, mount) != SHOUTERR_SUCCESS || shout_set_user(&connection, user) != SHOUTERR_SUCCESS || shout_set_public(&connection, is_public) != SHOUTERR_SUCCESS || +#ifdef SHOUT_USAGE_AUDIO + /* since libshout 2.4.3 */ + shout_set_content_format(&connection, format, SHOUT_USAGE_AUDIO, + nullptr) != SHOUTERR_SUCCESS || +#else shout_set_format(&connection, format) != SHOUTERR_SUCCESS || +#endif shout_set_protocol(&connection, protocol) != SHOUTERR_SUCCESS || #ifdef SHOUT_TLS shout_set_tls(&connection, tls) != SHOUTERR_SUCCESS || From 33a84a8ca2067e97fd5d13334aebd48046f30850 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 17:41:17 +0200 Subject: [PATCH 10/21] output/shout: use shout_set_metadata_utf8() --- src/output/plugins/ShoutOutputPlugin.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 81bcb168d..57271b850 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -462,8 +462,14 @@ ShoutOutput::SendTag(const Tag &tag) shout_tag_to_metadata(tag, song, sizeof(song)); if (SHOUTERR_SUCCESS != shout_metadata_add(meta, "song", song) || +#ifdef SHOUT_FORMAT_TEXT + /* since libshout 2.4.6 */ + SHOUTERR_SUCCESS != shout_set_metadata_utf8(shout_conn, meta) +#else SHOUTERR_SUCCESS != shout_metadata_add(meta, "charset", "UTF-8") || - SHOUTERR_SUCCESS != shout_set_metadata(shout_conn, meta)) { + SHOUTERR_SUCCESS != shout_set_metadata(shout_conn, meta) +#endif + ) { LogWarning(shout_output_domain, "error setting shout metadata"); } From c7a4355153a5a308047807d9a4c6bf56ad239c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Wed, 9 Mar 2022 15:05:21 +0100 Subject: [PATCH 11/21] outputs/pipewire: fix ParamChanged incorrectly setting volume Previous versions of MPD would, on parameter change, set the PipeWire volume before clearing the restore_volume flag, causing the call to short circuit and do nothing. Instead, clear the flag before the call. --- NEWS | 1 + src/output/plugins/PipeWireOutputPlugin.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4572e675b..f28c274f7 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ ver 0.23.7 (not yet released) * output - shout: require at least libshout 2.4.0 * mixer + - pipewire: fix volume restore - software: update volume of disabled outputs * support libiconv diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index bf5155a5b..18821b105 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -638,8 +638,8 @@ PipeWireOutput::ParamChanged([[maybe_unused]] uint32_t id, [[maybe_unused]] const struct spa_pod *param) noexcept { if (restore_volume) { - SetVolume(volume); restore_volume = false; + SetVolume(volume); } #if defined(ENABLE_DSD) && defined(SPA_AUDIO_DSD_FLAG_NONE) From 35dbc1a90c5110fbf6ab18e98c43463d1b4ea4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Tue, 8 Mar 2022 23:38:49 +0100 Subject: [PATCH 12/21] mixer,output: prevent setting volume before outputs are really enabled Previous versions of MPD would call SetVolume on enabled outputs before they are ready, causing all of MPD to crash. Checking the really_enabled flag prevents this, though it also prevents setting volume before the player starts. Before (with the PipeWire output): [i] ~$ mpc clear volume: 81% repeat: off random: off single: off consume: off [i] ~$ systemctl --user restart mpd.service [i] ~$ mpc volume 100 MPD error: Connection closed by the server [i] ~ 1 $ After: [i] ~$ # mpd is freshly started w/o anything in the queue [i] ~$ mpc volume:100% repeat: off random: off single: off consume: off [i] ~$ mpc volume 80 MPD error: problems setting volume [i] ~ 1 $ mpc volume:100% repeat: off random: off single: off consume: off [i] ~$ --- src/mixer/MixerAll.cxx | 2 +- src/output/Control.hxx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mixer/MixerAll.cxx b/src/mixer/MixerAll.cxx index da96f93f3..2d9c9080e 100644 --- a/src/mixer/MixerAll.cxx +++ b/src/mixer/MixerAll.cxx @@ -84,7 +84,7 @@ output_mixer_set_volume(AudioOutputControl &ao, unsigned volume) noexcept /* software mixers are always updated, even if they are disabled */ - if (!ao.IsEnabled() && !mixer->IsPlugin(software_mixer_plugin)) + if (!ao.IsReallyEnabled() && !mixer->IsPlugin(software_mixer_plugin)) return false; try { diff --git a/src/output/Control.hxx b/src/output/Control.hxx index fa1dfbece..8f3b5fa6e 100644 --- a/src/output/Control.hxx +++ b/src/output/Control.hxx @@ -288,6 +288,13 @@ public: return !output; } + /** + * Caller must lock the mutex. + */ + bool IsReallyEnabled() const noexcept { + return really_enabled; + } + /** * Caller must lock the mutex. */ From 7342ae2e33dc54610476347daca78282f79c31cf Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Sun, 22 Mar 2020 14:34:16 +0100 Subject: [PATCH 13/21] android: set application debuggable This debuggable flag should not be set with release builds. Generally, graddle is taking care of that. --- android/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 11b375198..96978936a 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -19,6 +19,7 @@ Date: Sun, 22 Mar 2020 20:59:48 +0100 Subject: [PATCH 14/21] android: add gdb.sh This script setup a dummy android native app folder and call ndk-gdb from it. It needs a modification in ANDROID_NDK since ndk-gdb may attach to the wrong pid, cf. comments in the script. --- android/gdb.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 android/gdb.sh diff --git a/android/gdb.sh b/android/gdb.sh new file mode 100755 index 000000000..5e576c7ff --- /dev/null +++ b/android/gdb.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +# This script need the following modification in ANDROID_NDK in order to attach +# to the good :main pid +#--- a/prebuilt/linux-x86_64/bin/ndk-gdb.py +#+++ b/prebuilt/linux-x86_64/bin/ndk-gdb.py +#@@ -669,7 +669,7 @@ +# log("Sleeping for {} seconds.".format(args.delay)) +# time.sleep(args.delay) +# +#- pids = gdbrunner.get_pids(device, pkg_name) +#+ pids = gdbrunner.get_pids(device, pkg_name + ":main") +# if len(pids) == 0: +# error("Failed to find running process '{}'".format(pkg_name)) +# if len(pids) > 1: + +SCRIPT_PATH=$(dirname $0) +BUILD_PATH="`pwd`" +TMP_PATH="$BUILD_PATH/gdb" +NDK_GDB_ARGS="--force" +ANDROID_NDK=$1 + +if [ ! -f $ANDROID_NDK/source.properties ];then + echo "usage: $0 ANDROID_NDK" + exit 1 +fi + +if [ ! -f $BUILD_PATH/libmpd.so ];then + echo "This script need to be executed from the android build directory" + exit 1 +fi + +rm -rf "$TMP_PATH" +mkdir -p "$TMP_PATH" + +ANDROID_MANIFEST="$SCRIPT_PATH/AndroidManifest.xml" +ABI=`ls "$BUILD_PATH/android/apk/apk/lib" --sort=time | head -n 1` + +if [ ! -f "$ANDROID_MANIFEST" -o "$ABI" = "" ]; then + echo "Invalid manifest/ABI, did you try building first ?" + exit 1 +fi + +mkdir -p "$TMP_PATH"/jni +touch "$TMP_PATH"/jni/Android.mk +echo "APP_ABI := $ABI" > "$TMP_PATH"/jni/Application.mk + +DEST=obj/local/$ABI +mkdir -p "$TMP_PATH/$DEST" + +cp "$BUILD_PATH/libmpd.so" "$TMP_PATH/$DEST" +cp "$ANDROID_MANIFEST" "$TMP_PATH" + +(cd "$TMP_PATH" && bash $ANDROID_NDK/ndk-gdb $NDK_GDB_ARGS) From 50d35c9677227a21a97507cb43d0d74fc4e7f306 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 23 Apr 2022 11:42:26 -0700 Subject: [PATCH 15/21] upnp: use UpnpInit2 always libupnp 1.14 removes the non 2 function. Fixes compilation there. Signed-off-by: Rosen Penev Closes https://github.com/MusicPlayerDaemon/MPD/issues/1499 --- NEWS | 2 ++ src/lib/upnp/Init.cxx | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index f28c274f7..ced9d58ff 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.23.7 (not yet released) +* database + - upnp: support pupnp 1.14 * decoder - opus: fix missing song length on high-latency files * output diff --git a/src/lib/upnp/Init.cxx b/src/lib/upnp/Init.cxx index bc3da2f51..3a0a19bf3 100644 --- a/src/lib/upnp/Init.cxx +++ b/src/lib/upnp/Init.cxx @@ -36,11 +36,7 @@ static void DoInit(const char* iface) { -#ifdef UPNP_ENABLE_IPV6 auto code = UpnpInit2(iface, 0); -#else - auto code = UpnpInit(iface, 0); -#endif if (code != UPNP_E_SUCCESS) throw FormatRuntimeError("UpnpInit() failed: %s", UpnpGetErrorMessage(code)); From 9659d19718f1b179f4c726bcd064a80cf54a1c2b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 17:58:32 +0200 Subject: [PATCH 16/21] lib/upnp/Init: use if with initalizer --- src/lib/upnp/Init.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/upnp/Init.cxx b/src/lib/upnp/Init.cxx index 3a0a19bf3..559e44001 100644 --- a/src/lib/upnp/Init.cxx +++ b/src/lib/upnp/Init.cxx @@ -35,9 +35,7 @@ static unsigned upnp_ref; static void DoInit(const char* iface) { - - auto code = UpnpInit2(iface, 0); - if (code != UPNP_E_SUCCESS) + if (auto code = UpnpInit2(iface, 0); code != UPNP_E_SUCCESS) throw FormatRuntimeError("UpnpInit() failed: %s", UpnpGetErrorMessage(code)); From 026e7ea32a64e8b4ccf9a246c550a50820934189 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 23 Apr 2022 12:34:52 -0700 Subject: [PATCH 17/21] update all subprojecs Done with meson wrap update Signed-off-by: Rosen Penev --- subprojects/expat.wrap | 21 ++++++++++++--------- subprojects/fmt.wrap | 14 +++++++------- subprojects/gtest.wrap | 19 ++++++++++++------- subprojects/sqlite3.wrap | 14 +++++++------- subprojects/vorbis.wrap | 14 +++++++------- 5 files changed, 45 insertions(+), 37 deletions(-) diff --git a/subprojects/expat.wrap b/subprojects/expat.wrap index 53b762397..8cb17ba72 100644 --- a/subprojects/expat.wrap +++ b/subprojects/expat.wrap @@ -1,9 +1,12 @@ -[wrap-file] -directory = expat-2.2.9 -source_url = https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.xz -source_filename = expat-2.2.9.tar.bz2 -source_hash = 1ea6965b15c2106b6bbe883397271c80dfa0331cdf821b2c319591b55eadc0a4 -patch_url = https://wrapdb.mesonbuild.com/v1/projects/expat/2.2.9/3/get_zip -patch_filename = expat-2.2.9-3-wrap.zip -patch_hash = e9aaace62e9a158b5e96f5c38c9f81f369179206acd87697653d777c0d3975d3 - +[wrap-file] +directory = expat-2.4.8 +source_url = https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz +source_filename = expat-2.4.8.tar.bz2 +source_hash = f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25 +patch_filename = expat_2.4.8-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.4.8-1/get_patch +patch_hash = 9aec253a2c6d1c0feb852c5c6920298d14701eeec7acc6832bb402438b52112a + +[provide] +expat = expat_dep + diff --git a/subprojects/fmt.wrap b/subprojects/fmt.wrap index 8ce37d969..63869be17 100644 --- a/subprojects/fmt.wrap +++ b/subprojects/fmt.wrap @@ -1,11 +1,11 @@ [wrap-file] -directory = fmt-7.1.3 -source_url = https://github.com/fmtlib/fmt/archive/7.1.3.tar.gz -source_filename = fmt-7.1.3.tar.gz -source_hash = 5cae7072042b3043e12d53d50ef404bbb76949dad1de368d7f993a15c8c05ecc -patch_url = https://wrapdb.mesonbuild.com/v1/projects/fmt/7.1.3/1/get_zip -patch_filename = fmt-7.1.3-1-wrap.zip -patch_hash = 6eb951a51806fd6ffd596064825c39b844c1fe1799840ef507b61a53dba08213 +directory = fmt-8.1.1 +source_url = https://github.com/fmtlib/fmt/archive/8.1.1.tar.gz +source_filename = fmt-8.1.1.tar.gz +source_hash = 3d794d3cf67633b34b2771eb9f073bde87e846e0d395d254df7b211ef1ec7346 +patch_filename = fmt_8.1.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/fmt_8.1.1-1/get_patch +patch_hash = 6035a67c7a8c90bed74c293c7265c769f47a69816125f7566bccb8e2543cee5e [provide] fmt = fmt_dep diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap index ca5d699ec..730de1aef 100644 --- a/subprojects/gtest.wrap +++ b/subprojects/gtest.wrap @@ -1,10 +1,15 @@ [wrap-file] -directory = googletest-release-1.10.0 +directory = googletest-release-1.11.0 +source_url = https://github.com/google/googletest/archive/release-1.11.0.tar.gz +source_filename = gtest-1.11.0.tar.gz +source_hash = b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5 +patch_filename = gtest_1.11.0-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.11.0-2/get_patch +patch_hash = 764530d812ac161c9eab02a8cfaec67c871fcfc5548e29fd3d488070913d4e94 -source_url = https://github.com/google/googletest/archive/release-1.10.0.zip -source_filename = gtest-1.10.0.zip -source_hash = 94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91 +[provide] +gtest = gtest_dep +gtest_main = gtest_main_dep +gmock = gmock_dep +gmock_main = gmock_main_dep -patch_url = https://wrapdb.mesonbuild.com/v1/projects/gtest/1.10.0/1/get_zip -patch_filename = gtest-1.10.0-1-wrap.zip -patch_hash = 04ff14e8880e4e465f6260221e9dfd56fea6bc7cce4c4aff0dc528e4a2c8f514 diff --git a/subprojects/sqlite3.wrap b/subprojects/sqlite3.wrap index 4d51dc053..39434f566 100644 --- a/subprojects/sqlite3.wrap +++ b/subprojects/sqlite3.wrap @@ -1,11 +1,11 @@ [wrap-file] -directory = sqlite-amalgamation-3340100 -source_url = https://www.sqlite.org/2021/sqlite-amalgamation-3340100.zip -source_filename = sqlite-amalgamation-3340100.zip -source_hash = e0b1c0345fe4338b936e17da8e1bd88366cd210e576834546977f040c12a8f68 -patch_url = https://wrapdb.mesonbuild.com/v1/projects/sqlite3/3.34.1/1/get_zip -patch_filename = sqlite3-3.34.1-1-wrap.zip -patch_hash = cba9e47bdb4c02f88fadaae8deab357218d32562c6b86ce7ba0c72f107044360 +directory = sqlite-amalgamation-3380000 +source_url = https://sqlite.org/2022/sqlite-amalgamation-3380000.zip +source_filename = sqlite-amalgamation-3380000.zip +source_hash = e055f6054e97747a135c89e36520c0a423249e8a91c5fc445163f4a6adb20df6 +patch_filename = sqlite3_3.38.0-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.38.0-1/get_patch +patch_hash = 49e30bf010ff63ab772d5417885e6905379025ceac80382e292c6dbd3a9da744 [provide] sqlite3 = sqlite3_dep diff --git a/subprojects/vorbis.wrap b/subprojects/vorbis.wrap index eb0c1af60..dfca897c9 100644 --- a/subprojects/vorbis.wrap +++ b/subprojects/vorbis.wrap @@ -1,11 +1,11 @@ [wrap-file] -directory = libvorbis-1.3.5 -source_url = http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz -source_filename = libvorbis-1.3.5.tar.xz -source_hash = 54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1 -patch_url = https://wrapdb.mesonbuild.com/v1/projects/vorbis/1.3.5/7/get_zip -patch_filename = vorbis-1.3.5-7-wrap.zip -patch_hash = 7f4d3f9253925196461d52fd4553aad4468fd845560d1ff6c2eb6a012cf64fb0 +directory = libvorbis-1.3.7 +source_url = https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz +source_filename = libvorbis-1.3.7.tar.xz +source_hash = b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b +patch_filename = vorbis_1.3.7-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/vorbis_1.3.7-2/get_patch +patch_hash = fe302576cbf8408754b332b539ea1b83f0f96fa9aae50a5d1fea911713d5f21c [provide] vorbis = vorbis_dep From 9da93cd88796a826efce22b93702e2ebb5aca4e2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 18:10:47 +0200 Subject: [PATCH 18/21] python/build/libs.py: update zlib to 1.2.12 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 412ca5b92..d98335335 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -55,8 +55,8 @@ flac = AutotoolsProject( ) zlib = ZlibProject( - 'http://zlib.net/zlib-1.2.11.tar.xz', - '4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066', + 'http://zlib.net/zlib-1.2.12.tar.xz', + '7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18', 'lib/libz.a', ) From f818cde32c23e1a409744a405ac859aa07df74d4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 18:12:27 +0200 Subject: [PATCH 19/21] python/build/libs.py: update FFmpeg to 5.0.1 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index d98335335..855482111 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -151,8 +151,8 @@ gme = CmakeProject( ) ffmpeg = FfmpegProject( - 'http://ffmpeg.org/releases/ffmpeg-5.0.tar.xz', - '51e919f7d205062c0fd4fae6243a84850391115104ccf1efc451733bc0ac7298', + 'http://ffmpeg.org/releases/ffmpeg-5.0.1.tar.xz', + 'ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b', 'lib/libavcodec.a', [ '--disable-shared', '--enable-static', From fa7d7e91874935c2b8ae49d434804f954e97c99a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 18:13:45 +0200 Subject: [PATCH 20/21] python/build/libs.py: update OpenSSL to 3.0.2 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 855482111..32414fe56 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -380,8 +380,8 @@ ffmpeg = FfmpegProject( ) openssl = OpenSSLProject( - 'https://www.openssl.org/source/openssl-3.0.1.tar.gz', - 'c311ad853353bce796edad01a862c50a8a587f62e7e2100ef465ab53ec9b06d1', + 'https://www.openssl.org/source/openssl-3.0.2.tar.gz', + '98e91ccead4d4756ae3c9cde5e09191a8e586d9f4d50838e7ec09d6411dfdb63', 'include/openssl/ossl_typ.h', ) From 83572701f45e57610c3fdfb1d30f644b4f78474e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 18:26:04 +0200 Subject: [PATCH 21/21] python/build/libs.py: update Boost to 1.79.0 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 32414fe56..b4ab29c21 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -444,7 +444,7 @@ jack = JackProject( ) boost = BoostProject( - 'https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2', - '8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc', + 'https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2', + '475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39', 'include/boost/version.hpp', )