From a4657e4395e0714198c34f02c54043edb8baeafb Mon Sep 17 00:00:00 2001 From: Anders Darander Date: Fri, 18 Oct 2013 05:14:54 +0000 Subject: breakpad: add initial recipe Breakpad is an open-source multi-platform crash reporting system. Apart from the breakpad recipe, add a bbclass for applications that want to use this library. This bbclass will set up the include path and also generate the symbol file. Signed-off-by: Anders Darander Signed-off-by: Martin Jansa --- meta-oe/classes/breakpad.bbclass | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 meta-oe/classes/breakpad.bbclass (limited to 'meta-oe/classes/breakpad.bbclass') diff --git a/meta-oe/classes/breakpad.bbclass b/meta-oe/classes/breakpad.bbclass new file mode 100644 index 0000000000..8c49ca7d27 --- /dev/null +++ b/meta-oe/classes/breakpad.bbclass @@ -0,0 +1,32 @@ +# Class to inherit when you want to build against Breakpad. +# Apart from inheriting this class, you need to set BREAKPAD_BIN in +# your recipe, and make sure that you link against libbreakpad_client.a. + +DEPENDS += "breakpad breakpad-native" + +CFLAGS += "-I${STAGING_DIR_TARGET}${includedir}/breakpad " + +BREAKPAD_BIN ?= "" + +python () { + breakpad_bin = d.getVar("BREAKPAD_BIN", True) + + if not breakpad_bin: + PN = d.getVar("PN", True) + FILE = os.path.basename(d.getVar("FILE", True)) + bb.error("To build %s, see breakpad.bbclass for instructions on \ + setting up your Breakpad configuration" % PN) + raise ValueError('BREAKPAD_BIN not defined in %s' % PN) +} + +# Add creation of symbols here +PACKAGE_PREPROCESS_FUNCS += "breakpad_package_preprocess" +breakpad_package_preprocess () { + mkdir -p ${PKGD}/usr/share/breakpad-syms + find ${D} -name ${BREAKPAD_BIN} -exec sh -c "dump_syms {} > ${PKGD}/usr/share/breakpad-syms/${BREAKPAD_BIN}.syms" \; +} + +PACKAGES =+ "${PN}-breakpad" + +FILES_${PN}-breakpad = "/usr/share/breakpad-syms" + -- cgit v1.2.3-54-g00ecf