diff options
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.bb | 44 |
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 @@ | |||
| 1 | DESCRIPTION = "Ultralightweight JSON parser in ANSI C" | ||
| 2 | HOMEPAGE = "https://github.com/DaveGamble/cJSON" | ||
| 3 | SECTION = "libs" | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0" | ||
| 6 | |||
| 7 | SRC_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 | " | ||
| 11 | SRCREV = "c859b25da02955fef659d658b8f324b5cde87be3" | ||
| 12 | |||
| 13 | inherit cmake pkgconfig ptest | ||
| 14 | |||
| 15 | RDEPENDS:${PN}-ptest += "cmake" | ||
| 16 | |||
| 17 | do_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 | |||
| 38 | EXTRA_OECMAKE += "\ | ||
| 39 | -DENABLE_CJSON_UTILS=On \ | ||
| 40 | -DENABLE_CUSTOM_COMPILER_FLAGS=OFF \ | ||
| 41 | -DBUILD_SHARED_AND_STATIC_LIBS=On \ | ||
| 42 | " | ||
| 43 | |||
| 44 | BBCLASSEXTEND = "native nativesdk" | ||
