diff options
author | Anders Darander <anders@chargestorm.se> | 2013-10-18 05:14:54 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-10-21 12:15:03 +0200 |
commit | a4657e4395e0714198c34f02c54043edb8baeafb (patch) | |
tree | 5523d331a5825de71e7afb88aa32608f35406133 /meta-oe/classes | |
parent | be7ba2fcf1651e3fb01842925100fd4cddfc7f1f (diff) | |
download | meta-openembedded-a4657e4395e0714198c34f02c54043edb8baeafb.tar.gz |
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 <anders@chargestorm.se>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/classes')
-rw-r--r-- | meta-oe/classes/breakpad.bbclass | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/classes/breakpad.bbclass b/meta-oe/classes/breakpad.bbclass new file mode 100644 index 000000000..8c49ca7d2 --- /dev/null +++ b/meta-oe/classes/breakpad.bbclass | |||
@@ -0,0 +1,32 @@ | |||
1 | # Class to inherit when you want to build against Breakpad. | ||
2 | # Apart from inheriting this class, you need to set BREAKPAD_BIN in | ||
3 | # your recipe, and make sure that you link against libbreakpad_client.a. | ||
4 | |||
5 | DEPENDS += "breakpad breakpad-native" | ||
6 | |||
7 | CFLAGS += "-I${STAGING_DIR_TARGET}${includedir}/breakpad " | ||
8 | |||
9 | BREAKPAD_BIN ?= "" | ||
10 | |||
11 | python () { | ||
12 | breakpad_bin = d.getVar("BREAKPAD_BIN", True) | ||
13 | |||
14 | if not breakpad_bin: | ||
15 | PN = d.getVar("PN", True) | ||
16 | FILE = os.path.basename(d.getVar("FILE", True)) | ||
17 | bb.error("To build %s, see breakpad.bbclass for instructions on \ | ||
18 | setting up your Breakpad configuration" % PN) | ||
19 | raise ValueError('BREAKPAD_BIN not defined in %s' % PN) | ||
20 | } | ||
21 | |||
22 | # Add creation of symbols here | ||
23 | PACKAGE_PREPROCESS_FUNCS += "breakpad_package_preprocess" | ||
24 | breakpad_package_preprocess () { | ||
25 | mkdir -p ${PKGD}/usr/share/breakpad-syms | ||
26 | find ${D} -name ${BREAKPAD_BIN} -exec sh -c "dump_syms {} > ${PKGD}/usr/share/breakpad-syms/${BREAKPAD_BIN}.syms" \; | ||
27 | } | ||
28 | |||
29 | PACKAGES =+ "${PN}-breakpad" | ||
30 | |||
31 | FILES_${PN}-breakpad = "/usr/share/breakpad-syms" | ||
32 | |||