blob: f365477ccd8c2abd3ba5f12411e250ea0c2e892a [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001SUMMARY = "System call tracing tool"
2HOMEPAGE = "http://strace.io"
3DESCRIPTION = "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."
4SECTION = "console/utils"
5LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
Patrick Williams73bd93f2024-02-20 08:07:48 -06006LIC_FILES_CHKSUM = "file://COPYING;md5=2433d82e1432a76dc3eadd9002bfe304"
Patrick Williamsac13d5f2023-11-24 18:59:46 -06007
8SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
9 file://update-gawk-paths.patch \
10 file://Makefile-ptest.patch \
11 file://run-ptest \
12 file://ptest-spacesave.patch \
13 file://0001-strace-fix-reproducibilty-issues.patch \
14 file://skip-load.patch \
15 file://0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch \
16 file://0002-tests-Replace-off64_t-with-off_t.patch \
17 "
Patrick Williams73bd93f2024-02-20 08:07:48 -060018SRC_URI[sha256sum] = "2090201e1a3ff32846f4fe421c1163b15f440bb38e31355d09f82d3949922af7"
Patrick Williamsac13d5f2023-11-24 18:59:46 -060019
20inherit autotools ptest
21
22# Not yet ported to rv32
23COMPATIBLE_HOST:riscv32 = "null"
24
Patrick Williams169d7bc2024-01-05 11:33:25 -060025# bluez is not enabled by default due to build dependency creep in smaller builds
26# like core-image-minimal leading to significantly more tasks being executed
Patrick Williamsac13d5f2023-11-24 18:59:46 -060027PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5"
28PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
29
30EXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror"
31
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_compile_ptest() {
38 oe_runmake -C ${TESTDIR} buildtest-TESTS
39}
40
41do_install_ptest() {
42 oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
43 mkdir -p ${D}${PTEST_PATH}/build-aux
44 mkdir -p ${D}${PTEST_PATH}/src
45 install -m 755 ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
46 install -m 644 ${B}/src/config.h ${D}${PTEST_PATH}/src/
47 sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
48}
49
50RDEPENDS:${PN}-ptest += "make coreutils grep gawk sed"
51
52RDEPENDS:${PN}-ptest:append:libc-glibc = "\
53 locale-base-en-us.iso-8859-1 \
54"
55
56BBCLASSEXTEND = "native"