mpd: update to 0.22.6.
fix musl tests
This commit is contained in:
parent
d36b4947d9
commit
78d6b14c8c
3 changed files with 62 additions and 2 deletions
36
srcpkgs/mpd/patches/dont-use-glibc-extension.patch
Normal file
36
srcpkgs/mpd/patches/dont-use-glibc-extension.patch
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
From 18f6e76a07245b9cc8d87cd9b582d4e7252494d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
|
||||||
|
Date: Thu, 25 Feb 2021 14:21:36 -0300
|
||||||
|
Subject: [PATCH] storage/plugins/CurlStorage: don't use glibc extension in
|
||||||
|
ParseTimePoint.
|
||||||
|
|
||||||
|
%Z is a glibc extension to strptime, and is a no-op there, due to the
|
||||||
|
mapping between timezone names and their definition (especially when the
|
||||||
|
name comes from a different machine) being ambiguous / impossible. Time
|
||||||
|
in HTTP headers is guaranteed to be UTC.
|
||||||
|
|
||||||
|
Passing an unknown format to strptime() implementations that don't
|
||||||
|
support it will generally cause them to return NULL, which will lead to
|
||||||
|
ParseTimePoint throwing an exception and ParseTimeStamp using an
|
||||||
|
unnecessary fallback.
|
||||||
|
|
||||||
|
Since the timezone name goes at the end of the string, we don't need to
|
||||||
|
use %Z to skip it (could be an issue in a different time stamp format),
|
||||||
|
so simply removing %Z works best.
|
||||||
|
---
|
||||||
|
src/storage/plugins/CurlStorage.cxx | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx
|
||||||
|
index d05b90a31..9d862eb32 100644
|
||||||
|
--- a/src/storage/plugins/CurlStorage.cxx
|
||||||
|
+++ b/src/storage/plugins/CurlStorage.cxx
|
||||||
|
@@ -193,7 +193,7 @@ ParseTimeStamp(const char *s)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// TODO: make this more robust
|
||||||
|
- return ParseTimePoint(s, "%a, %d %b %Y %T %Z");
|
||||||
|
+ return ParseTimePoint(s, "%a, %d %b %Y %T");
|
||||||
|
} catch (...) {
|
||||||
|
return std::chrono::system_clock::time_point::min();
|
||||||
|
}
|
24
srcpkgs/mpd/patches/fix-musl-tests.patch
Normal file
24
srcpkgs/mpd/patches/fix-musl-tests.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
From 634bd4798c4dab00f0a0869fed9a4f31bfbd53fa Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
|
||||||
|
Date: Thu, 25 Feb 2021 13:53:31 -0300
|
||||||
|
Subject: [PATCH] time/ISO8601: don't use glibc extension in strptime.
|
||||||
|
|
||||||
|
Per the manual for strptime, %F is equivalent %Y-%m-%d, so use that
|
||||||
|
directly.
|
||||||
|
---
|
||||||
|
src/time/ISO8601.cxx | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/time/ISO8601.cxx b/src/time/ISO8601.cxx
|
||||||
|
index e2197e3ad..be20ee803 100644
|
||||||
|
--- a/src/time/ISO8601.cxx
|
||||||
|
+++ b/src/time/ISO8601.cxx
|
||||||
|
@@ -202,7 +202,7 @@ ParseISO8601(const char *s)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* parse the date */
|
||||||
|
- const char *end = strptime(s, "%F", &tm);
|
||||||
|
+ const char *end = strptime(s, "%Y-%m-%d", &tm);
|
||||||
|
if (end == nullptr) {
|
||||||
|
/* try without field separators */
|
||||||
|
end = strptime(s, "%Y%m%d", &tm);
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'mpd'
|
# Template file for 'mpd'
|
||||||
pkgname=mpd
|
pkgname=mpd
|
||||||
version=0.22.4
|
version=0.22.6
|
||||||
revision=1
|
revision=1
|
||||||
build_style=meson
|
build_style=meson
|
||||||
configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true
|
configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true
|
||||||
|
@ -37,7 +37,7 @@ license="GPL-2.0-or-later"
|
||||||
homepage="https://www.musicpd.org/"
|
homepage="https://www.musicpd.org/"
|
||||||
changelog="https://raw.githubusercontent.com/MusicPlayerDaemon/MPD/v${version}/NEWS"
|
changelog="https://raw.githubusercontent.com/MusicPlayerDaemon/MPD/v${version}/NEWS"
|
||||||
distfiles="https://www.musicpd.org/download/mpd/${version%.*}/mpd-${version}.tar.xz"
|
distfiles="https://www.musicpd.org/download/mpd/${version%.*}/mpd-${version}.tar.xz"
|
||||||
checksum=891ea993a539246fa8f670346e5aa6c8cc85ce4be739ff12261712b0b3149dd0
|
checksum=2be149a4895c3cb613477f8cf1193593e3d8a1d38a75ffa7d32da8c8316a4d5e
|
||||||
LDFLAGS+=" -Wl,-z,stack-size=1048576"
|
LDFLAGS+=" -Wl,-z,stack-size=1048576"
|
||||||
patch_args="-Np1"
|
patch_args="-Np1"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue