blob: d320a8a5e095de7a8c9ebba8691d635a2aa80d73 [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 Geisslerfc113ea2023-03-31 09:59:46 -050037# | ../git/elaborate.cxx:2601:21: error: storing the address of local variable 'sym' in '*s.systemtap_session::symbol_resolver' [-Werror=dangling-pointer=]
38CXXFLAGS += "-Wno-dangling-pointer"
39
Andrew Geissler6ce62a22020-11-30 19:58:47 -060040# exporter comes with python3-probes
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041PACKAGES =+ "${PN}-exporter"
Patrick Williams213cb262021-08-07 19:21:33 -050042FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043 ${sysconfdir}/sysconfig/stap-exporter \
Andrew Geissler5199d832021-09-24 16:47:35 -050044 ${systemd_system_unitdir}/stap-exporter.service \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080045 ${sbindir}/stap-exporter"
Patrick Williams213cb262021-08-07 19:21:33 -050046RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient"
47SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080048
Andrew Geissler6ce62a22020-11-30 19:58:47 -060049PACKAGES =+ "${PN}-runtime"
Patrick Williams213cb262021-08-07 19:21:33 -050050FILES:${PN}-runtime = "\
Andrew Geissler6ce62a22020-11-30 19:58:47 -060051 ${bindir}/staprun \
52 ${bindir}/stap-merge \
53 ${bindir}/stapsh \
54 ${libexecdir}/${BPN}/stapio \
55"
Patrick Williams213cb262021-08-07 19:21:33 -050056RDEPENDS:${PN}:class-target += "${PN}-runtime"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060057
58PACKAGES =+ "${PN}-examples"
Patrick Williams213cb262021-08-07 19:21:33 -050059FILES:${PN}-examples = "${datadir}/${BPN}/examples/"
60RDEPENDS:${PN}-examples += "${PN}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060061
62# don't complain that some examples involve bash, perl, php...
Patrick Williams213cb262021-08-07 19:21:33 -050063INSANE_SKIP:${PN}-examples += "file-rdeps"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060064
65PACKAGES =+ "${PN}-python"
Patrick Williams213cb262021-08-07 19:21:33 -050066FILES:${PN}-python += "\
Andrew Geissler6ce62a22020-11-30 19:58:47 -060067 ${bindir}/dtrace \
68 ${libdir}/python*/ \
69 ${libexecdir}/${BPN}/python/ \
70"
71# python material requires sdt headers
Patrick Williams213cb262021-08-07 19:21:33 -050072RDEPENDS:${PN}-python += "${PN}-dev python3-core"
73INSANE_SKIP:${PN}-python += "dev-deps"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060074
Patrick Williams213cb262021-08-07 19:21:33 -050075do_configure:prepend () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080076 # Improve reproducibility for c++ object files
77 reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}"
78 sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h
79}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050080
Patrick Williams213cb262021-08-07 19:21:33 -050081do_install:append () {
Brad Bishop316dfdd2018-06-25 12:45:53 -040082 if [ ! -f ${D}${bindir}/stap ]; then
83 # translator disabled case, need to leave only minimal runtime
84 rm -rf ${D}${datadir}/${PN}
85 rm ${D}${libexecdir}/${PN}/stap-env
86 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080087
Andrew Geissler6ce62a22020-11-30 19:58:47 -060088 if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
Brad Bishop64c979e2019-11-04 13:55:29 -050089 # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
90 # without usrmerge distro feature enabled
91 install -d `dirname ${D}${systemd_unitdir}`
92 mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
93 rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
94 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080095
96 # Ensure correct ownership for files copied in
Andrew Geissler6ce62a22020-11-30 19:58:47 -060097 if [ -d ${D}${sysconfdir}/stap-exporter ]; then
98 chown root:root ${D}${sysconfdir}/stap-exporter/* -R
99 fi
Brad Bishop316dfdd2018-06-25 12:45:53 -0400100}
101
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500102BBCLASSEXTEND = "nativesdk"