summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/libtoml11
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/libtoml11')
-rw-r--r--meta-oe/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch46
-rwxr-xr-xmeta-oe/recipes-devtools/libtoml11/files/run-ptest12
-rw-r--r--meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb38
3 files changed, 96 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch b/meta-oe/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch
new file mode 100644
index 0000000000..c8c9922d55
--- /dev/null
+++ b/meta-oe/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch
@@ -0,0 +1,46 @@
1From dee78f822d8a5b985e565e5c1ef42a59557aa8fc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Mar 2025 11:35:46 -0800
4Subject: [PATCH] Remove whitespace in operator""
5
6Clang 20+ errors about this whitespace.
7
8Fixes
9include/toml11/impl/../fwd/literal_fwd.hpp:22:26: error: identifier '_toml' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
10| 22 | ::toml::value operator"" _toml(const char* str, std::size_t len);
11| | ~~~~~~~~~~~^~~~~
12| | operator""_toml
13
14Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/285]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 include/toml11/fwd/literal_fwd.hpp | 2 +-
18 include/toml11/impl/literal_impl.hpp | 2 +-
19 2 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/include/toml11/fwd/literal_fwd.hpp b/include/toml11/fwd/literal_fwd.hpp
22index e46612c..82f62b7 100644
23--- a/include/toml11/fwd/literal_fwd.hpp
24+++ b/include/toml11/fwd/literal_fwd.hpp
25@@ -19,7 +19,7 @@ inline namespace literals
26 inline namespace toml_literals
27 {
28
29-::toml::value operator"" _toml(const char* str, std::size_t len);
30+::toml::value operator""_toml(const char* str, std::size_t len);
31
32 #if defined(TOML11_HAS_CHAR8_T)
33 // value of u8"" literal has been changed from char to char8_t and char8_t is
34diff --git a/include/toml11/impl/literal_impl.hpp b/include/toml11/impl/literal_impl.hpp
35index e8298c2..067d4ed 100644
36--- a/include/toml11/impl/literal_impl.hpp
37+++ b/include/toml11/impl/literal_impl.hpp
38@@ -115,7 +115,7 @@ inline namespace toml_literals
39 {
40
41 TOML11_INLINE ::toml::value
42-operator"" _toml(const char* str, std::size_t len)
43+operator""_toml(const char* str, std::size_t len)
44 {
45 if(len == 0)
46 {
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 0000000000..9bc480aa7f
--- /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.4.0.bb b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
new file mode 100644
index 0000000000..38786b79ed
--- /dev/null
+++ b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
@@ -0,0 +1,38 @@
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 = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286"
15SRCREV_json = "8c391e04fe4195d8be862c97f38cfe10e2a3472e"
16SRCREV_doctest = "ae7a13539fb71f270b87eb2e874fbac80bc8dda2"
17
18SRC_URI = "git://github.com/ToruNiina/toml11;branch=main;protocol=https \
19 git://github.com/nlohmann/json;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/tests/extlib/json;name=json;branch=develop;protocol=https \
20 git://github.com/doctest/doctest;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/tests/extlib/doctest;name=doctest;branch=master;protocol=https \
21 file://0001-Remove-whitespace-in-operator.patch \
22 file://run-ptest \
23"
24SRCREV_FORMAT = "json_doctest"
25
26
27inherit cmake ptest
28
29EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \
30 -DTOML11_BUILD_TESTS=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "ON", "OFF", d)} \
31"
32
33ALLOW_EMPTY:${PN} = "1"
34
35do_install_ptest () {
36 install -d ${D}${PTEST_PATH}/tests
37 cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests
38}