summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/jsoncpp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/jsoncpp')
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/files/run-ptest4
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb24
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb46
3 files changed, 50 insertions, 24 deletions
diff --git a/meta-oe/recipes-devtools/jsoncpp/files/run-ptest b/meta-oe/recipes-devtools/jsoncpp/files/run-ptest
new file mode 100644
index 0000000000..2cb892b187
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsoncpp/files/run-ptest
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3cd src
4ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}'
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb
deleted file mode 100644
index f68ffd2c0f..0000000000
--- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1SUMMARY = "JSON C++ lib used to read and write json file."
2DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
3 and writer in C++. JSON (JavaScript Object Notation) is a \
4 lightweight data-interchange format. It is easy for humans to \
5 read and write. It is easy for machines to parse and generate."
6
7HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
8
9SECTION = "libs"
10
11LICENSE = "MIT"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926"
13
14PE = "1"
15
16SRCREV = "89e2973c754a9c02a49974d839779b151e95afd6"
17SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https"
18
19
20inherit cmake
21
22EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF -DJSONCPP_WITH_TESTS=OFF"
23
24BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
new file mode 100644
index 0000000000..797f093f33
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
@@ -0,0 +1,46 @@
1SUMMARY = "JSON C++ lib used to read and write json file."
2DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
3 and writer in C++. JSON (JavaScript Object Notation) is a \
4 lightweight data-interchange format. It is easy for humans to \
5 read and write. It is easy for machines to parse and generate."
6
7HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
8
9SECTION = "libs"
10
11LICENSE = "MIT"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926"
13
14PE = "1"
15
16SRCREV = "3455302847cf1e4671f1d8f5fa953fd46a7b1404"
17SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https;tag=${PV} \
18 file://run-ptest \
19 "
20
21inherit cmake ptest
22
23EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF \
24 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DJSONCPP_WITH_TESTS=ON -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF', '-DJSONCPP_WITH_TESTS=OFF', d)} \
25 "
26
27DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}"
28RDEPENDS:${PN}-ptest += "cmake python3-core"
29
30do_install_ptest () {
31 cp -r ${B}/bin ${D}${PTEST_PATH}
32 cp -r ${S}/test ${D}${PTEST_PATH}
33
34 rsync -a ${B}/src ${D}${PTEST_PATH} \
35 --exclude CMakeFiles \
36 --exclude cmake_install.cmake \
37 --exclude Makefile \
38 --exclude generated
39 sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
40 sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
41 sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
42 sed -i -e 's#${PYTHON}#/usr/bin/python3#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
43 sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
44}
45
46BBCLASSEXTEND = "native nativesdk"