diff options
-rw-r--r-- | meta-oe/classes/breakpad.bbclass | 32 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/breakpad/breakpad_svn.bb | 72 |
2 files changed, 104 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 | |||
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad_svn.bb b/meta-oe/recipes-devtools/breakpad/breakpad_svn.bb new file mode 100644 index 000000000..7c7024aa9 --- /dev/null +++ b/meta-oe/recipes-devtools/breakpad/breakpad_svn.bb | |||
@@ -0,0 +1,72 @@ | |||
1 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
2 | |||
3 | # Applications using this library needs to add link against libbreakpad_client.a. | ||
4 | |||
5 | SUMMARY = "An open-source multi-platform crash reporting system" | ||
6 | DESCRIPTION = "Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact \"minidump\" files, send them back to your server, and produce C and C++ stack traces from these minidumps. " | ||
7 | HOMEPAGE = "https://code.google.com/p/google-breakpad/" | ||
8 | LICENSE = "BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c80d1a3b623f72bb85a4c75b556551df" | ||
10 | SECTION = "libs" | ||
11 | |||
12 | inherit autotools | ||
13 | |||
14 | BBCLASSEXTEND = "native" | ||
15 | |||
16 | SRCREV = "r1218" | ||
17 | SRC_URI = "svn://google-breakpad.googlecode.com/svn;module=trunk;protocol=http" | ||
18 | S = "${WORKDIR}/trunk" | ||
19 | |||
20 | do_install_append() { | ||
21 | install -d ${D}${includedir} | ||
22 | install -d ${D}${includedir}/breakpad | ||
23 | |||
24 | install -d ${D}${includedir}/breakpad/client/linux/crash_generation | ||
25 | install -m 0644 ${S}/src/client/linux/crash_generation/crash_generation_client.h ${D}${includedir}/breakpad/client/linux/crash_generation/crash_generation_client.h | ||
26 | |||
27 | install -d ${D}${includedir}/breakpad/client/linux/handler/ | ||
28 | install -m 0644 ${S}/src/client/linux/handler/exception_handler.h ${D}${includedir}/breakpad/client/linux/handler/exception_handler.h | ||
29 | install -m 0644 ${S}/src/client/linux/handler/minidump_descriptor.h ${D}${includedir}/breakpad/client/linux/handler/minidump_descriptor.h | ||
30 | |||
31 | install -d ${D}${includedir}/breakpad/client/linux/minidump_writer | ||
32 | install -m 0644 ${S}/src/client/linux/minidump_writer/linux_dumper.h ${D}${includedir}/breakpad/client/linux/minidump_writer/linux_dumper.h | ||
33 | install -m 0644 ${S}/src/client/linux/minidump_writer/minidump_writer.h ${D}${includedir}/breakpad/client/linux/minidump_writer/minidump_writer.h | ||
34 | |||
35 | install -d ${D}${includedir}/breakpad/common | ||
36 | install -m 0644 ${S}/src/common/memory.h ${D}${includedir}/breakpad/common/memory.h | ||
37 | install -m 0644 ${S}/src/common/scoped_ptr.h ${D}${includedir}/breakpad/common/scoped_ptr.h | ||
38 | install -m 0644 ${S}/src/common/using_std_string.h ${D}${includedir}/breakpad/common/using_std_string.h | ||
39 | |||
40 | install -d ${D}${includedir}/breakpad/google_breakpad/common | ||
41 | install -m 0644 ${S}/src/google_breakpad/common/breakpad_types.h ${D}${includedir}/breakpad/google_breakpad/common/breakpad_types.h | ||
42 | install -m 0644 ${S}/src/google_breakpad/common/minidump_format.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_format.h | ||
43 | install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_amd64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_amd64.h | ||
44 | install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_arm.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_arm.h | ||
45 | install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_mips.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_mips.h | ||
46 | install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc64.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc64.h | ||
47 | install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_ppc.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_ppc.h | ||
48 | install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_sparc.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_sparc.h | ||
49 | install -m 0644 ${S}/src/google_breakpad/common/minidump_cpu_x86.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_cpu_x86.h | ||
50 | install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_linux.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_linux.h | ||
51 | install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_mac.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_mac.h | ||
52 | install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_ps3.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_ps3.h | ||
53 | install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_solaris.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_solaris.h | ||
54 | install -m 0644 ${S}/src/google_breakpad/common/minidump_exception_win32.h ${D}${includedir}/breakpad/google_breakpad/common/minidump_exception_win32.h | ||
55 | |||
56 | install -d ${D}${includedir}/breakpad/third_party/lss | ||
57 | install -m 0644 ${S}/src/third_party/lss/linux_syscall_support.h ${D}${includedir}/breakpad/third_party/lss/linux_syscall_support.h | ||
58 | } | ||
59 | |||
60 | PACKAGES =+ "${PN}-minidump-upload ${PN}-sym-upload" | ||
61 | |||
62 | FILES_${PN}-minidump-upload = "${bindir}/minidump_upload" | ||
63 | FILES_${PN}-sym-upload = "${bindir}/sym_upload" | ||
64 | |||
65 | |||
66 | SYSROOT_PREPROCESS_FUNCS += "breakpad_populate_sysroot" | ||
67 | breakpad_populate_sysroot() { | ||
68 | sysroot_stage_dir ${D}/usr/include ${SYSROOT_DESTDIR}/usr/include | ||
69 | sysroot_stage_dir ${D}/usr/lib ${SYSROOT_DESTDIR}/usr/lib | ||
70 | sysroot_stage_dir ${D}/usr/lib ${SYSROOT_DESTDIR}/usr/lib | ||
71 | } | ||
72 | |||