summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/libtoml11/files/0001-fix-add-missing-zero-initialization-to-region.patch35
-rwxr-xr-xmeta-oe/recipes-devtools/libtoml11/files/run-ptest12
-rw-r--r--meta-oe/recipes-devtools/libtoml11/libtoml11_4.2.0.bb39
3 files changed, 86 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/libtoml11/files/0001-fix-add-missing-zero-initialization-to-region.patch b/meta-oe/recipes-devtools/libtoml11/files/0001-fix-add-missing-zero-initialization-to-region.patch
new file mode 100644
index 000000000..cb3d10ee7
--- /dev/null
+++ b/meta-oe/recipes-devtools/libtoml11/files/0001-fix-add-missing-zero-initialization-to-region.patch
@@ -0,0 +1,35 @@
1From 9c7cef94a551cfdbbe2cce262c29221e22643d84 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
3Date: Mon, 19 Aug 2024 06:35:03 +0200
4Subject: [PATCH] fix: add missing zero initialization to region
5
6Fixes below error:
7
8/build/tmp-glibc/work/core2-64-wrs-linux/libtoml11/1_4.2.0-r0/git/include/toml11/fwd/../fwd/../fwd/region_fwd.hpp:49:5: error: '<unnamed>.toml::detail::region::first_' is used uninitialized [-Werror=uninitialized]
9 49 | region(region&&) = default;
10 | ^~~~~~
11
12Upstream-Status: Backport [https://github.com/ToruNiina/toml11/commit/9c7cef94a551cfdbbe2cce262c29221e22643d84]
13
14Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
15---
16 include/toml11/fwd/region_fwd.hpp | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/include/toml11/fwd/region_fwd.hpp b/include/toml11/fwd/region_fwd.hpp
20index b40317d..26f1a9b 100644
21--- a/include/toml11/fwd/region_fwd.hpp
22+++ b/include/toml11/fwd/region_fwd.hpp
23@@ -34,7 +34,8 @@ class region
24 // a value that is constructed manually does not have input stream info
25 region()
26 : source_(nullptr), source_name_(""), length_(0),
27- first_line_(0), first_column_(0), last_line_(0), last_column_(0)
28+ first_(0), first_line_(0), first_column_(0), last_(0), last_line_(0),
29+ last_column_(0)
30 {}
31
32 // a value defined in [first, last).
33--
342.34.1
35
diff --git a/meta-oe/recipes-devtools/libtoml11/files/run-ptest b/meta-oe/recipes-devtools/libtoml11/files/run-ptest
new file mode 100755
index 000000000..9bc480aa7
--- /dev/null
+++ b/meta-oe/recipes-devtools/libtoml11/files/run-ptest
@@ -0,0 +1,12 @@
1#!/bin/sh
2
3cd tests
4for atest in test_* ; do
5 rm -rf tests.log
6 ./${atest} > tests.log 2>&1
7 if [ $? = 0 ] ; then
8 echo "PASS: ${atest}"
9 else
10 echo "FAIL: ${atest}"
11 fi
12done
diff --git a/meta-oe/recipes-devtools/libtoml11/libtoml11_4.2.0.bb b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.2.0.bb
new file mode 100644
index 000000000..758e258a5
--- /dev/null
+++ b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.2.0.bb
@@ -0,0 +1,39 @@
1SUMMARY = "TOML for Modern C++"
2DESCRIPTION = "toml11 is a feature-rich TOML language library for \
3 C++11/14/17/20."
4
5HOMEPAGE = "https://github.com/ToruNiina/toml11"
6
7SECTION = "libs"
8
9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3"
11
12PE = "1"
13
14SRCREV = "cc0bee4fd46ea1f5db147d63ea545208cc9e8405"
15SRCREV_json = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03"
16SRCREV_doctest = "ae7a13539fb71f270b87eb2e874fbac80bc8dda2"
17
18SRC_URI = "git://github.com/ToruNiina/toml11;branch=main;protocol=https \
19 git://github.com/nlohmann/json;destsuffix=git/tests/extlib/json;name=json;branch=develop;protocol=https \
20 git://github.com/doctest/doctest;destsuffix=git/tests/extlib/doctest;name=doctest;branch=master;protocol=https \
21 file://0001-fix-add-missing-zero-initialization-to-region.patch \
22 file://run-ptest \
23"
24SRCREV_FORMAT = "json_doctest"
25
26S = "${WORKDIR}/git"
27
28inherit cmake ptest
29
30EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \
31 -DTOML11_BUILD_TESTS=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "ON", "OFF", d)} \
32"
33
34ALLOW_EMPTY:${PN} = "1"
35
36do_install_ptest () {
37 install -d ${D}${PTEST_PATH}/tests
38 cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests
39}