From febe91ad5cd90f59b558eca9067361206e428d10e3b7ad798db8bf075cb75742 Mon Sep 17 00:00:00 2001 From: "Matwey V. Kornilov" Date: Fri, 26 Sep 2025 15:37:44 +0300 Subject: [PATCH] Fix build for Erlang 27+ --- 0001-Fix-tests-under-Erlang-27.patch | 26 ++++++++++++++++++++++++++ erlang-jsx.changes | 6 ++++++ erlang-jsx.spec | 5 +++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0001-Fix-tests-under-Erlang-27.patch diff --git a/0001-Fix-tests-under-Erlang-27.patch b/0001-Fix-tests-under-Erlang-27.patch new file mode 100644 index 0000000..5cb0389 --- /dev/null +++ b/0001-Fix-tests-under-Erlang-27.patch @@ -0,0 +1,26 @@ +From 175fe083dac92df581c21c6efa9a254778638904 Mon Sep 17 00:00:00 2001 +From: Igor Goryachev +Date: Wed, 26 Jun 2024 18:34:51 +0300 +Subject: [PATCH] Fix tests under Erlang 27+ + +--- + src/jsx_decoder.erl | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/jsx_decoder.erl b/src/jsx_decoder.erl +index 05c5732..1eeee37 100644 +--- a/src/jsx_decoder.erl ++++ b/src/jsx_decoder.erl +@@ -1102,7 +1102,8 @@ special_number_test_() -> + Cases = [ + % {title, test form, json, opt flags} + {"-0", [{integer, 0}, end_json], <<"-0">>}, +- {"-0.0", [{float, 0.0}, end_json], <<"-0.0">>}, ++ {"0.0", [{float, 0.0}, end_json], <<"0.0">>}, ++ {"-0.0", [{float, -0.0}, end_json], <<"-0.0">>}, + {"0e0", [{float, 0.0}, end_json], <<"0e0">>}, + {"0e4", [{float, 0.0}, end_json], <<"0e4">>}, + {"1e0", [{float, 1.0}, end_json], <<"1e0">>}, +-- +2.51.0 + diff --git a/erlang-jsx.changes b/erlang-jsx.changes index 77fd907..c38662e 100644 --- a/erlang-jsx.changes +++ b/erlang-jsx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 26 12:36:53 UTC 2025 - Matwey Kornilov + +- Add 0001-Fix-tests-under-Erlang-27.patch: + fix build for Erlang 27+ + ------------------------------------------------------------------- Tue Jul 12 09:46:50 UTC 2022 - matwey.kornilov@gmail.com diff --git a/erlang-jsx.spec b/erlang-jsx.spec index ebd860c..41caa37 100644 --- a/erlang-jsx.spec +++ b/erlang-jsx.spec @@ -1,7 +1,7 @@ # # spec file for package erlang-jsx # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,13 +26,14 @@ Group: Development/Libraries/Other URL: https://github.com/talentdeficit/jsx BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: jsx-%{version}.tar.xz +Patch0: 0001-Fix-tests-under-Erlang-27.patch BuildRequires: erlang-rebar %description Jsx is an erlang application for consuming, producing and manipulating json. %prep -%setup -q -n jsx-%{version} +%autosetup -p1 -n jsx-%{version} %build %__rebar compile -- 2.51.1