1SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux" 2HOMEPAGE = "https://sourceware.org/systemtap/" 3 4require systemtap_git.inc 5 6SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch" 7 8DEPENDS = "elfutils" 9 10EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ 11 --without-nss --without-avahi --without-dyninst \ 12 --disable-server --disable-grapher --enable-prologues \ 13 --with-python3 --without-python2-probes \ 14 ac_cv_prog_have_javac=no \ 15 ac_cv_prog_have_jar=no " 16 17STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" 18 19EXTRA_OECONF += "${STAP_DOCS} " 20 21PACKAGECONFIG ??= "translator sqlite monitor python3-probes" 22PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,python3-core bash perl" 23PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" 24PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" 25PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" 26PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" 27 28inherit autotools gettext pkgconfig distutils3-base systemd 29 30PACKAGES =+ "${PN}-exporter" 31 32FILES_${PN}-exporter = "${sysconfdir}/stap-exporter/* \ 33 ${sysconfdir}/sysconfig/stap-exporter \ 34 ${systemd_unitdir}/system/stap-exporter.service \ 35 ${sbindir}/stap-exporter" 36 37RDEPENDS_${PN}-exporter = "${PN} python3-core python3-netclient" 38 39SYSTEMD_SERVICE_${PN}-exporter = "stap-exporter.service" 40 41do_configure_prepend () { 42 # Improve reproducibility for c++ object files 43 reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}" 44 sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h 45} 46 47do_install_append () { 48 if [ ! -f ${D}${bindir}/stap ]; then 49 # translator disabled case, need to leave only minimal runtime 50 rm -rf ${D}${datadir}/${PN} 51 rm ${D}${libexecdir}/${PN}/stap-env 52 fi 53 54 # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) 55 install -d `dirname ${D}${systemd_unitdir}` 56 mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` 57 rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty 58 59 # Ensure correct ownership for files copied in 60 chown root:root ${D}${sysconfdir}/stap-exporter/* -R 61} 62 63BBCLASSEXTEND = "nativesdk" 64