From f9b58e2eaec9e79be5443cda6fc09f0e97b38b3f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 7 Mar 2025 11:43:52 -0800 Subject: libtoml11: Upgrade to 4.4.0 Fix build with clang-20 while here Signed-off-by: Khem Raj --- .../files/0001-Remove-whitespace-in-operator.patch | 46 ++++++++++++++++++++++ .../recipes-devtools/libtoml11/libtoml11_4.3.0.bb | 38 ------------------ .../recipes-devtools/libtoml11/libtoml11_4.4.0.bb | 39 ++++++++++++++++++ 3 files changed, 85 insertions(+), 38 deletions(-) create mode 100644 meta-oe/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch delete mode 100644 meta-oe/recipes-devtools/libtoml11/libtoml11_4.3.0.bb create mode 100644 meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb 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 @@ +From dee78f822d8a5b985e565e5c1ef42a59557aa8fc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Mar 2025 11:35:46 -0800 +Subject: [PATCH] Remove whitespace in operator"" + +Clang 20+ errors about this whitespace. + +Fixes +include/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] +| 22 | ::toml::value operator"" _toml(const char* str, std::size_t len); +| | ~~~~~~~~~~~^~~~~ +| | operator""_toml + +Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/285] +Signed-off-by: Khem Raj +--- + include/toml11/fwd/literal_fwd.hpp | 2 +- + include/toml11/impl/literal_impl.hpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/toml11/fwd/literal_fwd.hpp b/include/toml11/fwd/literal_fwd.hpp +index e46612c..82f62b7 100644 +--- a/include/toml11/fwd/literal_fwd.hpp ++++ b/include/toml11/fwd/literal_fwd.hpp +@@ -19,7 +19,7 @@ inline namespace literals + inline namespace toml_literals + { + +-::toml::value operator"" _toml(const char* str, std::size_t len); ++::toml::value operator""_toml(const char* str, std::size_t len); + + #if defined(TOML11_HAS_CHAR8_T) + // value of u8"" literal has been changed from char to char8_t and char8_t is +diff --git a/include/toml11/impl/literal_impl.hpp b/include/toml11/impl/literal_impl.hpp +index e8298c2..067d4ed 100644 +--- a/include/toml11/impl/literal_impl.hpp ++++ b/include/toml11/impl/literal_impl.hpp +@@ -115,7 +115,7 @@ inline namespace toml_literals + { + + TOML11_INLINE ::toml::value +-operator"" _toml(const char* str, std::size_t len) ++operator""_toml(const char* str, std::size_t len) + { + if(len == 0) + { diff --git a/meta-oe/recipes-devtools/libtoml11/libtoml11_4.3.0.bb b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.3.0.bb deleted file mode 100644 index 9f265ea19a..0000000000 --- a/meta-oe/recipes-devtools/libtoml11/libtoml11_4.3.0.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "TOML for Modern C++" -DESCRIPTION = "toml11 is a feature-rich TOML language library for \ - C++11/14/17/20." - -HOMEPAGE = "https://github.com/ToruNiina/toml11" - -SECTION = "libs" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3" - -PE = "1" - -SRCREV = "499be3c177bcf9b42848d5d9567153e4edfcbc8a" -SRCREV_json = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03" -SRCREV_doctest = "ae7a13539fb71f270b87eb2e874fbac80bc8dda2" - -SRC_URI = "git://github.com/ToruNiina/toml11;branch=main;protocol=https \ - git://github.com/nlohmann/json;destsuffix=git/tests/extlib/json;name=json;branch=develop;protocol=https \ - git://github.com/doctest/doctest;destsuffix=git/tests/extlib/doctest;name=doctest;branch=master;protocol=https \ - file://run-ptest \ -" -SRCREV_FORMAT = "json_doctest" - -S = "${WORKDIR}/git" - -inherit cmake ptest - -EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \ - -DTOML11_BUILD_TESTS=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "ON", "OFF", d)} \ -" - -ALLOW_EMPTY:${PN} = "1" - -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests -} 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..5b357e2492 --- /dev/null +++ b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "TOML for Modern C++" +DESCRIPTION = "toml11 is a feature-rich TOML language library for \ + C++11/14/17/20." + +HOMEPAGE = "https://github.com/ToruNiina/toml11" + +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3" + +PE = "1" + +SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" +SRCREV_json = "8c391e04fe4195d8be862c97f38cfe10e2a3472e" +SRCREV_doctest = "ae7a13539fb71f270b87eb2e874fbac80bc8dda2" + +SRC_URI = "git://github.com/ToruNiina/toml11;branch=main;protocol=https \ + git://github.com/nlohmann/json;destsuffix=git/tests/extlib/json;name=json;branch=develop;protocol=https \ + git://github.com/doctest/doctest;destsuffix=git/tests/extlib/doctest;name=doctest;branch=master;protocol=https \ + file://0001-Remove-whitespace-in-operator.patch \ + file://run-ptest \ +" +SRCREV_FORMAT = "json_doctest" + +S = "${WORKDIR}/git" + +inherit cmake ptest + +EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \ + -DTOML11_BUILD_TESTS=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "ON", "OFF", d)} \ +" + +ALLOW_EMPTY:${PN} = "1" + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests +} -- cgit v1.2.3-54-g00ecf