blob: 8367bf1a4fe309e2564656e49380cd78d557554a [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+"
Brad Bishop08902b02019-08-20 09:16:51 -04005LIC_FILES_CHKSUM = "file://COPYING;md5=0169a04810830e94f4b1cfb823c9f592"
Brad Bishop19323692019-04-05 15:28:33 -04006
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 \
Brad Bishop15ae2502019-06-18 21:44:24 -040017 file://ptest-spacesave.patch \
Brad Bishop19323692019-04-05 15:28:33 -040018 "
Brad Bishop08902b02019-08-20 09:16:51 -040019SRC_URI[md5sum] = "b9c02b07dcde5125498ce7da69b77baf"
20SRC_URI[sha256sum] = "d513bc085609a9afd64faf2ce71deb95b96faf46cd7bc86048bc655e4e4c24d2"
Brad Bishop19323692019-04-05 15:28:33 -040021
Brad Bishop96ff1982019-08-19 13:50:42 -040022inherit autotools ptest
Brad Bishop19323692019-04-05 15:28:33 -040023
24PACKAGECONFIG_class-target ??= "\
25 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
26"
27
Brad Bishop96ff1982019-08-19 13:50:42 -040028PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5"
Brad Bishop19323692019-04-05 15:28:33 -040029PACKAGECONFIG[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"