From 22b9cd61a06be2f75c38db4ccb200a620771fc8d Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Tue, 16 Sep 2025 17:41:12 +0800 Subject: cjson: upgrade 1.7.18 -> 1.7.19 0001-allow-build-with-cmake-4.patch refreshed for 1.7.19 Signed-off-by: Wang Mingyu Signed-off-by: Khem Raj --- .../cjson/0001-allow-build-with-cmake-4.patch | 9 ++--- meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb | 44 ---------------------- meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb | 44 ++++++++++++++++++++++ 3 files changed, 47 insertions(+), 50 deletions(-) delete mode 100644 meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb create mode 100644 meta-oe/recipes-devtools/cjson/cjson_1.7.19.bb diff --git a/meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch index 7bd608ca0a..05b19d257a 100644 --- a/meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch +++ b/meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch @@ -1,4 +1,4 @@ -From 8622490d650ba4d107561a0e8f3cf881fa0247c7 Mon Sep 17 00:00:00 2001 +From 13a050b263ab53c1dc8d05b12e65c21da7c054b3 Mon Sep 17 00:00:00 2001 From: Alper Ak Date: Tue, 8 Jul 2025 15:09:11 +0300 Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+ @@ -26,7 +26,7 @@ Signed-off-by: Alper Ak 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 36a6cb5..9428da5 100644 +index c7ca27f..59e4af5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ @@ -35,7 +35,4 @@ index 36a6cb5..9428da5 100644 +cmake_minimum_required(VERSION 3.5) project(cJSON - VERSION 1.7.18 --- -2.43.0 - + VERSION 1.7.19 diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb deleted file mode 100644 index 7ece0065ba..0000000000 --- a/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb +++ /dev/null @@ -1,44 +0,0 @@ -DESCRIPTION = "Ultralightweight JSON parser in ANSI C" -HOMEPAGE = "https://github.com/DaveGamble/cJSON" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0" - -SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https \ - file://run-ptest \ - file://0001-allow-build-with-cmake-4.patch \ - " -SRCREV = "acc76239bee01d8e9c858ae2cab296704e52d916" - -inherit cmake pkgconfig ptest - -RDEPENDS:${PN}-ptest += "cmake" - -do_install_ptest() { - # create directories - install -d ${D}${PTEST_PATH} ${D}${PTEST_PATH}/tests ${D}${PTEST_PATH}/fuzzing - install -d ${D}${PTEST_PATH}/tests/inputs ${D}${PTEST_PATH}/tests/json-patch-tests - # CTestTestfiles.cmake contain fully defined path generated by cmake. - # Change the fully defined path to ptest path on the target - sed s#${B}#${PTEST_PATH}# ${B}/CTestTestfile.cmake > ${D}${PTEST_PATH}/CTestTestfile.cmake - sed s#${B}#${PTEST_PATH}# ${B}/tests/CTestTestfile.cmake > ${D}${PTEST_PATH}/tests/CTestTestfile.cmake - sed s#${B}#${PTEST_PATH}# ${B}/fuzzing/CTestTestfile.cmake > ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake - # The cmake files also contain full paths to original CMakeLists.txt file in _BACKTRACE_TRIPLES property; - # these are not needed for successful ptests as we don't install the CMakeLists.txt files anyway. - sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/CTestTestfile.cmake - sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/tests/CTestTestfile.cmake - sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake - # install test artifacts - install ${B}/cJSON_test ${D}${PTEST_PATH} - install ${B}/tests/cjson_add ${B}/tests/*_tests ${B}/tests/parse_* ${B}/tests/print_* ${B}/tests/readme_examples ${D}${PTEST_PATH}/tests/ - install ${B}/tests/inputs/* ${D}${PTEST_PATH}/tests/inputs - install ${B}/fuzzing/fuzz_main ${D}${PTEST_PATH}/fuzzing -} - -EXTRA_OECMAKE += "\ - -DENABLE_CJSON_UTILS=On \ - -DENABLE_CUSTOM_COMPILER_FLAGS=OFF \ - -DBUILD_SHARED_AND_STATIC_LIBS=On \ -" - -BBCLASSEXTEND = "native nativesdk" 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 @@ +DESCRIPTION = "Ultralightweight JSON parser in ANSI C" +HOMEPAGE = "https://github.com/DaveGamble/cJSON" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0" + +SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https \ + file://run-ptest \ + file://0001-allow-build-with-cmake-4.patch \ + " +SRCREV = "c859b25da02955fef659d658b8f324b5cde87be3" + +inherit cmake pkgconfig ptest + +RDEPENDS:${PN}-ptest += "cmake" + +do_install_ptest() { + # create directories + install -d ${D}${PTEST_PATH} ${D}${PTEST_PATH}/tests ${D}${PTEST_PATH}/fuzzing + install -d ${D}${PTEST_PATH}/tests/inputs ${D}${PTEST_PATH}/tests/json-patch-tests + # CTestTestfiles.cmake contain fully defined path generated by cmake. + # Change the fully defined path to ptest path on the target + sed s#${B}#${PTEST_PATH}# ${B}/CTestTestfile.cmake > ${D}${PTEST_PATH}/CTestTestfile.cmake + sed s#${B}#${PTEST_PATH}# ${B}/tests/CTestTestfile.cmake > ${D}${PTEST_PATH}/tests/CTestTestfile.cmake + sed s#${B}#${PTEST_PATH}# ${B}/fuzzing/CTestTestfile.cmake > ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake + # The cmake files also contain full paths to original CMakeLists.txt file in _BACKTRACE_TRIPLES property; + # these are not needed for successful ptests as we don't install the CMakeLists.txt files anyway. + sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/CTestTestfile.cmake + sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/tests/CTestTestfile.cmake + sed -i s#${S}#${PTEST_PATH}#g ${D}${PTEST_PATH}/fuzzing/CTestTestfile.cmake + # install test artifacts + install ${B}/cJSON_test ${D}${PTEST_PATH} + install ${B}/tests/cjson_add ${B}/tests/*_tests ${B}/tests/parse_* ${B}/tests/print_* ${B}/tests/readme_examples ${D}${PTEST_PATH}/tests/ + install ${B}/tests/inputs/* ${D}${PTEST_PATH}/tests/inputs + install ${B}/fuzzing/fuzz_main ${D}${PTEST_PATH}/fuzzing +} + +EXTRA_OECMAKE += "\ + -DENABLE_CJSON_UTILS=On \ + -DENABLE_CUSTOM_COMPILER_FLAGS=OFF \ + -DBUILD_SHARED_AND_STATIC_LIBS=On \ +" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf