aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/classes/breakpad.bbclass
blob: 36f11ff480808b12cc321b3348e835d8aa0920b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# 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 "
CXXFLAGS += "-I${STAGING_DIR_TARGET}${includedir}/breakpad "

BREAKPAD_BIN ?= ""

python () {
    breakpad_bin = d.getVar("BREAKPAD_BIN")

    if not breakpad_bin:
       PN = d.getVar("PN")
       FILE = os.path.basename(d.getVar("FILE"))
       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}.sym" \;
}

PACKAGES =+ "${PN}-breakpad"

FILES_${PN}-breakpad = "/usr/share/breakpad-syms"