diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb')
-rw-r--r-- | meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb new file mode 100644 index 0000000000..16953d6807 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace2_2.0.1.bb | |||
@@ -0,0 +1,92 @@ | |||
1 | SUMMARY = "Babeltrace2 - Trace Format Babel Tower" | ||
2 | DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log." | ||
3 | HOMEPAGE = "http://babeltrace.org/" | ||
4 | BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace" | ||
5 | LICENSE = "MIT & GPLv2 & LGPLv2.1 & BSD-2-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e" | ||
7 | |||
8 | DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" | ||
9 | |||
10 | SRC_URI = "git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-2.0 \ | ||
11 | file://run-ptest \ | ||
12 | file://0001-tests-do-not-run-test-applications-from-.libs.patch \ | ||
13 | " | ||
14 | SRCREV = "06df58f89ee51b1a2c6a2c187ec3f15691633910" | ||
15 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit autotools pkgconfig ptest | ||
20 | |||
21 | EXTRA_OECONF = "--disable-debug-info" | ||
22 | |||
23 | PACKAGECONFIG ??= "manpages" | ||
24 | PACKAGECONFIG[manpages] = ", --disable-man-pages, asciidoc-native xmlto-native" | ||
25 | |||
26 | FILES_${PN}-staticdev += "${libdir}/babeltrace2/plugins/*.a" | ||
27 | FILES_${PN} += "${libdir}/babeltrace2/plugins/*.so" | ||
28 | |||
29 | ASNEEDED = "" | ||
30 | |||
31 | RDEPENDS_${PN}-ptest += "bash gawk python3" | ||
32 | |||
33 | do_compile_ptest () { | ||
34 | make -C tests all | ||
35 | } | ||
36 | |||
37 | do_install_ptest () { | ||
38 | install -d "${D}${PTEST_PATH}/tests" | ||
39 | |||
40 | # Copy required files from source directory | ||
41 | for d in $(find "${S}/tests" -type d -printf '%P ') ; do | ||
42 | install -d "${D}${PTEST_PATH}/tests/$d" | ||
43 | find "${S}/tests/$d" -maxdepth 1 -executable -type f \ | ||
44 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + | ||
45 | find "${S}/tests/$d" -maxdepth 1 -name *.sh \ | ||
46 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; | ||
47 | find "${S}/tests/$d" -maxdepth 1 -name *.py \ | ||
48 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; | ||
49 | find "${S}/tests/$d" -maxdepth 1 -name *.expect \ | ||
50 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; | ||
51 | done | ||
52 | install -d "${D}${PTEST_PATH}/tests/data/ctf-traces/" | ||
53 | cp -a ${S}/tests/data/ctf-traces/* ${D}${PTEST_PATH}/tests/data/ctf-traces/ | ||
54 | |||
55 | # Copy the tests directory tree and the executables and | ||
56 | # Makefiles found within. | ||
57 | install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/" | ||
58 | for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do | ||
59 | install -d "${D}${PTEST_PATH}/tests/$d" | ||
60 | find "${B}/tests/$d" -maxdepth 1 -executable -type f \ | ||
61 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + | ||
62 | test -r "${B}/tests/$d/Makefile" && \ | ||
63 | install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile" | ||
64 | find "${B}/tests/$d" -maxdepth 1 -name *.sh \ | ||
65 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; | ||
66 | done | ||
67 | |||
68 | for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do | ||
69 | for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do | ||
70 | cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f | ||
71 | done | ||
72 | done | ||
73 | |||
74 | # Prevent attempts to update Makefiles during test runs, and | ||
75 | # silence "Making check in $SUBDIR" messages. | ||
76 | find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ | ||
77 | sed -i \ | ||
78 | -e '/Makefile:/,/^$/d' \ | ||
79 | -e '/%: %.in/,/^$/d' \ | ||
80 | -e '/echo "Making $$target in $$subdir"; \\/d' \ | ||
81 | -e 's/^srcdir = \(.*\)/srcdir = ./' \ | ||
82 | -e 's/^builddir = \(.*\)/builddir = ./' \ | ||
83 | -e 's/^all-am:.*/all-am:/' \ | ||
84 | {} + | ||
85 | |||
86 | # Substitute links to installed binaries. | ||
87 | install -d "${D}${PTEST_PATH}/src/cli/" | ||
88 | ln -s "${bindir}/babeltrace2" ${D}${PTEST_PATH}/src/cli/ | ||
89 | |||
90 | # Remove architechture specific testfiles | ||
91 | rm -rf ${D}${PTEST_PATH}/tests/data/plugins/flt.lttng-utils.debug-info/* | ||
92 | } | ||