release v0.23.10

-----BEGIN PGP SIGNATURE-----
 
 iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmNJ2e0NHG1heEBibGFy
 Zy5kZQAKCRAjbopYxttFEjBYEACk4QtVnD52sGtz0CwThFYzekvkZHOBcP2fYOH7
 rVcQaNmV7Fpnv+iz+k7zrqhs/A8FgQq6KUNpUn3gzxae4KsA7i1yEpopIqfzRh71
 eVrjTGijMirddehsxKbkjZ1TZy5S+SkZ+Bu965qzXUZuIrErKm4m5xqkIxXBHMEc
 twK9BSCqlTT2vpND5cmX90T/NBDgZd3uQxQP2ohWjVXvg9ou2gtns18ZdYUVRTym
 rLqRLfx1rG1lS8hzKqUqt9YxbWSD606T4giC2vYg2+2OFA9VFh3TNCSaFgWEJMZe
 ou6iaX+aSoCP+H6nktxfYravwdmHvBseRtrOouxPd8Br2k1eSQGXEVlZVTKrpBME
 OZnncEGqN27GggYH1RyVZ6showJ7G05HOhGFDDs8ABR0EbAbNkGvhrjl8cGXONYH
 ScTBbvqkTrhRMOOSmiAp7X1eLJ4QICAfhCV85YzSV93u69egO1MQLYzVYUurOOyt
 TuT+XbUD+Irk3DrHvhxs/IE+ciIvilFsvCmeNjCAyH4ZPvvHt/AIskQNyF3Jj720
 XKjtq6rMF9bizut/kboPgsVQoFbnj7ncCaIZ90h27obeqqiXajTx7ixJldvwDbrp
 yKQY6xDdm7DZChqYF0KKWWzLt2BoAzqVPW3zgRfJRqb9HtQ+ZVJuljvV8bBVFKN1
 zIA4Nw==
 =GQl1
 -----END PGP SIGNATURE-----

Merge tag 'v0.23.10'

release v0.23.10
This commit is contained in:
Max Kellermann 2022-10-14 23:56:33 +02:00
commit d6d0f78e93
13 changed files with 58 additions and 146 deletions

6
NEWS
View File

@ -22,11 +22,15 @@ ver 0.24 (not yet released)
* static partition configuration * static partition configuration
* remove Haiku support * remove Haiku support
ver 0.23.10 (not yet released) ver 0.23.10 (2022/10/14)
* storage
- curl: fix file time stamps
* decoder * decoder
- ffmpeg: fix libfmt 9 compiler warning - ffmpeg: fix libfmt 9 compiler warning
* encoder * encoder
- flac: fix failure when libFLAC is built without Ogg support - flac: fix failure when libFLAC is built without Ogg support
* output
- alsa: fix crash bug
* Windows * Windows
- log to stdout by default, don't require "log_file" setting - log to stdout by default, don't require "log_file" setting

View File

@ -199,7 +199,7 @@ Compiling for Android
You need: You need:
* Android SDK * Android SDK
* `Android NDK r23 <https://developer.android.com/ndk/downloads>`_ * `Android NDK r25b <https://developer.android.com/ndk/downloads>`_
* `Meson 0.56.0 <http://mesonbuild.com/>`__ and `Ninja * `Meson 0.56.0 <http://mesonbuild.com/>`__ and `Ninja
<https://ninja-build.org/>`__ <https://ninja-build.org/>`__
* cmake * cmake

View File

@ -250,6 +250,14 @@ endif
fmt_dep = dependency('fmt', fallback: ['fmt', 'fmt_dep']) fmt_dep = dependency('fmt', fallback: ['fmt', 'fmt_dep'])
if compiler.get_id() == 'clang' and compiler.version().version_compare('<15')
fmt_dep = declare_dependency(
dependencies: fmt_dep,
# suppress bogus clang 14 warning (the version in Android NDK r25b)
compile_args: ['-Wno-unused-local-typedef'],
)
endif
log = static_library( log = static_library(
'log', 'log',
'src/Log.cxx', 'src/Log.cxx',

View File

@ -57,8 +57,8 @@ flac = AutotoolsProject(
) )
zlib = ZlibProject( zlib = ZlibProject(
'http://zlib.net/zlib-1.2.12.tar.xz', 'http://zlib.net/zlib-1.2.13.tar.xz',
'7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18', 'd14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98',
'lib/libz.a', 'lib/libz.a',
) )
@ -114,16 +114,20 @@ libmodplug = AutotoolsProject(
) )
libopenmpt = AutotoolsProject( libopenmpt = AutotoolsProject(
'https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.5.12+release.autotools.tar.gz', 'https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.6.6+release.autotools.tar.gz',
'892aea7a599b5d21842bebf463b5aafdad5711be7008dd84401920c6234820af', '6ddb9e26a430620944891796fefb1bbb38bd9148f6cfc558810c0d3f269876c7',
'lib/libopenmpt.a', 'lib/libopenmpt.a',
[ [
'--disable-shared', '--enable-static', '--disable-shared', '--enable-static',
'--disable-openmpt123', '--disable-openmpt123',
'--disable-examples',
'--disable-tests',
'--disable-doxygen-doc',
'--without-mpg123', '--without-ogg', '--without-vorbis', '--without-vorbisfile', '--without-mpg123', '--without-ogg', '--without-vorbis', '--without-vorbisfile',
'--without-portaudio', '--without-portaudiocpp', '--without-sndfile', '--without-portaudio', '--without-portaudiocpp', '--without-sndfile',
'--without-flac',
], ],
base='libopenmpt-0.5.12+release.autotools', base='libopenmpt-0.6.6+release.autotools',
) )
wildmidi = CmakeProject( wildmidi = CmakeProject(
@ -153,8 +157,8 @@ gme = CmakeProject(
) )
ffmpeg = FfmpegProject( ffmpeg = FfmpegProject(
'http://ffmpeg.org/releases/ffmpeg-5.1.tar.xz', 'http://ffmpeg.org/releases/ffmpeg-5.1.2.tar.xz',
'55eb6aab5ee235550fa54a33eaf8bf1b4ec66c01453182b12f6a993d75698b03', '619e706d662c8420859832ddc259cd4d4096a48a2ce1eefd052db9e440eef3dc',
'lib/libavcodec.a', 'lib/libavcodec.a',
[ [
'--disable-shared', '--enable-static', '--disable-shared', '--enable-static',
@ -389,8 +393,8 @@ openssl = OpenSSLProject(
) )
curl = CmakeProject( curl = CmakeProject(
'https://curl.se/download/curl-7.84.0.tar.xz', 'https://curl.se/download/curl-7.85.0.tar.xz',
'2d118b43f547bfe5bae806d8d47b4e596ea5b25a6c1f080aef49fbcd817c5db8', '88b54a6d4b9a48cb4d873c7056dcba997ddd5b7be5a2d537a4acb55c20b04be6',
'lib/libcurl.a', 'lib/libcurl.a',
[ [
'-DBUILD_CURL_EXE=OFF', '-DBUILD_CURL_EXE=OFF',
@ -424,8 +428,8 @@ curl = CmakeProject(
) )
libnfs = AutotoolsProject( libnfs = AutotoolsProject(
'https://github.com/sahlberg/libnfs/archive/libnfs-5.0.1.tar.gz', 'https://github.com/sahlberg/libnfs/archive/libnfs-5.0.2.tar.gz',
'7ef445410b42f36b9bad426608b53ccb9ccca4101e545c383f564c11db672ca8', '637e56643b19da9fba98f06847788c4dad308b723156a64748041035dcdf9bd3',
'lib/libnfs.a', 'lib/libnfs.a',
[ [
'--disable-shared', '--enable-static', '--disable-shared', '--enable-static',
@ -436,7 +440,7 @@ libnfs = AutotoolsProject(
'--disable-utils', '--disable-examples', '--disable-utils', '--disable-examples',
], ],
base='libnfs-libnfs-5.0.1', base='libnfs-libnfs-5.0.2',
autoreconf=True, autoreconf=True,
) )

View File

@ -46,7 +46,7 @@ Context::Initialise(JNIEnv *env) noexcept
AllocatedPath AllocatedPath
Context::GetExternalFilesDir(JNIEnv *env, const char *type) noexcept Context::GetExternalFilesDir(JNIEnv *env, const char *type) noexcept
{ {
assert(_type != nullptr); assert(type != nullptr);
jobject file = env->CallObjectMethod(Get(), getExternalFilesDir_method, jobject file = env->CallObjectMethod(Get(), getExternalFilesDir_method,
Java::String::Optional(env, type).Get()); Java::String::Optional(env, type).Get());

View File

@ -49,9 +49,6 @@ Java::File::Initialise(JNIEnv *env) noexcept
AllocatedPath AllocatedPath
Java::File::ToAbsolutePath(JNIEnv *env, jobject _file) noexcept Java::File::ToAbsolutePath(JNIEnv *env, jobject _file) noexcept
{ {
assert(env != nullptr);
assert(_file != nullptr);
LocalObject file(env, _file); LocalObject file(env, _file);
const jstring path = GetAbsolutePath(env, file); const jstring path = GetAbsolutePath(env, file);

View File

@ -810,8 +810,12 @@ AlsaOutput::Open(AudioFormat &audio_format)
fmt::format("Failed to open ALSA device \"{}\"", fmt::format("Failed to open ALSA device \"{}\"",
GetDevice()).c_str()); GetDevice()).c_str());
const char *pcm_name = snd_pcm_name(pcm);
if (pcm_name == nullptr)
pcm_name = "?";
FmtDebug(alsa_output_domain, "opened {} type={}", FmtDebug(alsa_output_domain, "opened {} type={}",
snd_pcm_name(pcm), pcm_name,
snd_pcm_type_name(snd_pcm_type(pcm))); snd_pcm_type_name(snd_pcm_type(pcm)));
#ifdef ENABLE_DSD #ifdef ENABLE_DSD

View File

@ -34,7 +34,6 @@
#include "event/InjectEvent.hxx" #include "event/InjectEvent.hxx"
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "thread/Cond.hxx" #include "thread/Cond.hxx"
#include "time/Parser.hxx"
#include "util/ASCII.hxx" #include "util/ASCII.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "util/SpanCast.hxx" #include "util/SpanCast.hxx"
@ -173,8 +172,9 @@ struct DavResponse {
} }
}; };
[[gnu::pure]]
static unsigned static unsigned
ParseStatus(const char *s) ParseStatus(const char *s) noexcept
{ {
/* skip the "HTTP/1.1" prefix */ /* skip the "HTTP/1.1" prefix */
const char *space = std::strchr(s, ' '); const char *space = std::strchr(s, ' ');
@ -184,37 +184,37 @@ ParseStatus(const char *s)
return strtoul(space + 1, nullptr, 10); return strtoul(space + 1, nullptr, 10);
} }
[[gnu::pure]]
static unsigned static unsigned
ParseStatus(const char *s, size_t length) ParseStatus(const char *s, size_t length) noexcept
{ {
return ParseStatus(std::string(s, length).c_str()); return ParseStatus(std::string(s, length).c_str());
} }
[[gnu::pure]]
static std::chrono::system_clock::time_point static std::chrono::system_clock::time_point
ParseTimeStamp(const char *s) ParseTimeStamp(const char *s) noexcept
{ {
try { return std::chrono::system_clock::from_time_t(curl_getdate(s, nullptr));
// TODO: make this more robust
return ParseTimePoint(s, "%a, %d %b %Y %T");
} catch (...) {
return std::chrono::system_clock::time_point::min();
}
} }
[[gnu::pure]]
static std::chrono::system_clock::time_point static std::chrono::system_clock::time_point
ParseTimeStamp(const char *s, size_t length) ParseTimeStamp(const char *s, size_t length) noexcept
{ {
return ParseTimeStamp(std::string(s, length).c_str()); return ParseTimeStamp(std::string(s, length).c_str());
} }
[[gnu::pure]]
static uint64_t static uint64_t
ParseU64(const char *s) ParseU64(const char *s) noexcept
{ {
return strtoull(s, nullptr, 10); return strtoull(s, nullptr, 10);
} }
[[gnu::pure]]
static uint64_t static uint64_t
ParseU64(const char *s, size_t length) ParseU64(const char *s, size_t length) noexcept
{ {
return ParseU64(std::string(s, length).c_str()); return ParseU64(std::string(s, length).c_str());
} }
@ -280,6 +280,7 @@ public:
"<a:resourcetype/>" "<a:resourcetype/>"
"<a:getcontenttype/>" "<a:getcontenttype/>"
"<a:getcontentlength/>" "<a:getcontentlength/>"
"<a:getlastmodified/>"
"</a:prop>" "</a:prop>"
"</a:propfind>"); "</a:propfind>");
} }

View File

@ -1,57 +0,0 @@
/*
* Copyright 2014-2019 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "Parser.hxx"
#include "Convert.hxx"
#include <cassert>
#include <stdexcept>
#include <time.h>
std::chrono::system_clock::time_point
ParseTimePoint(const char *s, const char *format)
{
assert(s != nullptr);
assert(format != nullptr);
#ifdef _WIN32
/* TODO: emulate strptime()? */
(void)s;
(void)format;
throw std::runtime_error("Time parsing not implemented on Windows");
#else
struct tm tm{};
const char *end = strptime(s, format, &tm);
if (end == nullptr || *end != 0)
throw std::runtime_error("Failed to parse time stamp");
return TimeGm(tm);
#endif /* !_WIN32 */
}

View File

@ -1,43 +0,0 @@
/*
* Copyright 2014-2019 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef TIME_PARSER_HXX
#define TIME_PARSER_HXX
#include <chrono>
/**
* Parse a time stamp.
*
* Throws std::runtime_error on error.
*/
std::chrono::system_clock::time_point
ParseTimePoint(const char *s, const char *format);
#endif

View File

@ -1,6 +1,5 @@
time = static_library( time = static_library(
'time', 'time',
'Parser.cxx',
'Convert.cxx', 'Convert.cxx',
'ISO8601.cxx', 'ISO8601.cxx',
'Math.cxx', 'Math.cxx',

View File

@ -1,12 +1,12 @@
[wrap-file] [wrap-file]
directory = expat-2.4.8 directory = expat-2.4.9
source_url = https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz source_url = https://github.com/libexpat/libexpat/releases/download/R_2_4_9/expat-2.4.9.tar.xz
source_filename = expat-2.4.8.tar.bz2 source_filename = expat-2.4.9.tar.bz2
source_hash = f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25 source_hash = 6e8c0728fe5c7cd3f93a6acce43046c5e4736c7b4b68e032e9350daa0efc0354
patch_filename = expat_2.4.8-2_patch.zip patch_filename = expat_2.4.9-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.4.8-2/get_patch patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.4.9-1/get_patch
patch_hash = e8855d668a0dee74dee909521c91d6723f564167fcad65507fec63b0f2b41f7e patch_hash = 51b42d935008552f9d6c4d3e7511b84690a2a0c9d90165d1d192fc892f0a4787
wrapdb_version = 2.4.8-2 wrapdb_version = 2.4.9-1
[provide] [provide]
expat = expat_dep expat = expat_dep

View File

@ -303,11 +303,6 @@ if curl_dep.found()
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [
curl_dep, curl_dep,
# Explicitly linking with zlib here works around a linker
# failure on Windows, because our Windows CURL build is
# statically linked and thus declares no dependency on zlib
zlib_dep,
], ],
) )