summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb
blob: 7a184468238527ce9f2005f4c9acbc3f8ee0899b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
SUMMARY = "System-Wide Profiler"
DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
of profiling all running code at low overhead."
HOMEPAGE = "http://oprofile.sourceforge.net/news/"
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191"

LICENSE = "LGPLv2.1+ & GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                    file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \
                   "
SECTION = "devel"

DEPENDS = "popt binutils"
DEPENDS_append_powerpc64 = " libpfm4"
DEPENDS_append_powerpc64le = " libpfm4"

COMPATIBLE_HOST_riscv64 = "null"
COMPATIBLE_HOST_riscv32 = "null"

SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
           file://acinclude.m4 \
           file://run-ptest \
           file://0001-Fix-build-with-musl.patch \
           file://0002-Fix-configure-when-bin-sh-is-not-bash.patch \
           file://0003-Define-the-C-preprocessor-variable-to-improve-reprod.patch \
           file://0004-Use-BUILD_DATE-to-improve-reproducibility.patch \
           file://0005-Add-rmb-definition-for-NIOS2-architecture.patch \
           file://0006-replace-sym_iterator-0-with-sym_iterator.patch \
           file://0007-oprofile-doesn-t-want-GNU-levels-of-automake-strictn.patch \
           file://0008-include-linux-limits.h-for-MAX_INPUT.patch \
           file://0009-Prevent-running-check-tests-on-host-if-cross-compili.patch \
           file://0010-oprofile-Determine-the-root-home-directory-dynamical.patch \
"
SRC_URI[sha256sum] = "7ba06f99d7c188389d20d1d5e53ee690c7733f87aa9af62bd664fa0ca235a412"

UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/"
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/"

inherit autotools pkgconfig ptest

EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC="
do_configure () {
	cp ${WORKDIR}/acinclude.m4 ${S}/
	autotools_do_configure
}

EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests"
do_compile_ptest() {
	oe_runmake check
}

do_install_ptest() {
	subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
	for tooltest in ${subdirs}
	do
		find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
	done

	# needed by some libop tests
	cp -r events ${D}${PTEST_PATH}

	# needed by libregex regex_test
	cp libregex/stl.pat ${D}${PTEST_PATH}/libregex
	cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests

	# needed by litutil++ file_manip_tests
	cp ${S}/libutil++/tests/file_manip_tests.cpp \
		libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
}

RDEPENDS_${PN} = "binutils-symlinks"

FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"