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