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" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 36 | FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 37 | ${sysconfdir}/sysconfig/stap-exporter \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 38 | ${systemd_system_unitdir}/stap-exporter.service \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 39 | ${sbindir}/stap-exporter" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient" |
| 41 | SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 43 | PACKAGES =+ "${PN}-runtime" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 44 | FILES:${PN}-runtime = "\ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 45 | ${bindir}/staprun \ |
| 46 | ${bindir}/stap-merge \ |
| 47 | ${bindir}/stapsh \ |
| 48 | ${libexecdir}/${BPN}/stapio \ |
| 49 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | RDEPENDS:${PN}:class-target += "${PN}-runtime" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 51 | |
| 52 | PACKAGES =+ "${PN}-examples" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | FILES:${PN}-examples = "${datadir}/${BPN}/examples/" |
| 54 | RDEPENDS:${PN}-examples += "${PN}" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 55 | |
| 56 | # don't complain that some examples involve bash, perl, php... |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 57 | INSANE_SKIP:${PN}-examples += "file-rdeps" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 58 | |
| 59 | PACKAGES =+ "${PN}-python" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | FILES:${PN}-python += "\ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 61 | ${bindir}/dtrace \ |
| 62 | ${libdir}/python*/ \ |
| 63 | ${libexecdir}/${BPN}/python/ \ |
| 64 | " |
| 65 | # python material requires sdt headers |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | RDEPENDS:${PN}-python += "${PN}-dev python3-core" |
| 67 | INSANE_SKIP:${PN}-python += "dev-deps" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | do_configure:prepend () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 75 | do_install:append () { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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" |