From: Adam Duskett <adam.duskett@amarulasolutions.com>
To: openembedded-core@lists.openembedded.org
Cc: Adam Duskett <adam.duskett@amarulasolutions.com>
Subject: [PATCH v5 3/8] libtoml11: new recipe
Date: Mon, 23 Feb 2026 16:39:24 +0100 [thread overview]
Message-ID: <20260223153929.2641007-3-adam.duskett@amarulasolutions.com> (raw)
In-Reply-To: <20260223153929.2641007-1-adam.duskett@amarulasolutions.com>
DNF5 requires libtoml. As such, copy libtoml verbatim from
meta-openembedded to openembedded-core.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
meta/conf/distro/include/maintainers.inc | 1 +
.../distro/include/ptest-packagelists.inc | 1 +
.../0001-Remove-whitespace-in-operator.patch | 46 +++++++++++++++++++
.../libtoml11/files/run-ptest | 13 ++++++
.../libtoml11/libtoml11_4.4.0.bb | 36 +++++++++++++++
5 files changed, 97 insertions(+)
create mode 100644 meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch
create mode 100755 meta/recipes-devtools/libtoml11/files/run-ptest
create mode 100644 meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index b5ab35d92a..25edb6eae2 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -405,6 +405,7 @@ RECIPE_MAINTAINER:pn-libsoup = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-libssh2 = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-libssp-nonshared = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER:pn-libtasn1 = "Unassigned <unassigned@yoctoproject.org>"
+RECIPE_MAINTAINER:pn-libtoml11 = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-libtest-fatal-perl = "Tim Orling <tim.orling@konsulko.com>"
RECIPE_MAINTAINER:pn-libtest-needs-perl = "Tim Orling <tim.orling@konsulko.com>"
RECIPE_MAINTAINER:pn-libtest-warnings-perl = "Tim Orling <tim.orling@konsulko.com>"
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 1bb7458fc9..fd301f03e0 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -46,6 +46,7 @@ PTESTS_FAST = "\
libtest-needs-perl \
libtest-warnings-perl \
libtimedate-perl \
+ libtoml11 \
libtry-tiny-perl \
libusb1 \
libxml-namespacesupport-perl \
diff --git a/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch b/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch
new file mode 100644
index 0000000000..9516ee5cb1
--- /dev/null
+++ b/meta/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 <raj.khem@gmail.com>
+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: Backport [https://github.com/ToruNiina/toml11/commit/dee78f822d8a5b985e565e5c1ef42a59557aa8fc]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ 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/recipes-devtools/libtoml11/files/run-ptest b/meta/recipes-devtools/libtoml11/files/run-ptest
new file mode 100755
index 0000000000..4da9e68cc5
--- /dev/null
+++ b/meta/recipes-devtools/libtoml11/files/run-ptest
@@ -0,0 +1,13 @@
+#!/usr/bin/env sh
+
+cd tests || exit 1
+
+rm -rf tests.log
+
+for atest in test_* ; do
+ if ./"${atest}" >> tests.log 2>&1; then
+ echo "PASS: ${atest}"
+ else
+ echo "FAIL: ${atest}"
+ fi
+done
diff --git a/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb b/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
new file mode 100644
index 0000000000..7e097e4612
--- /dev/null
+++ b/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
@@ -0,0 +1,36 @@
+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"
+BUGTRACKER = "https://github.com/ToruNiina/toml11/issues"
+CVE_PRODUCT = "libtoml11"
+
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3"
+
+PE = "1"
+
+SRC_URI = "\
+ gitsm://github.com/ToruNiina/toml11.git;protocol=https;branch=main;tag=v${PV} \
+ file://0001-Remove-whitespace-in-operator.patch \
+ file://run-ptest \
+"
+SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286"
+
+inherit cmake ptest
+
+EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \
+ -DTOML11_BUILD_TESTS=${@bb.utils.contains("PTEST_ENABLED", "1", "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
+}
+
+BBCLASSEXTEND = "native nativesdk"
--
2.53.0
next prev parent reply other threads:[~2026-02-23 15:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 15:39 [PATCH v5 1/8] rpm/rootfs.py: ensure exit 1 has a word boundary Adam Duskett
2026-02-23 15:39 ` [PATCH v5 2/8] signing-keys.bb: Fix DISTRO_CODENAME truncation Adam Duskett
2026-02-23 15:39 ` Adam Duskett [this message]
2026-02-23 15:39 ` [PATCH v5 4/8] libsolv: explicitly enable comps for rpm packageconfig Adam Duskett
2026-02-23 15:39 ` [PATCH v5 5/8] librepo: upgrade 1.20.0 -> 1.21.0 Adam Duskett
2026-02-23 15:39 ` [PATCH v5 6/8] librepo: add PACKAGECONFIG[sequoia] Adam Duskett
2026-02-23 15:39 ` [PATCH v5 7/8] dnf: Upgrade to 5.4.0.0 Adam Duskett
2026-02-24 6:51 ` [OE-core] " Mathieu Dubois-Briand
2026-02-23 15:39 ` [PATCH v5 8/8] libdnf: remove recipe Adam Duskett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260223153929.2641007-3-adam.duskett@amarulasolutions.com \
--to=adam.duskett@amarulasolutions.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox