1*edff4923SAndrew GeisslerSUMMARY = "Trace and analyze execution of a program written in C/C++, Rust and Python"
2*edff4923SAndrew GeisslerHOMEPAGE = "https://github.com/namhyung/uftrace"
3*edff4923SAndrew GeisslerBUGTRACKER = "https://github.com/namhyung/uftrace/issues"
4*edff4923SAndrew GeisslerSECTION = "devel"
5*edff4923SAndrew GeisslerLICENSE = "GPL-2.0-only"
6*edff4923SAndrew GeisslerLIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7*edff4923SAndrew Geissler
8*edff4923SAndrew GeisslerDEPENDS = "elfutils"
9*edff4923SAndrew GeisslerDEPENDS:append:libc-musl = " argp-standalone"
10*edff4923SAndrew Geissler
11*edff4923SAndrew Geisslerinherit autotools
12*edff4923SAndrew Geissler
13*edff4923SAndrew GeisslerSRCREV = "68aed9b0a20d3d1b5e1dc15e0f8aabba7e34735b"
14*edff4923SAndrew GeisslerSRC_URI = "git://github.com/namhyung/${BPN};branch=master;protocol=https \
15*edff4923SAndrew Geissler           file://0001-include-libgen.h-for-basename.patch"
16*edff4923SAndrew GeisslerS = "${WORKDIR}/git"
17*edff4923SAndrew Geissler
18*edff4923SAndrew GeisslerLDFLAGS:append:libc-musl = " -largp"
19*edff4923SAndrew Geissler
20*edff4923SAndrew Geisslerdef set_target_arch(d):
21*edff4923SAndrew Geissler    import re
22*edff4923SAndrew Geissler    arch = d.getVar('TARGET_ARCH')
23*edff4923SAndrew Geissler    if re.match(r'i.86', arch, re.I):
24*edff4923SAndrew Geissler        return 'i386'
25*edff4923SAndrew Geissler    elif re.match('armeb', arch, re.I):
26*edff4923SAndrew Geissler        return 'arm'
27*edff4923SAndrew Geissler    else:
28*edff4923SAndrew Geissler        return arch
29*edff4923SAndrew Geissler
30*edff4923SAndrew GeisslerEXTRA_UFTRACE_OECONF = "ARCH=${@set_target_arch(d)} \
31*edff4923SAndrew Geissler                        with_elfutils=/use/libelf/from/sysroot"
32*edff4923SAndrew Geissler
33*edff4923SAndrew Geisslerdo_configure() {
34*edff4923SAndrew Geissler    ${S}/configure ${EXTRA_UFTRACE_OECONF}
35*edff4923SAndrew Geissler}
36*edff4923SAndrew Geissler
37*edff4923SAndrew GeisslerFILES_SOLIBSDEV = ""
38*edff4923SAndrew GeisslerFILES:${PN} += "${libdir}/*.so"
39*edff4923SAndrew Geissler
40*edff4923SAndrew GeisslerCOMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|riscv64)"
41*edff4923SAndrew Geissler
42*edff4923SAndrew Geissler# uftrace supports armv6 and above
43*edff4923SAndrew GeisslerCOMPATIBLE_HOST:armv4 = 'null'
44*edff4923SAndrew GeisslerCOMPATIBLE_HOST:armv5 = 'null'
45