@@ -1,9 +1,19 @@
#!/bin/sh
+# The tests call std::locale(""), which libstdc++ on musl only accepts for "C"
+export LC_ALL=C
+
+# Set at build time for libcs where some tests cannot pass
+args=""
+
cd tests
for atest in tomlplusplus_* ; do
rm -rf tests.log
- ./${atest} > tests.log 2>&1
+ if [ "${atest}" = "tomlplusplus_tests" ] && [ -n "${args}" ]; then
+ ./${atest} "${args}" > tests.log 2>&1
+ else
+ ./${atest} > tests.log 2>&1
+ fi
if [ $? = 0 ] ; then
echo "PASS: ${atest}"
else
@@ -3,18 +3,19 @@ HOMEPAGE = "https://github.com/marzer/tomlplusplus"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=90960f22c10049c117d56ed2ee5ee167"
-SRC_URI = "git://github.com/marzer/tomlplusplus.git;protocol=https;branch=master \
+SRC_URI = "git://github.com/marzer/tomlplusplus.git;protocol=https;branch=master;tag=v${PV} \
file://run-ptest \
"
-PV = "3.4.0"
-SRCREV = "30172438cee64926dc41fdd9c11fb3ba5b2ba9de"
+PV = "3.5.1"
+SRCREV = "efd80e03356af65c7d4e61c56ffb326b34f8d0f4"
+UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
DEPENDS = "cmake-native"
inherit meson ptest pkgconfig
-EXTRA_OEMESON += "-Dbuild_tests=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "true", "false", d)} \
+EXTRA_OEMESON += "-Dregenerate=false -Dbuild_lib=true -Dbuild_tests=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "true", "false", d)} \
"
# See - https://github.com/marzer/tomlplusplus/issues/279
@@ -26,3 +27,9 @@ do_install_ptest () {
cp ${B}/tests/tomlplusplus_odr_test ${D}${PTEST_PATH}/tests
cp ${B}/tests/tomlplusplus_tests ${D}${PTEST_PATH}/tests
}
+
+# musl's strtod() leaves floating-point exception flags set, which the
+# float round-trip test checks for
+do_install_ptest:append:libc-musl () {
+ sed -i -e 's|^args=""$|args="~round trips - floats"|' ${D}${PTEST_PATH}/run-ptest
+}
3.5 adds TOML 1.1.0, std::chrono and C++20 module support and fixes many crashes; 3.5.1 is a tag-only re-release. Meson builds are header-only by default now; pass -Dbuild_lib=true so the shared library is built and packaged as before, and -Dregenerate=false so meson does not rerun the derived-file generator. Fetch by tag and check upstream release tags. The test runner calls std::locale(""), which libstdc++ on musl only accepts for "C", so run the ptests with LC_ALL=C. On musl also exclude the "round trips - floats" test case, which expects strtod() to leave the floating-point exception flags clear. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../recipes-devtools/tomlplusplus/files/run-ptest | 12 +++++++++++- .../tomlplusplus/tomlplusplus_git.bb | 15 +++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-)