blob: 17bde082a312f0145f7391965c591bf48ed80910 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "System call tracing tool"
2HOMEPAGE = "http://strace.io"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06003DESCRIPTION = "strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state."
Andrew Geissler82c905d2020-04-13 13:39:40 -05004SECTION = "console/utils"
5LICENSE = "LGPL-2.1+ & GPL-2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=c756d9d5dabc27663df64f0bf492166c"
7
8SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
9 file://disable-git-version-gen.patch \
10 file://update-gawk-paths.patch \
11 file://Makefile-ptest.patch \
12 file://run-ptest \
13 file://mips-SIGEMT.patch \
14 file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
15 file://ptest-spacesave.patch \
16 file://uintptr_t.patch \
17 file://0001-strace-fix-reproducibilty-issues.patch \
18 "
Andrew Geisslerd1e89492021-02-12 15:35:20 -060019SRC_URI[sha256sum] = "fe3982ea4cd9aeb3b4ba35f6279f0b577a37175d3282be24b9a5537b56b8f01c"
Andrew Geissler82c905d2020-04-13 13:39:40 -050020
21inherit autotools ptest
22
23PACKAGECONFIG_class-target ??= "\
24 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
25"
26
27PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5"
28PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
29
Andrew Geissler4ed12e12020-06-05 18:00:41 -050030EXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror"
Andrew Geissler82c905d2020-04-13 13:39:40 -050031
32CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext"
33
34TESTDIR = "tests"
35PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)"
36
37do_install_append() {
38 # We don't ship strace-graph here because it needs perl
39 rm ${D}${bindir}/strace-graph
40}
41
42do_compile_ptest() {
43 oe_runmake -C ${TESTDIR} buildtest-TESTS
44}
45
46do_install_ptest() {
47 oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
48 install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
49 install -m 644 ${B}/config.h ${D}${PTEST_PATH}
Andrew Geisslerd1e89492021-02-12 15:35:20 -060050 sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
Andrew Geissler82c905d2020-04-13 13:39:40 -050051}
52
53RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
54
Andrew Geisslerd1e89492021-02-12 15:35:20 -060055RDEPENDS_${PN}-ptest_append_libc-glibc = "\
56 locale-base-en-us.iso-8859-1 \
57"
58
Andrew Geissler82c905d2020-04-13 13:39:40 -050059BBCLASSEXTEND = "native"
60TOOLCHAIN = "gcc"