1*4882a593SmuzhiyunSUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux" 2*4882a593SmuzhiyunDESCRIPTION = "It provides free software infrastructure to simplify the \ 3*4882a593Smuzhiyungathering of information about the running Linux system. This assists \ 4*4882a593Smuzhiyundiagnosis of a performance or functional problem." 5*4882a593SmuzhiyunHOMEPAGE = "https://sourceware.org/systemtap/" 6*4882a593Smuzhiyun 7*4882a593Smuzhiyunrequire systemtap_git.inc 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunSRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch \ 10*4882a593Smuzhiyun file://0001-staprun-address-ncurses-6.3-failures.patch \ 11*4882a593Smuzhiyun file://0001-gcc12-c-compatibility-re-tweak-for-rhel6-use-functio.patch \ 12*4882a593Smuzhiyun " 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunDEPENDS = "elfutils" 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunEXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ 17*4882a593Smuzhiyun --without-nss --without-avahi --without-dyninst \ 18*4882a593Smuzhiyun --disable-server --disable-grapher --enable-prologues \ 19*4882a593Smuzhiyun --with-python3 --without-python2-probes \ 20*4882a593Smuzhiyun ac_cv_prog_have_javac=no \ 21*4882a593Smuzhiyun ac_cv_prog_have_jar=no " 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunSTAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunEXTRA_OECONF += "${STAP_DOCS} " 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunPACKAGECONFIG ??= "translator sqlite monitor python3-probes" 28*4882a593SmuzhiyunPACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash" 29*4882a593SmuzhiyunPACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" 30*4882a593SmuzhiyunPACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" 31*4882a593SmuzhiyunPACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" 32*4882a593SmuzhiyunPACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" 33*4882a593Smuzhiyun 34*4882a593Smuzhiyuninherit autotools gettext pkgconfig systemd 35*4882a593Smuzhiyuninherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)} 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun# exporter comes with python3-probes 38*4882a593SmuzhiyunPACKAGES =+ "${PN}-exporter" 39*4882a593SmuzhiyunFILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \ 40*4882a593Smuzhiyun ${sysconfdir}/sysconfig/stap-exporter \ 41*4882a593Smuzhiyun ${systemd_system_unitdir}/stap-exporter.service \ 42*4882a593Smuzhiyun ${sbindir}/stap-exporter" 43*4882a593SmuzhiyunRDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient" 44*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service" 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunPACKAGES =+ "${PN}-runtime" 47*4882a593SmuzhiyunFILES:${PN}-runtime = "\ 48*4882a593Smuzhiyun ${bindir}/staprun \ 49*4882a593Smuzhiyun ${bindir}/stap-merge \ 50*4882a593Smuzhiyun ${bindir}/stapsh \ 51*4882a593Smuzhiyun ${libexecdir}/${BPN}/stapio \ 52*4882a593Smuzhiyun" 53*4882a593SmuzhiyunRDEPENDS:${PN}:class-target += "${PN}-runtime" 54*4882a593Smuzhiyun 55*4882a593SmuzhiyunPACKAGES =+ "${PN}-examples" 56*4882a593SmuzhiyunFILES:${PN}-examples = "${datadir}/${BPN}/examples/" 57*4882a593SmuzhiyunRDEPENDS:${PN}-examples += "${PN}" 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun# don't complain that some examples involve bash, perl, php... 60*4882a593SmuzhiyunINSANE_SKIP:${PN}-examples += "file-rdeps" 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunPACKAGES =+ "${PN}-python" 63*4882a593SmuzhiyunFILES:${PN}-python += "\ 64*4882a593Smuzhiyun ${bindir}/dtrace \ 65*4882a593Smuzhiyun ${libdir}/python*/ \ 66*4882a593Smuzhiyun ${libexecdir}/${BPN}/python/ \ 67*4882a593Smuzhiyun" 68*4882a593Smuzhiyun# python material requires sdt headers 69*4882a593SmuzhiyunRDEPENDS:${PN}-python += "${PN}-dev python3-core" 70*4882a593SmuzhiyunINSANE_SKIP:${PN}-python += "dev-deps" 71*4882a593Smuzhiyun 72*4882a593Smuzhiyundo_configure:prepend () { 73*4882a593Smuzhiyun # Improve reproducibility for c++ object files 74*4882a593Smuzhiyun reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}" 75*4882a593Smuzhiyun sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h 76*4882a593Smuzhiyun} 77*4882a593Smuzhiyun 78*4882a593Smuzhiyundo_install:append () { 79*4882a593Smuzhiyun if [ ! -f ${D}${bindir}/stap ]; then 80*4882a593Smuzhiyun # translator disabled case, need to leave only minimal runtime 81*4882a593Smuzhiyun rm -rf ${D}${datadir}/${PN} 82*4882a593Smuzhiyun rm ${D}${libexecdir}/${PN}/stap-env 83*4882a593Smuzhiyun fi 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then 86*4882a593Smuzhiyun # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) 87*4882a593Smuzhiyun # without usrmerge distro feature enabled 88*4882a593Smuzhiyun install -d `dirname ${D}${systemd_unitdir}` 89*4882a593Smuzhiyun mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` 90*4882a593Smuzhiyun rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty 91*4882a593Smuzhiyun fi 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun # Ensure correct ownership for files copied in 94*4882a593Smuzhiyun if [ -d ${D}${sysconfdir}/stap-exporter ]; then 95*4882a593Smuzhiyun chown root:root ${D}${sysconfdir}/stap-exporter/* -R 96*4882a593Smuzhiyun fi 97*4882a593Smuzhiyun} 98*4882a593Smuzhiyun 99*4882a593SmuzhiyunBBCLASSEXTEND = "nativesdk" 100