Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "System call tracing tool" |
| 2 | HOMEPAGE = "http://strace.io" |
| 3 | SECTION = "console/utils" |
| 4 | LICENSE = "LGPL-2.1+ & GPL-2+" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=c756d9d5dabc27663df64f0bf492166c" |
| 6 | |
| 7 | SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ |
| 8 | file://disable-git-version-gen.patch \ |
| 9 | file://update-gawk-paths.patch \ |
| 10 | file://Makefile-ptest.patch \ |
| 11 | file://run-ptest \ |
| 12 | file://mips-SIGEMT.patch \ |
| 13 | file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ |
| 14 | file://ptest-spacesave.patch \ |
| 15 | file://uintptr_t.patch \ |
| 16 | file://0001-strace-fix-reproducibilty-issues.patch \ |
| 17 | " |
| 18 | SRC_URI[md5sum] = "dbce2e84632b39a4ed86b9fc60447af9" |
| 19 | SRC_URI[sha256sum] = "9f58958c8e59ea62293d907d10572e352b582bd7948ed21aa28ebb47e5bf30ff" |
| 20 | |
| 21 | inherit autotools ptest |
| 22 | |
| 23 | PACKAGECONFIG_class-target ??= "\ |
| 24 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ |
| 25 | " |
| 26 | |
| 27 | PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" |
| 28 | PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" |
| 29 | |
| 30 | EXTRA_OECONF += "--enable-mpers=no" |
| 31 | |
| 32 | CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext" |
| 33 | |
| 34 | TESTDIR = "tests" |
| 35 | PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" |
| 36 | |
| 37 | do_install_append() { |
| 38 | # We don't ship strace-graph here because it needs perl |
| 39 | rm ${D}${bindir}/strace-graph |
| 40 | } |
| 41 | |
| 42 | do_compile_ptest() { |
| 43 | oe_runmake -C ${TESTDIR} buildtest-TESTS |
| 44 | } |
| 45 | |
| 46 | do_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} |
| 50 | sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile |
| 51 | } |
| 52 | |
| 53 | RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" |
| 54 | |
| 55 | BBCLASSEXTEND = "native" |
| 56 | TOOLCHAIN = "gcc" |