Commit Graph

17 Commits

Author SHA1 Message Date
Mingli Yu aa5e8edabb nlohmann-json: Add ptest support
* Backport 2 patches [1] [2] to fix the build failure under tests dir.

* Fetch the test data during do_fetch phase to avoid internet access
during test as some tests need test data.
 # ./run-ptest
PASS: test-algorithms_cpp11
PASS: test-allocator_cpp11
PASS: test-alt-string_cpp11
PASS: test-assert_macro_cpp11
PASS: test-binary_formats_cpp11
[snip]
PASS: test-unicode5_cpp11
PASS: test-user_defined_input_cpp11
PASS: test-windows_h_cpp11
PASS: test-wstring_cpp11

[1] https://github.com/nlohmann/json/commit/6cec5aefc97ad219b6fd5a4132f88f7c8f6800ee
[2] https://github.com/nlohmann/json/commit/660d0b58565073975d6f5d94365d6cbf150a4cf8

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 013b4d5043)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-11-16 21:49:15 -05:00
Sourav Pramanik 7753dcdf9c nlohmann-json: Avoid usage of nobranch=1
The usage of nobranch=1 in SRC_URI allows using unprotected branches.

This change updates the real branch name in place of nobranch=1.

Signed-off-by: Sourav Kumar Pramanik <pramanik.souravkumar@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit eec3c65b81)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-11-16 21:49:15 -05:00
Tom Hochstein f9c9e7a448 nlohmann-json: Allow empty main package for SDK
The header-only package cannot be included in the SDK without marking
the main package with ALLOW_EMPTY.

Fixes rootfs problem:
```
The following packages have unmet dependencies:
 imx-gpu-sdk : Depends: nlohmann-json but it is not installable
E: Unable to correct problems, you have held broken packages.
```

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-09 15:56:25 -08:00
Wang Mingyu ca831e8d5b nlohmann-json: upgrade 3.10.5 -> 3.11.2
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-08-15 16:27:53 -07:00
Julian Haller 1dda315dea nlohmann-json: Set CVE_PRODUCT according to NVD
NVD uses 'json-for-modern-cpp' as product name for nlohmann-json. See
https://nvd.nist.gov/products/cpe/detail/394565?namingFormat=2.3&orderBy=CPEURI&keyword=json-for-modern-cpp&status=FINAL

Signed-off-by: Julian Haller <julian.haller@philips.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-11 08:03:22 -08:00
wangmy e3d8d558ec nlohmann-json: upgrade 3.10.4 -> 3.10.5
License-Update: year updated to 2022.

Changelog:
=========
Bug fixes
---------
Make sure C++17 filesystem conversions are only used if the compiler supports
it. Furthermore, add defines JSON_HAS_FILESYSTEM and
JSON_HAS_EXPERIMENTAL_FILESYSTEM which can be set to 0 to avoid using
filesystem support altogether.std::filesystem. #3090 #3097 #3101 #3156 #3203
Fix a compilation error with Nvidia CUDA Compiler (NVCC). #3013 #3234

Warnings
---------
Fix a warning for shadowed variables. #3188 #3193
Fix a warning on a pointless comparison. #3227 #2712 #2676 #1390 #755

Improvements
------------
Add a parameter to the update function to recursively merge objects with common
keys. #3006 #3069
Extend std::hash and std::swap to work on any nlohmann::basic_json
specializations rather than just nlohmann::json. #3121

Further Changes
--------------
Tests and CI
Update CI to use Clang 14, GCC 6, and Clang-Tidy 14. #3088
Update cpplint. #3225
Add build step for the Nvidia CUDA Compiler (NVCC). #3227
Remove Travis CI. #3087 #3233
Compile and execute the test suite with C++17. #3101

Documentation
--------------
The mkdocs-based documentation in doc/mkdocs has been totally overworked. It now
has a unified structure, more examples, and contains all information from the
previous Doxygen-based documentation. The single source of truth is now the
documentation on https://json.nlohmann.me and in particular the API
Documentation. #3071
Removed Wandbox online examples. #3071
Fix typos, links, and parameter names in the documentation.
Add more examples. #3071 #3100

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-18 09:01:51 -08:00
Richard Purdie b402a3076f recipes: Update SRC_URI branch and protocols
This patch updates SRC_URIs using git to include branch=master if no branch is set
and also to use protocol=https for github urls as generated by the conversion script
in OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:49 -07:00
zhengruoqin afe89c5521 nlohmann-json: upgrade 3.10.2 -> 3.10.4
Note you can support this project via GitHub sponsors or PayPal.

Bug Fixes
Fix regression bug introduced in release 3.10.0 which broke compilation
for types with an explicit default constructor with default arguments.
#3077 #3079
Fix regression bug introduced in release 3.10.0 which treated the
return values of std::find and std::remove as pointers which could
break compilation. #3081 #3082
Fix converting std::filesystem::path to JSON. Before release 3.10.3,
such a conversion would trigger a stack overflow. Release 3.10.3 then
further broke compilation on Windows. #3070 #3073

Deprecated functions
Passing iterator pairs or pointer/length pairs to parsing functions
(basic_json::parse, basic_json::accept, basic_json::sax_parse,
basic_json::from_cbor, basic_json::from_msgpack, basic_json::from_ubjson,
basic_json::from_bson) via initializer lists is deprecated. Instead,
pass two iterators; for instance, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len}).

The following functions have been deprecated in earlier versions and
will be removed in the next major version (i.e., 4.0.0):

Function iterator_wrapper are deprecated.
Please use the member function items() instead.
Functions friend std::istream& operator<<(basic_json&, std::istream&)
and friend std::ostream& operator>>(const basic_json&, std::ostream&)
are deprecated. Please use friend std::istream& operator>>(std::istream&,
basic_json&) and friend operator<<(std::ostream&, const basic_json&) instead.
All deprecations are annotated with HEDLEY_DEPRECATED_FOR to report
which function to use instead.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-19 09:23:08 -07:00
wangmy 5bfa82d102 nlohmann-json: upgrade 3.9.1 -> 3.10.2
Release date: 2021-08-26
SHA-256: 059743e48b37e41579ee3a92e82e984bfa0d2a9a2b20b175d04db8089f46f047 (json.hpp)
61e605be15e88deeac4582aaf01c09d616f8302edde7adcaba9261ddc3b4ceca (include.zip)

Summary
This release is made days after the 3.10.1 release due to a bug in the release script:
The 3.10.1 release at GitHub contained the correct files,
but the associated tag v3.10.1 points to the wrong commit.
This release is made with a fixed build script. All changes are backward-compatible.

Improvements
Fix the release scripts to correctly tag releases. https://github.com/nlohmann/json/issues/2973
Fix some -Wunused warnings on JSON_DIAGNOSTICS when the library is built without CMake.
https://github.com/nlohmann/json/issues/2975
https://github.com/nlohmann/json/pull/2976

Deprecated functions
Passing iterator pairs or pointer/length pairs to parsing functions
(basic_json::parse, basic_json::accept, basic_json::sax_parse, basic_json::from_cbor,
basic_json::from_msgpack, basic_json::from_ubjson, basic_json::from_bson)
via initializer lists is deprecated.
Instead, pass two iterators; for instance, call basic_json::from_cbor(ptr, ptr+len)
instead of basic_json::from_cbor({ptr, len}).

-License-Update: Copyright year updated to 2021.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-09-05 22:19:55 -07:00
Martin Jansa c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
Zang Ruochen 5f816c126a nlohmann-json: upgrade 3.9.0 -> 3.9.1
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-21 16:35:25 -07:00
Zang Ruochen f60ca848f4 nlohmann-json: upgrade 3.7.3 -> 3.9.0
-License-Update: Copyright year updated to 2020.

-0001-Templatize-basic_json-ctor-from-json_ref.patch
-0001-typo-fix.patch
Removed since these are included in 3.9.0

Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-07-31 13:22:53 -07:00
Andrew Geissler 12b707c52d nlohmann-json: backport gcc10 fix
The following issue and PR describe an issue with nlohmann-json and
GCC10.

https://github.com/nlohmann/json/issues/1920
https://github.com/nlohmann/json/pull/2034

Confirmed that this fixed the issue seen in OpenBMC when pulling in the
latest upstream meta-openembedded.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-05-17 10:23:33 -07:00
Khem Raj 110652d951 nlohmann-json: Upgrade to 3.7.3
Rename recipe to express PV

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-16 19:50:07 -08:00
David Roman 95d95dcb10 nlohmann-json: upgrade 3.3.0 -> 3.7.0 2019-10-25 10:29:52 -07:00
James Feist 69e5fa1485 nlohmann-json: Add symlink to json.hpp and update to 3.3.0
nlohmann-json has examples in their repo that refer to
the header as json.hpp directly, as such many packages
that require nlohmann-json expect json.hpp and not
nlohmann/json.hpp as the cmake file installs. Create symlink
so that access is available by either option. Also update
to release 3.3.0.

Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-10-11 13:52:06 -07:00
James Feist 126f046247 nlohmann-json: Add recipe
nlohmann-json is a c++ header-only json library.

Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-10-04 20:00:52 -07:00