1SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux" 2DESCRIPTION = "It provides free software infrastructure to simplify the \ 3gathering of information about the running Linux system. This assists \ 4diagnosis of a performance or functional problem." 5HOMEPAGE = "https://sourceware.org/systemtap/" 6 7require systemtap_git.inc 8 9SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch \ 10 file://0001-staprun-address-ncurses-6.3-failures.patch \ 11 file://0001-gcc12-c-compatibility-re-tweak-for-rhel6-use-functio.patch \ 12 " 13 14DEPENDS = "elfutils" 15 16EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ 17 --without-nss --without-avahi --without-dyninst \ 18 --disable-server --disable-grapher --enable-prologues \ 19 --with-python3 --without-python2-probes \ 20 ac_cv_prog_have_javac=no \ 21 ac_cv_prog_have_jar=no " 22 23STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" 24 25EXTRA_OECONF += "${STAP_DOCS} " 26 27PACKAGECONFIG ??= "translator sqlite monitor python3-probes" 28PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash" 29PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" 30PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" 31PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" 32PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" 33 34inherit autotools gettext pkgconfig systemd 35inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)} 36 37# exporter comes with python3-probes 38PACKAGES =+ "${PN}-exporter" 39FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \ 40 ${sysconfdir}/sysconfig/stap-exporter \ 41 ${systemd_system_unitdir}/stap-exporter.service \ 42 ${sbindir}/stap-exporter" 43RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient" 44SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service" 45 46PACKAGES =+ "${PN}-runtime" 47FILES:${PN}-runtime = "\ 48 ${bindir}/staprun \ 49 ${bindir}/stap-merge \ 50 ${bindir}/stapsh \ 51 ${libexecdir}/${BPN}/stapio \ 52" 53RDEPENDS:${PN}:class-target += "${PN}-runtime" 54 55PACKAGES =+ "${PN}-examples" 56FILES:${PN}-examples = "${datadir}/${BPN}/examples/" 57RDEPENDS:${PN}-examples += "${PN}" 58 59# don't complain that some examples involve bash, perl, php... 60INSANE_SKIP:${PN}-examples += "file-rdeps" 61 62PACKAGES =+ "${PN}-python" 63FILES:${PN}-python += "\ 64 ${bindir}/dtrace \ 65 ${libdir}/python*/ \ 66 ${libexecdir}/${BPN}/python/ \ 67" 68# python material requires sdt headers 69RDEPENDS:${PN}-python += "${PN}-dev python3-core" 70INSANE_SKIP:${PN}-python += "dev-deps" 71 72do_configure:prepend () { 73 # Improve reproducibility for c++ object files 74 reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}" 75 sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h 76} 77 78do_install:append () { 79 if [ ! -f ${D}${bindir}/stap ]; then 80 # translator disabled case, need to leave only minimal runtime 81 rm -rf ${D}${datadir}/${PN} 82 rm ${D}${libexecdir}/${PN}/stap-env 83 fi 84 85 if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then 86 # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) 87 # without usrmerge distro feature enabled 88 install -d `dirname ${D}${systemd_unitdir}` 89 mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` 90 rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty 91 fi 92 93 # Ensure correct ownership for files copied in 94 if [ -d ${D}${sysconfdir}/stap-exporter ]; then 95 chown root:root ${D}${sysconfdir}/stap-exporter/* -R 96 fi 97} 98 99BBCLASSEXTEND = "nativesdk" 100