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 | " |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 18 | SRC_URI[sha256sum] = "fe3982ea4cd9aeb3b4ba35f6279f0b577a37175d3282be24b9a5537b56b8f01c" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | |
| 20 | inherit autotools ptest |
| 21 | |
| 22 | PACKAGECONFIG_class-target ??= "\ |
| 23 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ |
| 24 | " |
| 25 | |
| 26 | PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5" |
| 27 | PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" |
| 28 | |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 29 | EXTRA_OECONF += "--enable-mpers=no --disable-gcc-Werror" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | |
| 31 | CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext" |
| 32 | |
| 33 | TESTDIR = "tests" |
| 34 | PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD|LDFLAGS_FOR_BUILD)" |
| 35 | |
| 36 | do_install_append() { |
| 37 | # We don't ship strace-graph here because it needs perl |
| 38 | rm ${D}${bindir}/strace-graph |
| 39 | } |
| 40 | |
| 41 | do_compile_ptest() { |
| 42 | oe_runmake -C ${TESTDIR} buildtest-TESTS |
| 43 | } |
| 44 | |
| 45 | do_install_ptest() { |
| 46 | oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} |
| 47 | install -m 755 ${S}/test-driver ${D}${PTEST_PATH} |
| 48 | install -m 644 ${B}/config.h ${D}${PTEST_PATH} |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 49 | sed -i -e '/^src/s/strace.*[0-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed" |
| 53 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 54 | RDEPENDS_${PN}-ptest_append_libc-glibc = "\ |
| 55 | locale-base-en-us.iso-8859-1 \ |
| 56 | " |
| 57 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 58 | BBCLASSEXTEND = "native" |
| 59 | TOOLCHAIN = "gcc" |