From d5d57ee1f2dfa4f5d8f523b5dd75e2684829283b Mon Sep 17 00:00:00 2001 From: Riyaz Khan Date: Thu, 8 Sep 2022 13:09:59 +0530 Subject: sdbus-c++: Upgrade sdbus-c++ 1.1.0 to 1.2.0 Add SHA value in SRCREV and remove 7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44.patch as this this patch is already part of 1.2.0 Source. Reference link: https://github.com/Kistler-Group/sdbus-cpp/releases/tag/v1.2.0 Signed-off-by: Riyaz Khan Signed-off-by: Khem Raj --- .../7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44.patch | 54 ---------------------- .../sdbus-c++/sdbus-c++-1.1.0/run-ptest | 15 ------ .../sdbus-c++/sdbus-c++-1.2.0/run-ptest | 15 ++++++ meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.1.0.bb | 45 ------------------ meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.2.0.bb | 44 ++++++++++++++++++ 5 files changed, 59 insertions(+), 114 deletions(-) delete mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44.patch delete mode 100755 meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/run-ptest create mode 100755 meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.2.0/run-ptest delete mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.1.0.bb create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.2.0.bb diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44.patch deleted file mode 100644 index 641935f684..0000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit 7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44 -Author: Stanislav Angelovic -Date: Thu Jan 27 13:38:19 2022 +0100 - - fix(tests): printer for std::chrono in googletest v1.11.0 - -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index fbf198c..ec42e55 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -19,7 +19,7 @@ if (NOT TARGET GTest::gmock) - if (NOT TARGET GTest::gmock) - include(FetchContent) - -- message("Fetching googletest...") -+ message("Fetching googletest v${GOOGLETEST_VERSION}...") - FetchContent_Declare(googletest - GIT_REPOSITORY ${GOOGLETEST_GIT_REPO} - GIT_TAG release-${GOOGLETEST_VERSION} -diff --git a/tests/integrationtests/Defs.h b/tests/integrationtests/Defs.h -index 2f129a4..2bfc7c9 100644 ---- a/tests/integrationtests/Defs.h -+++ b/tests/integrationtests/Defs.h -@@ -56,20 +56,18 @@ const bool DEFAULT_BLOCKING_VALUE{true}; - - constexpr const double DOUBLE_VALUE{3.24L}; - --/** Duration stream operator for human readable gtest value output. -- * -- * Note that the conversion to double is lossy if the input type has 64 or more bits. -- * This is ok for our integration tests because they don't have very -- * accurate timing requirements. -- * -- * @return human readable duration in seconds -- */ -+}} -+ -+namespace testing::internal { -+ -+// Printer for std::chrono::duration types. -+// This is a workaround, since it's not a good thing to add this to std namespace. - template< class Rep, class Period > --static std::ostream& operator<<(std::ostream& os, const std::chrono::duration& d) --{ -+void PrintTo(const ::std::chrono::duration& d, ::std::ostream* os) { - auto seconds = std::chrono::duration_cast>(d); -- return os << seconds.count() << " s"; -+ *os << seconds.count() << "s"; -+} -+ - } --}} - - #endif /* SDBUS_CPP_INTEGRATIONTESTS_DEFS_H_ */ diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/run-ptest b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/run-ptest deleted file mode 100755 index f6ade0c7e4..0000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.1.0/run-ptest +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -set -e -set -o pipefail - -SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" - -${SCRIPTPATH}/../tests/sdbus-c++-unit-tests 2>&1 | \ -sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \ -sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \ -awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' - -${SCRIPTPATH}/../tests/sdbus-c++-integration-tests 2>&1 | \ -sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \ -sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \ -awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.2.0/run-ptest b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.2.0/run-ptest new file mode 100755 index 0000000000..f6ade0c7e4 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-1.2.0/run-ptest @@ -0,0 +1,15 @@ +#!/bin/sh +set -e +set -o pipefail + +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" + +${SCRIPTPATH}/../tests/sdbus-c++-unit-tests 2>&1 | \ +sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \ +sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \ +awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' + +${SCRIPTPATH}/../tests/sdbus-c++-integration-tests 2>&1 | \ +sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \ +sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \ +awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.1.0.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.1.0.bb deleted file mode 100644 index 107dbc6c9d..0000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.1.0.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "sdbus-c++" -DESCRIPTION = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API in modern C++" - -SECTION = "libs" - -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742" - -inherit cmake pkgconfig systemd ptest - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}" -PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap" -PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd" -PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF,googletest gmock" - -DEPENDS += "expat" - -SRCREV = "bca8e81037766a0454740c40307eea32831c101f" - -SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master" -SRC_URI += "file://run-ptest \ - file://7f437a6e06d2ec3abd3e2fd1101ab6aab386bc44.patch " - -EXTRA_OECMAKE = "-DBUILD_CODE_GEN=OFF \ - -DBUILD_DOC=ON \ - -DBUILD_DOXYGEN_DOC=OFF" - -S = "${WORKDIR}/git" - -# Link libatomic on architectures without 64bit atomics fixes -# libsdbus-c++.so.1.1.0: undefined reference to `__atomic_load_8' -LDFLAGS:append:mips = " -Wl,--no-as-needed -latomic -Wl,--as-needed" -LDFLAGS:append:powerpc = " -Wl,--no-as-needed -latomic -Wl,--as-needed" -LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" - -do_install:append() { - if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then - rm -rf ${D}${sysconfdir}/dbus-1 - fi -} - -PTEST_PATH = "${libdir}/${BPN}/tests" -FILES:${PN}-ptest =+ "${sysconfdir}/dbus-1/system.d/" -FILES:${PN}-dev += "${bindir}/sdbus-c++-xml2cpp" diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.2.0.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.2.0.bb new file mode 100644 index 0000000000..75cd815535 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_1.2.0.bb @@ -0,0 +1,44 @@ +SUMMARY = "sdbus-c++" +DESCRIPTION = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API in modern C++" + +SECTION = "libs" + +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742" + +inherit cmake pkgconfig systemd ptest + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}" +PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap" +PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd" +PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF,googletest gmock" + +DEPENDS += "expat" + +SRCREV = "751c1addc4fd2f949a466f488c1b7de2ca3b76dc" + +SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master" +SRC_URI += "file://run-ptest" + +EXTRA_OECMAKE = "-DBUILD_CODE_GEN=OFF \ + -DBUILD_DOC=ON \ + -DBUILD_DOXYGEN_DOC=OFF" + +S = "${WORKDIR}/git" + +# Link libatomic on architectures without 64bit atomics fixes +# libsdbus-c++.so.1.1.0: undefined reference to `__atomic_load_8' +LDFLAGS:append:mips = " -Wl,--no-as-needed -latomic -Wl,--as-needed" +LDFLAGS:append:powerpc = " -Wl,--no-as-needed -latomic -Wl,--as-needed" +LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed" + +do_install:append() { + if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then + rm -rf ${D}${sysconfdir}/dbus-1 + fi +} + +PTEST_PATH = "${libdir}/${BPN}/tests" +FILES:${PN}-ptest =+ "${sysconfdir}/dbus-1/system.d/" +FILES:${PN}-dev += "${bindir}/sdbus-c++-xml2cpp" -- cgit v1.2.3-54-g00ecf