aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-10-11 16:44:00 +0200
committerMarius Bakke <marius@gnu.org>2020-10-13 23:48:15 +0200
commit0caf236b3b5c9b19ee8709865ae7df9c59e7fe9b (patch)
treef1aff1f12fca4558f12f06133584e60cef13e4cb
parent8008ef29f2f13d998e82bbc5bb66f8489321ae85 (diff)
downloadguix-0caf236b3b5c9b19ee8709865ae7df9c59e7fe9b.tar.gz
guix-0caf236b3b5c9b19ee8709865ae7df9c59e7fe9b.zip
gnu: libcyaml: Fix build with libyaml 0.2.5.
* gnu/packages/patches/libcyaml-libyaml-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/web.scm (libcyaml)[source](patches): New field.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/libcyaml-libyaml-compat.patch51
-rw-r--r--gnu/packages/web.scm1
3 files changed, 53 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 72144bbf33..396c0adf5d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1230,6 +1230,7 @@ dist_patch_DATA = \
%D%/packages/patches/libbonobo-activation-test-race.patch \
%D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \
%D%/packages/patches/libcanberra-wayland-crash.patch \
+ %D%/packages/patches/libcyaml-libyaml-compat.patch \
%D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \
%D%/packages/patches/libgit2-mtime-0.patch \
%D%/packages/patches/libgnome-encoding.patch \
diff --git a/gnu/packages/patches/libcyaml-libyaml-compat.patch b/gnu/packages/patches/libcyaml-libyaml-compat.patch
new file mode 100644
index 0000000000..dcb8cb51b8
--- /dev/null
+++ b/gnu/packages/patches/libcyaml-libyaml-compat.patch
@@ -0,0 +1,51 @@
+Fix build against libyaml 0.2.5.
+
+Taken from upstream:
+https://github.com/tlsa/libcyaml/commit/0e947264b947f51f7ea785068637c4bfce5d4171
+
+diff --git a/test/units/save.c b/test/units/save.c
+--- a/test/units/save.c
++++ b/test/units/save.c
+@@ -3476,7 +3476,7 @@ static bool test_save_sequence_null_values_int(
+ ttest_report_ctx_t *report,
+ const cyaml_config_t *config)
+ {
+- static const unsigned char ref[] =
++ static const unsigned char ref1[] =
+ "---\n"
+ "- 7\n"
+ "- 6\n"
+@@ -3487,6 +3487,18 @@ static bool test_save_sequence_null_values_int(
+ "- \n"
+ "- 0\n"
+ "...\n";
++ /* As of libyaml 0.2.5, trailing spaces are not emitted. */
++ static const unsigned char ref2[] =
++ "---\n"
++ "- 7\n"
++ "- 6\n"
++ "- 5\n"
++ "-\n"
++ "- 3\n"
++ "- 2\n"
++ "-\n"
++ "- 0\n"
++ "...\n";
+ static const int d[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
+ static const int *data[] = { d + 0, d + 1, d + 2, NULL,
+ d + 4, d + 5, NULL, d + 7, };
+@@ -3515,11 +3527,12 @@ static bool test_save_sequence_null_values_int(
+ return ttest_fail(&tc, cyaml_strerror(err));
+ }
+
+- if (len != YAML_LEN(ref) || memcmp(ref, buffer, len) != 0) {
++ if ((len != YAML_LEN(ref1) || memcmp(ref1, buffer, len) != 0) &&
++ (len != YAML_LEN(ref2) || memcmp(ref2, buffer, len) != 0)) {
+ return ttest_fail(&tc, "Bad data:\n"
+ "EXPECTED (%zu):\n\n%.*s\n\n"
+ "GOT (%zu):\n\n%.*s\n",
+- YAML_LEN(ref), YAML_LEN(ref), ref,
++ YAML_LEN(ref1), YAML_LEN(ref1), ref1,
+ len, len, buffer);
+ }
+
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ced6dc2eee..0229a8c6f4 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5081,6 +5081,7 @@ written in C. It is developed as part of the NetSurf project.")
(url "https://github.com/tlsa/libcyaml")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (patches (search-patches "libcyaml-yaml-compat.patch"))
(sha256
(base32 "0428p0rwq71nhh5nzcbapsbrjxa0x5l6h6ns32nxv7j624f0zd93"))))
(build-system gnu-build-system)
.scm?id=a694ef48023b83bd2938a62c1830aee6cc2513b4'>gnu: mpdris2: Remove input labels and add inputs....* gnu/packages/mpd.scm (mpdris2)[arguments]: Use G-expressions. Remove trailing #T from phase. [inputs]: Remove labels. Add BASH-MINIMAL and PYTHON-MUTAGEN. [native-inputs]: Remove labels. [description]: Use complete sentence. Simon Streit 2023-02-12gnu: mympd: Update to 10.2.3....* gnu/packages/mpd.scm (mympd): Update to 10.2.3. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Bruno Victal 2023-02-11gnu: mympd: Update to 10.2.2....* gnu/packages/mpd.scm (mympd): Update to 10.2.2. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Bruno Victal 2023-02-05gnu: mpd: Update to 0.23.12....* gnu/packages/mpd.scm (mpd): Update to 0.23.12. Signed-off-by: Leo Famulari <leo@famulari.name> Bruno Victal 2023-02-05gnu: mpd: Add missing inputs....Enable more features for MPD. * gnu/packages/mpd.scm (mpd)[inputs]: Add liburing, chromaprint, expat, libgme, libnfs, libopenmpt, libshout, pcre2, soxr, yajl and zziplib. Signed-off-by: Leo Famulari <leo@famulari.name> Bruno Victal 2023-02-03gnu: mympd: Update to 10.2.1....* gnu/packages/mpd.scm (mympd): Update to 10.2.1. Signed-off-by: Christopher Baines <mail@cbaines.net> Bruno Victal 2023-01-29gnu: mpdevil: Update to 1.10.0...* gnu/packages/mpd.scm (mpdevil): Update to 1.10.0. [inputs]: Add python-pycairo. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Simon Streit 2023-01-28gnu: mympd: Update to 10.2.0....* gnu/packages/mpd.scm (mympd): Update to 10.2.0. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Bruno Victal 2023-01-08gnu: Switch to default pipewire....This is a follow-up of: 590700ce00177a826872c867066eeba6eb7c4641. * gnu/packages/kde-plasma.scm (kwin, plasma-desktop, plasma-workspace)[inputs]: Switch to pipewire. * gnu/packages/mpd.scm (mpd)[inputs]: Ditto. Mathieu Othacehe 2022-12-11gnu: mpd: Update to 0.23.11....* gnu/packages/mpd.scm (mpd): Update to 0.23.11. Tobias Geerinckx-Rice 2022-12-13gnu: mympd: Update to 10.1.6....* gnu/packages/mpd.scm (mympd): Update to 10.1.6. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Bruno Victal 2022-12-11gnu: yajl: Drop custom ‘lib-’ prefix....* gnu/packages/web.scm (yajl): New variable, renamed from… (libyajl): …this one, which is now a DEPRECATED-PACKAGE alias of yajl. Adjust all users. Tobias Geerinckx-Rice 2022-11-28gnu: mympd: Update to 10.1.3...* gnu/packages/mpd.scm (mympd): Update to 10.1.3. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Bruno Victal 2022-11-24gnu: Add mympd....* gnu/packages/mpd.scm (mympd): New variable. Signed-off-by: Christopher Baines <mail@cbaines.net> Bruno Victal 2022-11-22gnu: ashuffle: Update to 3.13.4....* gnu/packages/mpd.scm (ashuffle): Update to 3.13.4. [inputs]: Add ABSEIL-CPP-CXXSTD17, GOOGLETEST, and YAML-CPP. [arguments]: New field. Marius Bakke