Viktor Rosendahl 765cfa779d jsoncpp: Fix broken handling of escape characters
Applying this backported patch from upstream fixes the following
BAT test failure:

jsoncpp.jsoncpp_system_tests.TestJsoncpp.test_run_jsoncpp_test
(from systemtests--bmt--BAT) :
* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
/usr/src/debug/jsoncpp/1.9.2-r0/git/src/test_lib_json/main.cpp(3370): expected == result
  Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
  '
  Actual  : '["\"","\\","\b","\f","\n","\r","\t","ɸ","𤭢"]

This test failure happens because aarch64 uses unsigned char as
default type for char, while x86 uses signed char. Also, there
is another bug in the code that is fixed by this upstream patch:

 "static_cast<unsigned char>(*cur) < 0x80" should be:
 "static_cast<unsigned char>(*cur) >= 0x80"

Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-05-05 07:20:59 -04:00

29 lines
932 B
BlitzBasic

SUMMARY = "JSON C++ lib used to read and write json file."
DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
and writer in C++. JSON (JavaScript Object Notation) is a \
lightweight data-interchange format. It is easy for humans to \
read and write. It is easy for machines to parse and generate."
HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
SECTION = "libs"
PE = "1"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
SRCREV = "d2e6a971f4544c55b8e3b25cf96db266971b778f"
SRC_URI = "\
git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https \
file://0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch \
"
S = "${WORKDIR}/git"
inherit cmake
EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF"
BBCLASSEXTEND = "native"