summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb122
1 files changed, 122 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb b/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
new file mode 100644
index 0000000000..6e92c22bec
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb
@@ -0,0 +1,122 @@
1SECTION = "devel"
2SUMMARY = "Linux Trace Toolkit Control"
3DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
4to extract program execution details from the Linux operating system \
5and interpret them."
6
7LICENSE = "GPLv2 & LGPLv2.1"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
9 file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
11
12DEPENDS = "liburcu popt libxml2 util-linux"
13RDEPENDS_${PN} = "libgcc"
14RDEPENDS_${PN}-ptest += "make perl bash gawk ${PN} babeltrace procps"
15# babelstats.pl wants getopt-long
16RDEPENDS_${PN}-ptest += "perl-module-getopt-long"
17
18PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
19 am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
20 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
21"
22PACKAGECONFIG ??= "lttng-ust"
23PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
24PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
25PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
26PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
27PACKAGECONFIG_remove_libc-musl = "lttng-ust"
28
29SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
30 file://x32.patch \
31 file://run-ptest \
32 "
33
34SRC_URI[md5sum] = "051224eb991aee07f8721ff1877d0b96"
35SRC_URI[sha256sum] = "77839eb6fc6c652125f08acfd9369701c2516eb05cc2084160e7efc7a3fb731c"
36
37inherit autotools ptest pkgconfig useradd python3-dir manpages
38
39USERADD_PACKAGES = "${PN}"
40GROUPADD_PARAM_${PN} = "tracing"
41
42FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
43 ${PYTHON_SITEPACKAGES_DIR}/*"
44FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
45FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
46
47# Since files are installed into ${libdir}/lttng/libexec we match
48# the libexec insane test so skip it.
49# Python module needs to keep _lttng.so
50INSANE_SKIP_${PN} = "libexec dev-so"
51INSANE_SKIP_${PN}-dbg = "libexec"
52
53do_install_ptest () {
54 for f in Makefile tests/Makefile tests/utils/utils.sh ; do
55 install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
56 done
57
58 for f in config/tap-driver.sh config/test-driver ; do
59 install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
60 done
61
62 # Prevent 'make check' from recursing into non-test subdirectories.
63 sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
64
65 # We don't need these
66 sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile"
67
68 # We shouldn't need to build anything in tests/utils
69 sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \
70 "${D}${PTEST_PATH}/tests/Makefile"
71
72 # Copy the tests directory tree and the executables and
73 # Makefiles found within.
74 for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
75 install -d "${D}${PTEST_PATH}/tests/$d"
76 find "${B}/tests/$d" -maxdepth 1 -executable -type f \
77 -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
78 test -r "${B}/tests/$d/Makefile" && \
79 install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
80 done
81
82 # We shouldn't need to build anything in tests/regression/tools
83 sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \
84 "${D}${PTEST_PATH}/tests/regression/Makefile"
85
86 # Prevent attempts to update Makefiles during test runs, and
87 # silence "Making check in $SUBDIR" messages.
88 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
89 sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
90 -e '/echo "Making $$target in $$subdir"; \\/d' \
91 -e 's/^srcdir = \(.*\)/srcdir = ./' \
92 -e 's/^builddir = \(.*\)/builddir = ./' \
93 -e 's/^all-am:.*/all-am:/' \
94 {} +
95
96 # These objects trigger [rpaths] QA checks; the test harness
97 # skips the associated tests if they're missing, so delete
98 # them.
99 objs=""
100 objs="$objs regression/ust/ust-dl/libbar.so"
101 objs="$objs regression/ust/ust-dl/libfoo.so"
102 for obj in $objs ; do
103 rm -f "${D}${PTEST_PATH}/tests/${obj}"
104 done
105
106 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
107 touch -r "${B}/Makefile" {} +
108
109 # Substitute links to installed binaries.
110 for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd ; do
111 exedir="${D}${PTEST_PATH}/src/bin/${prog}"
112 install -d "$exedir"
113 case "$prog" in
114 lttng-consumerd)
115 ln -s "${libdir}/lttng/libexec/$prog" "$exedir"
116 ;;
117 *)
118 ln -s "${bindir}/$prog" "$exedir"
119 ;;
120 esac
121 done
122}