blob: 36f11ff480808b12cc321b3348e835d8aa0920b9 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001# 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
5DEPENDS += "breakpad breakpad-native"
6
7CFLAGS += "-I${STAGING_DIR_TARGET}${includedir}/breakpad "
8CXXFLAGS += "-I${STAGING_DIR_TARGET}${includedir}/breakpad "
9
10BREAKPAD_BIN ?= ""
11
12python () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 breakpad_bin = d.getVar("BREAKPAD_BIN")
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014
15 if not breakpad_bin:
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016 PN = d.getVar("PN")
17 FILE = os.path.basename(d.getVar("FILE"))
Patrick Williamsb48b7b42016-08-17 15:04:38 -050018 bb.error("To build %s, see breakpad.bbclass for instructions on \
19 setting up your Breakpad configuration" % PN)
20 raise ValueError('BREAKPAD_BIN not defined in %s' % PN)
21}
22
23# Add creation of symbols here
24PACKAGE_PREPROCESS_FUNCS += "breakpad_package_preprocess"
25breakpad_package_preprocess () {
26 mkdir -p ${PKGD}/usr/share/breakpad-syms
27 find ${D} -name ${BREAKPAD_BIN} -exec sh -c "dump_syms {} > ${PKGD}/usr/share/breakpad-syms/${BREAKPAD_BIN}.sym" \;
28}
29
30PACKAGES =+ "${PN}-breakpad"
31
32FILES_${PN}-breakpad = "/usr/share/breakpad-syms"
33