blob: 072fcb310a8894b4f8e609fc8488d6d98401b3d4 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "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."
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005HOMEPAGE = "https://sourceware.org/systemtap/"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
7require systemtap_git.inc
8
Andrew Geisslerd5838332022-05-27 11:33:10 -05009SRC_URI += " \
10 file://0001-improve-reproducibility-for-c-compiling.patch \
11 file://0001-staprun-address-ncurses-6.3-failures.patch \
Andrew Geisslereff27472021-10-29 15:35:00 -050012 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013
Brad Bishop316dfdd2018-06-25 12:45:53 -040014DEPENDS = "elfutils"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
16EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
17 --without-nss --without-avahi --without-dyninst \
18 --disable-server --disable-grapher --enable-prologues \
Brad Bishop37a0e4d2017-12-04 01:01:44 -050019 --with-python3 --without-python2-probes \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020 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
Brad Bishop316dfdd2018-06-25 12:45:53 -040027PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060028PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060030PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
31PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
Brad Bishop37a0e4d2017-12-04 01:01:44 -050032PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033
Andrew Geissler6ce62a22020-11-30 19:58:47 -060034inherit autotools gettext pkgconfig systemd
Andrew Geissler595f6302022-01-24 19:11:47 +000035inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036
Andrew Geissler6ce62a22020-11-30 19:58:47 -060037# exporter comes with python3-probes
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038PACKAGES =+ "${PN}-exporter"
Patrick Williams213cb262021-08-07 19:21:33 -050039FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040 ${sysconfdir}/sysconfig/stap-exporter \
Andrew Geissler5199d832021-09-24 16:47:35 -050041 ${systemd_system_unitdir}/stap-exporter.service \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042 ${sbindir}/stap-exporter"
Patrick Williams213cb262021-08-07 19:21:33 -050043RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient"
44SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045
Andrew Geissler6ce62a22020-11-30 19:58:47 -060046PACKAGES =+ "${PN}-runtime"
Patrick Williams213cb262021-08-07 19:21:33 -050047FILES:${PN}-runtime = "\
Andrew Geissler6ce62a22020-11-30 19:58:47 -060048 ${bindir}/staprun \
49 ${bindir}/stap-merge \
50 ${bindir}/stapsh \
51 ${libexecdir}/${BPN}/stapio \
52"
Patrick Williams213cb262021-08-07 19:21:33 -050053RDEPENDS:${PN}:class-target += "${PN}-runtime"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060054
55PACKAGES =+ "${PN}-examples"
Patrick Williams213cb262021-08-07 19:21:33 -050056FILES:${PN}-examples = "${datadir}/${BPN}/examples/"
57RDEPENDS:${PN}-examples += "${PN}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060058
59# don't complain that some examples involve bash, perl, php...
Patrick Williams213cb262021-08-07 19:21:33 -050060INSANE_SKIP:${PN}-examples += "file-rdeps"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060061
62PACKAGES =+ "${PN}-python"
Patrick Williams213cb262021-08-07 19:21:33 -050063FILES:${PN}-python += "\
Andrew Geissler6ce62a22020-11-30 19:58:47 -060064 ${bindir}/dtrace \
65 ${libdir}/python*/ \
66 ${libexecdir}/${BPN}/python/ \
67"
68# python material requires sdt headers
Patrick Williams213cb262021-08-07 19:21:33 -050069RDEPENDS:${PN}-python += "${PN}-dev python3-core"
70INSANE_SKIP:${PN}-python += "dev-deps"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060071
Patrick Williams213cb262021-08-07 19:21:33 -050072do_configure:prepend () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080073 # 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}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050077
Patrick Williams213cb262021-08-07 19:21:33 -050078do_install:append () {
Brad Bishop316dfdd2018-06-25 12:45:53 -040079 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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080084
Andrew Geissler6ce62a22020-11-30 19:58:47 -060085 if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
Brad Bishop64c979e2019-11-04 13:55:29 -050086 # 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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080092
93 # Ensure correct ownership for files copied in
Andrew Geissler6ce62a22020-11-30 19:58:47 -060094 if [ -d ${D}${sysconfdir}/stap-exporter ]; then
95 chown root:root ${D}${sysconfdir}/stap-exporter/* -R
96 fi
Brad Bishop316dfdd2018-06-25 12:45:53 -040097}
98
Brad Bishop6e60e8b2018-02-01 10:27:11 -050099BBCLASSEXTEND = "nativesdk"