All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe] Introduce recipe for sdbus-c++ library
@ 2019-06-12 12:18 Stanislav Angelovič
  0 siblings, 0 replies; only message in thread
From: Stanislav Angelovič @ 2019-06-12 12:18 UTC (permalink / raw
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Hi,

I've just sent a new PR to meta-openembedded at GitHub (
https://github.com/openembedded/meta-openembedded/pull/).

sdbus-c++ is a high-level C++ D-Bus library written on top of systemd D-Bus
implementation originally as a modern, robust replacement for dbus-c++.

There are two recipes:
* One for sdbus-c++ itself. It detects whether systemd feature is turned
on. If so, it depends on systemd and links against libsystemd. Otherwise it
builds libsystemd as part of building sdbus-c++. The recipe also supports
ptest.
* One for sdbus-c++ native tools, namely sdbus-c++ code generator to
generate C++ adaptor and proxy binding classes.

The recipes have been tested on yocto master.

Per meta-oe README, one is also asked to send an e-mail, so here I am (I
hope I'm doing this correctly). Attached please find the patch file.

Looking forward to your feedback.

Kind regards,
Stanislav.

[-- Attachment #2: sdbus-c++.patch --]
[-- Type: application/octet-stream, Size: 4761 bytes --]

From 3ad9b218bcadb5f44e374bb5da62904e1d0442d9 Mon Sep 17 00:00:00 2001
From: sangelovic <angelovic.s@gmail.com>
Date: Wed, 12 Jun 2019 11:50:07 +0200
Subject: [PATCH] Introduce recipe for sdbus-c++ library and its tools

---
 .../sdbus-c++/sdbus-c++-0.7.1/run-ptest       | 15 +++++++
 .../sdbus-c++/sdbus-c++-tools-native_0.7.1.bb | 17 +++++++
 .../recipes-core/sdbus-c++/sdbus-c++_0.7.1.bb | 45 +++++++++++++++++++
 3 files changed, 77 insertions(+)
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.1/run-ptest
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.1.bb
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.1.bb

diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.1/run-ptest b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.1/run-ptest
new file mode 100644
index 0000000000..8fa9453e39
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.1/run-ptest
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+set -o pipefail
+
+logger "** Starting sdbus-c++-unit-tests"
+/opt/test/bin/sdbus-c++-unit-tests --gtest_output=xml:/data/ptest/sdbus-c++/sdbus-c++-unit-tests.xml |& \
+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}}'
+
+logger "** Starting sdbus-c++-integration-tests"
+/opt/test/bin/sdbus-c++-integration-tests --gtest_output=xml:/data/ptest/sdbus-c++/sdbus-c++-integration-tests.xml |& \
+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++-tools-native_0.7.1.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.1.bb
new file mode 100644
index 0000000000..10bdd0a2ea
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.1.bb
@@ -0,0 +1,17 @@
+SUMMARY = "sdbus-c++ native tools"
+DESCRIPTION = "Native interface code generator for development with sdbus-c++"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git-tools/COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
+
+inherit cmake native
+
+DEPENDS_${PN} = "expat"
+RDEPENDS_${PN} = "expat"
+
+BRANCH = "master"
+TAG = "v${PV}"
+
+SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;destsuffix=git-tools;branch=${BRANCH};tag=${TAG};subpath=tools"
+
+S = "${WORKDIR}/git-tools"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.1.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.1.bb
new file mode 100644
index 0000000000..31ae38c759
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.1.bb
@@ -0,0 +1,45 @@
+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 = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/sdbus-cpp-${PV}/COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
+
+inherit cmake pkgconfig systemd ptest python3native
+
+DEPENDS = "expat ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'meson-native ninja-native git-native gperf-native gettext-native util-linux glibc libcap', d)}"
+RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'libsystemd', 'glibc libcap', d)}"
+
+SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;destsuffix=sdbus-cpp-${PV};branch=master;tag=v${PV}"
+SRC_URI += "file://run-ptest"
+
+TEST_BIN_DIR = "/opt/test/bin"
+
+# Allow CMake to use git on the host machine
+OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH"
+# Ninja is the default CMake generator in Yocto now, so let's set Unix Makefiles explicitly
+OECMAKE_GENERATOR = "Unix Makefiles"
+
+EXTRA_OECMAKE = "-DBUILD_CODE_GEN=ON \
+                 -DBUILD_DOC=ON \
+                 -DBUILD_DOXYGEN_DOC=OFF \
+                 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DBUILD_LIBSYSTEMD=OFF', '-DBUILD_LIBSYSTEMD=ON -DLIBSYSTEMD_VERSION=242', d)} \
+                 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${TEST_BIN_DIR}', '-DBUILD_TESTS=OFF', d)}"
+
+S = "${WORKDIR}/sdbus-cpp-${PV}"
+
+PACKAGES += "${PN}-test"
+ALLOW_EMPTY_${PN}-test = "1"
+RDEPENDS_${PN}-test = "${PN}"
+RDEPENDS_${PN}-ptest = "${PN}-test"
+
+# Don't take org.sdbuscpp.integrationtests.conf file into the base package
+FILES_${PN} = "${libdir}/"
+
+FILES_${PN}-test += "${sysconfdir}/dbus-1/system.d/"
+FILES_${PN}-test += "${TEST_BIN_DIR}/"
+
+FILES_${PN}-dev += "${bindir}/sdbus-c++-xml2cpp"
+FILES_${PN}-dev += "${libdir}/cmake/sdbus-c++/sdbus-c++-config.cmake"
+FILES_${PN}-dev += "${libdir}/cmake/sdbus-c++/sdbus-c++-config-version.cmake"

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-12 12:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-12 12:18 [meta-oe] Introduce recipe for sdbus-c++ library Stanislav Angelovič

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.