summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb')
-rw-r--r--meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb
new file mode 100644
index 0000000000..d914018331
--- /dev/null
+++ b/meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb
@@ -0,0 +1,44 @@
1DESCRIPTION = "Ultralightweight JSON parser in ANSI C"
2HOMEPAGE = "https://github.com/DaveGamble/cJSON"
3SECTION = "libs"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0"
6
7SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https \
8 file://run-ptest \
9 file://0001-allow-build-with-cmake-4.patch \
10 "
11SRCREV = "c859b25da02955fef659d658b8f324b5cde87be3"
12
13inherit cmake pkgconfig ptest
14
15RDEPENDS:${PN}-ptest += "cmake"
16
17do_install_ptest() {
18 # create directories
19 install -d ${D}${PTEST_PATH} ${D}${PTEST_PATH}/tests ${D}${PTEST_PATH}/fuzzing
20 install -d ${D}${PTEST_PATH}/tests/inputs ${D}${PTEST_PATH}/tests/json-patch-tests
21 # CTestTestfiles.cmake contain fully defined path generated by cmake.
22 # Change the fully defined path to ptest path on the target
23 sed s#${B}#${PTEST_PATH}# ${B}/CTestTestfile.cmake > ${D}${PTEST_PATH}/CTestTestfile.cmake
24 sed s#${B}#${PTEST_PATH}# ${B}/tests/CTestTestfile.cmake > ${D}${PTEST_PATH}/tests/CTestTestfile.cmake
25 sed s#${B}#${PTEST_PATH}# ${B}/fuzzing/CTestTestfile.cmake > ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake
26 # The cmake files also contain full paths to original CMakeLists.txt file in _BACKTRACE_TRIPLES property;
27 # these are not needed for successful ptests as we don't install the CMakeLists.txt files anyway.
28 sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/CTestTestfile.cmake
29 sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/tests/CTestTestfile.cmake
30 sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake
31 # install test artifacts
32 install ${B}/cJSON_test ${D}${PTEST_PATH}
33 install ${B}/tests/cjson_add ${B}/tests/*_tests ${B}/tests/parse_* ${B}/tests/print_* ${B}/tests/readme_examples ${D}${PTEST_PATH}/tests/
34 install ${B}/tests/inputs/* ${D}${PTEST_PATH}/tests/inputs
35 install ${B}/fuzzing/fuzz_main ${D}${PTEST_PATH}/fuzzing
36}
37
38EXTRA_OECMAKE += "\
39 -DENABLE_CJSON_UTILS=On \
40 -DENABLE_CUSTOM_COMPILER_FLAGS=OFF \
41 -DBUILD_SHARED_AND_STATIC_LIBS=On \
42"
43
44BBCLASSEXTEND = "native nativesdk"