Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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" |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 5 | LICENSE = "MIT & GPL-2.0-only & LGPL-2.1-only & BSD-2-Clause" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e" |
| 7 | |
| 8 | DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" |
| 9 | |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 10 | SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.0;protocol=https \ |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 11 | file://run-ptest \ |
| 12 | file://0001-tests-do-not-run-test-applications-from-.libs.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | file://0001-Make-manpages-multilib-identical.patch \ |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 14 | " |
Patrick Williams | 44b3caf | 2024-04-12 16:51:14 -0500 | [diff] [blame] | 15 | SRCREV = "0a6632f77801f3218a288604c646f8a39cb0d2c4" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$" |
| 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 20 | inherit autotools pkgconfig ptest python3targetconfig |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 22 | EXTRA_OECONF = "--disable-debug-info --disable-Werror" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | |
| 24 | PACKAGECONFIG ??= "manpages" |
| 25 | PACKAGECONFIG[manpages] = ", --disable-man-pages, asciidoc-native xmlto-native" |
| 26 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 27 | FILES:${PN}-staticdev += "${libdir}/babeltrace2/plugins/*.a" |
| 28 | FILES:${PN} += "${libdir}/babeltrace2/plugins/*.so" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | |
| 30 | ASNEEDED = "" |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 31 | LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', ' -fuse-ld=bfd ', '', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 33 | # coreutils since we need full mktemp |
| 34 | RDEPENDS:${PN}-ptest += "bash gawk python3 make grep coreutils findutils" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 35 | |
| 36 | do_compile_ptest () { |
| 37 | make -C tests all |
| 38 | } |
| 39 | |
| 40 | do_install_ptest () { |
| 41 | install -d "${D}${PTEST_PATH}/tests" |
| 42 | |
| 43 | # Copy required files from source directory |
| 44 | for d in $(find "${S}/tests" -type d -printf '%P ') ; do |
| 45 | install -d "${D}${PTEST_PATH}/tests/$d" |
| 46 | find "${S}/tests/$d" -maxdepth 1 -executable -type f \ |
| 47 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + |
| 48 | find "${S}/tests/$d" -maxdepth 1 -name *.sh \ |
| 49 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; |
| 50 | find "${S}/tests/$d" -maxdepth 1 -name *.py \ |
| 51 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; |
| 52 | find "${S}/tests/$d" -maxdepth 1 -name *.expect \ |
| 53 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; |
| 54 | done |
| 55 | install -d "${D}${PTEST_PATH}/tests/data/ctf-traces/" |
| 56 | cp -a ${S}/tests/data/ctf-traces/* ${D}${PTEST_PATH}/tests/data/ctf-traces/ |
| 57 | |
| 58 | # Copy the tests directory tree and the executables and |
| 59 | # Makefiles found within. |
| 60 | install -D "${B}/tests/Makefile" "${D}${PTEST_PATH}/tests/" |
| 61 | for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do |
| 62 | install -d "${D}${PTEST_PATH}/tests/$d" |
| 63 | find "${B}/tests/$d" -maxdepth 1 -executable -type f \ |
| 64 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + |
| 65 | test -r "${B}/tests/$d/Makefile" && \ |
| 66 | install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile" |
| 67 | find "${B}/tests/$d" -maxdepth 1 -name *.sh \ |
| 68 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} \; |
| 69 | done |
| 70 | |
| 71 | for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do |
| 72 | for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do |
| 73 | cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f |
| 74 | done |
| 75 | done |
| 76 | |
| 77 | # Prevent attempts to update Makefiles during test runs, and |
| 78 | # silence "Making check in $SUBDIR" messages. |
| 79 | find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ |
| 80 | sed -i \ |
| 81 | -e '/Makefile:/,/^$/d' \ |
| 82 | -e '/%: %.in/,/^$/d' \ |
| 83 | -e '/echo "Making $$target in $$subdir"; \\/d' \ |
| 84 | -e 's/^srcdir = \(.*\)/srcdir = ./' \ |
| 85 | -e 's/^builddir = \(.*\)/builddir = ./' \ |
| 86 | -e 's/^all-am:.*/all-am:/' \ |
| 87 | {} + |
| 88 | |
| 89 | # Substitute links to installed binaries. |
| 90 | install -d "${D}${PTEST_PATH}/src/cli/" |
| 91 | ln -s "${bindir}/babeltrace2" ${D}${PTEST_PATH}/src/cli/ |
| 92 | |
| 93 | # Remove architechture specific testfiles |
| 94 | rm -rf ${D}${PTEST_PATH}/tests/data/plugins/flt.lttng-utils.debug-info/* |
| 95 | } |