diff options
| -rw-r--r-- | meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch | 29 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch | 71 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch | 41 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch | 43 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.3.0.bb (renamed from meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.2.0.bb) | 12 |
5 files changed, 3 insertions, 193 deletions
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch deleted file mode 100644 index 6e6a4b93e8..0000000000 --- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | From 35939115142db6cd366ab11b29692a0179338ddf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Parian Golchin <Parian.Golchin@iris-sensing.com> | ||
| 3 | Date: Fri, 18 Aug 2023 15:54:25 +0200 | ||
| 4 | Subject: [PATCH 1/3] Set Json_validator Install off if it finds it via linking | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [newer version of cmake in main branch] | ||
| 7 | |||
| 8 | Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com> | ||
| 9 | --- | ||
| 10 | CMakeLists.txt | 3 +++ | ||
| 11 | 1 file changed, 3 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 14 | index f636734..9e4587f 100644 | ||
| 15 | --- a/CMakeLists.txt | ||
| 16 | +++ b/CMakeLists.txt | ||
| 17 | @@ -55,6 +55,9 @@ option(JSON_VALIDATOR_BUILD_EXAMPLES "Build examples" ${JSON_VALIDATOR_IS_TOP_LE | ||
| 18 | |||
| 19 | if(NOT TARGET nlohmann_json::nlohmann_json) | ||
| 20 | find_package(nlohmann_json REQUIRED) | ||
| 21 | +else() | ||
| 22 | + message(STATUS "Found nlohmann_json::nlohmann_json-target - linking with it") | ||
| 23 | + set(JSON_VALIDATOR_INSTALL OFF) | ||
| 24 | endif() | ||
| 25 | |||
| 26 | target_link_libraries( | ||
| 27 | -- | ||
| 28 | 2.25.1 | ||
| 29 | |||
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch deleted file mode 100644 index 1c4b871bb6..0000000000 --- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch +++ /dev/null | |||
| @@ -1,71 +0,0 @@ | |||
| 1 | From 2065015da40cf79dd8ec9e3f186538e17c3b592f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Robert Joslyn <robert.joslyn@redrectangle.org> | ||
| 3 | Date: Wed, 30 Nov 2022 13:07:29 -0800 | ||
| 4 | Subject: [PATCH 2/3] Fix assumed signed char | ||
| 5 | |||
| 6 | The code assumes that char is signed, but whether char is signed or | ||
| 7 | unsigned is implementation defined. On some architectures like PowerPC, | ||
| 8 | GCC treats char as unsigned resulting in compile errors: | ||
| 9 | |||
| 10 | smtp-address-validator.cpp:213:1: error: narrowing conversion of '-32' from 'int' to 'char' [-Wnarrowing] | ||
| 11 | |||
| 12 | Fix this by specifying signed char. | ||
| 13 | |||
| 14 | Upstream-Status: Backport [https://github.com/pboettch/json-schema-validator/commit/491ac44026e08f31790f5cacffa62e168bb35e32] | ||
| 15 | |||
| 16 | Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com> | ||
| 17 | --- | ||
| 18 | src/smtp-address-validator.cpp | 16 ++++++++-------- | ||
| 19 | 1 file changed, 8 insertions(+), 8 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/src/smtp-address-validator.cpp b/src/smtp-address-validator.cpp | ||
| 22 | index a63ead0..3903b51 100644 | ||
| 23 | --- a/src/smtp-address-validator.cpp | ||
| 24 | +++ b/src/smtp-address-validator.cpp | ||
| 25 | @@ -63,7 +63,7 @@ static const short _address_key_offsets[] = { | ||
| 26 | 1363, 1365, 1367, 1368, 1370, 1388, 0 | ||
| 27 | }; | ||
| 28 | |||
| 29 | -static const char _address_trans_keys[] = { | ||
| 30 | +static const signed char _address_trans_keys[] = { | ||
| 31 | -32, -19, -16, -12, 34, 45, 61, 63, | ||
| 32 | -62, -33, -31, -17, -15, -13, 33, 39, | ||
| 33 | 42, 43, 47, 57, 65, 90, 94, 126, | ||
| 34 | @@ -711,7 +711,7 @@ bool is_address(const char* p, const char* pe) | ||
| 35 | { | ||
| 36 | int _klen; | ||
| 37 | unsigned int _trans = 0; | ||
| 38 | - const char * _keys; | ||
| 39 | + const signed char * _keys; | ||
| 40 | const signed char * _acts; | ||
| 41 | unsigned int _nacts; | ||
| 42 | _resume: {} | ||
| 43 | @@ -728,9 +728,9 @@ bool is_address(const char* p, const char* pe) | ||
| 44 | |||
| 45 | _klen = (int)_address_single_lengths[cs]; | ||
| 46 | if ( _klen > 0 ) { | ||
| 47 | - const char *_lower = _keys; | ||
| 48 | - const char *_upper = _keys + _klen - 1; | ||
| 49 | - const char *_mid; | ||
| 50 | + const signed char *_lower = _keys; | ||
| 51 | + const signed char *_upper = _keys + _klen - 1; | ||
| 52 | + const signed char *_mid; | ||
| 53 | while ( 1 ) { | ||
| 54 | if ( _upper < _lower ) { | ||
| 55 | _keys += _klen; | ||
| 56 | @@ -752,9 +752,9 @@ bool is_address(const char* p, const char* pe) | ||
| 57 | |||
| 58 | _klen = (int)_address_range_lengths[cs]; | ||
| 59 | if ( _klen > 0 ) { | ||
| 60 | - const char *_lower = _keys; | ||
| 61 | - const char *_upper = _keys + (_klen<<1) - 2; | ||
| 62 | - const char *_mid; | ||
| 63 | + const signed char *_lower = _keys; | ||
| 64 | + const signed char *_upper = _keys + (_klen<<1) - 2; | ||
| 65 | + const signed char *_mid; | ||
| 66 | while ( 1 ) { | ||
| 67 | if ( _upper < _lower ) { | ||
| 68 | _trans += (unsigned int)_klen; | ||
| 69 | -- | ||
| 70 | 2.25.1 | ||
| 71 | |||
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch deleted file mode 100644 index eac997ae58..0000000000 --- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | From fa49c29942763285c51b7d2dea417d9f51e4961f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sven Fink <sven.fink@wipotec.com> | ||
| 3 | Date: Fri, 13 Jan 2023 09:15:42 +0100 | ||
| 4 | Subject: [PATCH 3/3] For root value, use empty pointer | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/pboettch/json-schema-validator/commit/59c9d6200bf3cd54b4fc717ec1660c91eddb4d1a] | ||
| 7 | |||
| 8 | Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com> | ||
| 9 | --- | ||
| 10 | src/json-validator.cpp | 8 ++++++++ | ||
| 11 | 1 file changed, 8 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/src/json-validator.cpp b/src/json-validator.cpp | ||
| 14 | index 7f34553..3c73d98 100644 | ||
| 15 | --- a/src/json-validator.cpp | ||
| 16 | +++ b/src/json-validator.cpp | ||
| 17 | @@ -553,6 +553,9 @@ class type_schema : public schema | ||
| 18 | else_->validate(ptr, instance, patch, e); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | + if (instance.is_null()) { | ||
| 22 | + patch.add(nlohmann::json::json_pointer{}, default_value_); | ||
| 23 | + } | ||
| 24 | } | ||
| 25 | |||
| 26 | protected: | ||
| 27 | @@ -1134,6 +1137,11 @@ public: | ||
| 28 | propertyNames_ = schema::make(attr.value(), root, {"propertyNames"}, uris); | ||
| 29 | sch.erase(attr); | ||
| 30 | } | ||
| 31 | + | ||
| 32 | + attr = sch.find("default"); | ||
| 33 | + if (attr != sch.end()) { | ||
| 34 | + set_default_value(*attr); | ||
| 35 | + } | ||
| 36 | } | ||
| 37 | }; | ||
| 38 | |||
| 39 | -- | ||
| 40 | 2.25.1 | ||
| 41 | |||
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch deleted file mode 100644 index 8199e4f8d4..0000000000 --- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0004-cmake-Use-GNUInstallDirs.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | From a42d374aa260caec5f683c75d0db322811e51ab9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 19 Mar 2022 22:40:49 -0700 | ||
| 4 | Subject: [PATCH] cmake: Use GNUInstallDirs | ||
| 5 | |||
| 6 | This helps it make it platform independent, some platforms e.g. | ||
| 7 | ppc64/linux use /usr/lib64 for system libraries | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/pboettch/json-schema-validator/pull/197] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | CMakeLists.txt | 8 +++++--- | ||
| 13 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 16 | index 9e4587f..3eff234 100644 | ||
| 17 | --- a/CMakeLists.txt | ||
| 18 | +++ b/CMakeLists.txt | ||
| 19 | @@ -93,11 +93,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
| 20 | endif() | ||
| 21 | endif() | ||
| 22 | |||
| 23 | +include(GNUInstallDirs) | ||
| 24 | + | ||
| 25 | if(JSON_VALIDATOR_INSTALL) | ||
| 26 | install(TARGETS nlohmann_json_schema_validator | ||
| 27 | EXPORT ${PROJECT_NAME}Targets | ||
| 28 | - LIBRARY DESTINATION lib | ||
| 29 | - ARCHIVE DESTINATION lib | ||
| 30 | + LIBRARY DESTINATION ${LIBDIR} | ||
| 31 | + ARCHIVE DESTINATION ${LIBDIR} | ||
| 32 | RUNTIME DESTINATION bin) | ||
| 33 | |||
| 34 | install(FILES src/nlohmann/json-schema.hpp | ||
| 35 | @@ -129,7 +131,7 @@ endif() | ||
| 36 | |||
| 37 | if(JSON_VALIDATOR_INSTALL) | ||
| 38 | # Set the install path to the cmake config files (Relative, so install works correctly under Hunter as well) | ||
| 39 | - set(INSTALL_CMAKE_DIR "lib/cmake/${PROJECT_NAME}") | ||
| 40 | + set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) | ||
| 41 | set(INSTALL_CMAKEDIR_ROOT share/cmake) | ||
| 42 | |||
| 43 | # Install Targets | ||
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.2.0.bb b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.3.0.bb index c6e910a137..4561f1b285 100644 --- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.2.0.bb +++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator_2.3.0.bb | |||
| @@ -2,19 +2,13 @@ SUMMARY = "JSON schema validator for JSON for Modern C++" | |||
| 2 | LICENSE = "MIT" | 2 | LICENSE = "MIT" |
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c441d022da1b1663c70181a32225d006" | 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c441d022da1b1663c70181a32225d006" |
| 4 | 4 | ||
| 5 | SRC_URI = "git://github.com/pboettch/json-schema-validator;branch=main;protocol=https \ | 5 | SRC_URI = "git://github.com/pboettch/json-schema-validator;branch=main;protocol=https" |
| 6 | file://0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch \ | 6 | SRCREV = "349cba9f7e3cb423bbc1811bdd9f6770f520b468" |
| 7 | file://0002-Fix-assumed-signed-char.patch \ | ||
| 8 | file://0003-For-root-value-use-empty-pointer.patch \ | ||
| 9 | file://0004-cmake-Use-GNUInstallDirs.patch \ | ||
| 10 | " | ||
| 11 | |||
| 12 | SRCREV = "6b17782d6a5d1dee5d2c4fc5d25ffb1123913431" | ||
| 13 | |||
| 14 | 7 | ||
| 15 | DEPENDS += "nlohmann-json" | 8 | DEPENDS += "nlohmann-json" |
| 16 | 9 | ||
| 17 | inherit cmake | 10 | inherit cmake |
| 11 | |||
| 18 | EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DJSON_VALIDATOR_BUILD_TESTS=OFF -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF" | 12 | EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DJSON_VALIDATOR_BUILD_TESTS=OFF -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF" |
| 19 | 13 | ||
| 20 | BBCLASSEXTEND = "native nativesdk" | 14 | BBCLASSEXTEND = "native nativesdk" |
