blob: 24f92c99e583f2a9d3dd8b6771f62200e52e8d01 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "System call tracing tool"
2HOMEPAGE = "http://strace.io"
3SECTION = "console/utils"
4LICENSE = "LGPL-2.1+ & GPL-2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=5c84d1c6e48e7961ccd2cd2ae32f7bf1"
6
7SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
8 file://disable-git-version-gen.patch \
9 file://more-robust-test-for-m32-mx32-compile-support.patch \
10 file://update-gawk-paths.patch \
11 file://Makefile-ptest.patch \
12 file://run-ptest \
13 file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
14 file://mips-SIGEMT.patch \
15 file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
16 file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
17 file://0001-mips-o32-fix-build.patch \
18 "
19SRC_URI[md5sum] = "daa51acc0c7c696221ec03cf0b30a7af"
20SRC_URI[sha256sum] = "7c4d2ffeef4f7d1cdc71062ca78d1130eb52f947c2fca82f59f6a1183bfa1e1c"
21
22inherit autotools ptest bluetooth
23
24PACKAGECONFIG_class-target ??= "\
25 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
26"
27
28PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
29PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
30
31EXTRA_OECONF += "--enable-mpers=no"
32
33CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext"
34
35TESTDIR = "tests"
36PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)"
37
38do_install_append() {
39 # We don't ship strace-graph here because it needs perl
40 rm ${D}${bindir}/strace-graph
41}
42
43do_compile_ptest() {
44 oe_runmake -C ${TESTDIR} buildtest-TESTS
45}
46
47do_install_ptest() {
48 oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
49 install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
50 install -m 644 ${B}/config.h ${D}${PTEST_PATH}
51 sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
52}
53
54RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
55
56BBCLASSEXTEND = "native"
57TOOLCHAIN = "gcc"