Add recipe for Cereal
Cereal is a C++ serialization library; phosphor-logging uses Cereal to
serialize and persist error d-bus objects. Have phosphor-logging depend
on Cereal.
Change-Id: I8142fbfbddfd2ed79cfafec9f4916d2975c39663
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging.bb b/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging.bb
index 991b09b..7d2d3d1 100644
--- a/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging.bb
+++ b/meta-phosphor/common/recipes-phosphor/logging/phosphor-logging.bb
@@ -21,6 +21,7 @@
DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native"
DEPENDS += "virtual/phosphor-logging-callouts"
DEPENDS += "phosphor-logging-error-logs-native"
+DEPENDS += "cereal"
RDEPENDS_${PN} += "sdbusplus phosphor-dbus-interfaces"
PROVIDES += "virtual/obmc-logging-mgmt"
RPROVIDES_${PN} += "virtual-obmc-logging-mgmt"
diff --git a/meta-phosphor/common/recipes-support/serialization/cereal_1.2.2.bb b/meta-phosphor/common/recipes-support/serialization/cereal_1.2.2.bb
new file mode 100644
index 0000000..8dd1d69
--- /dev/null
+++ b/meta-phosphor/common/recipes-support/serialization/cereal_1.2.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Cereal - A C++11 library for serialization"
+DESCRIPTION = "Cereal is a header-only C++11 serialization library."
+HOMEPAGE = "https://github.com/USCiLab/cereal"
+PR = "r1"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e612690af2f575dfd02e2e91443cea23"
+
+SRC_URI += "git://github.com/USCiLab/cereal"
+SRCREV = "51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4"
+
+S = "${WORKDIR}/git"
+
+PACKAGES_remove = "${PN}*"
+PACKAGES = "${PN}-dev"
+RDEPENDS_${PN}-dev = ""
+
+do_install () {
+ install -d ${D}${includedir}/cereal
+ cp -r ${S}/include/cereal/* ${D}${includedir}/cereal/
+}