| Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Valgrind memory debugger and instrumentation framework" | 
 | 2 | HOMEPAGE = "http://valgrind.org/" | 
 | 3 | BUGTRACKER = "http://valgrind.org/support/bug_reports.html" | 
 | 4 | LICENSE = "GPLv2 & GPLv2+ & BSD" | 
 | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \ | 
 | 6 |                     file://include/pub_tool_basics.h;beginline=1;endline=29;md5=e7071929a50d4b0fc27a3014b315b0f7 \ | 
 | 7 |                     file://include/valgrind.h;beginline=1;endline=56;md5=92df8a1bde56fe2af70931ff55f6622f \ | 
 | 8 |                     file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215" | 
 | 9 |  | 
 | 10 | X11DEPENDS = "virtual/libx11" | 
 | 11 | DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ | 
 | 12 |            ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ | 
 | 13 |         " | 
 | 14 |  | 
 | 15 | SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ | 
 | 16 |            file://fixed-perl-path.patch \ | 
 | 17 |            file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ | 
 | 18 |            file://sepbuildfix.patch \ | 
 | 19 |            file://glibc.patch \ | 
 | 20 |            file://force-nostabs.patch \ | 
 | 21 |            file://remove-arm-variant-specific.patch \ | 
 | 22 |            file://remove-ppc-tests-failing-build.patch \ | 
 | 23 |            file://valgrind-remove-rpath.patch \ | 
 | 24 |            file://enable.building.on.4.x.kernel.patch \ | 
 | 25 |            file://add-ptest.patch \ | 
 | 26 |            file://pass-maltivec-only-if-it-supported.patch \ | 
 | 27 |            file://run-ptest \ | 
 | 28 |            file://0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch \ | 
 | 29 |           " | 
 | 30 |  | 
 | 31 | SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f" | 
 | 32 | SRC_URI[sha256sum] = "fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997" | 
 | 33 |  | 
 | 34 | COMPATIBLE_HOST = '(i.86|x86_64|mips|powerpc|powerpc64).*-linux' | 
 | 35 | COMPATIBLE_HOST_armv7a = 'arm.*-linux' | 
 | 36 |  | 
 | 37 | PR = "r1" | 
 | 38 |  | 
 | 39 | inherit autotools ptest | 
 | 40 |  | 
 | 41 | EXTRA_OECONF = "--enable-tls --without-mpicc" | 
 | 42 | EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc" | 
 | 43 | EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS', True) != '32']}" | 
 | 44 | EXTRA_OEMAKE = "-w" | 
 | 45 |  | 
 | 46 | do_install_append () { | 
 | 47 |     install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ | 
 | 48 | } | 
 | 49 |  | 
 | 50 | RDEPENDS_${PN} += "perl" | 
 | 51 |  | 
 | 52 | FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*" | 
 | 53 |  | 
 | 54 | # valgrind needs debug information for ld.so at runtime in order to | 
 | 55 | # redirect functions like strlen. | 
 | 56 | RRECOMMENDS_${PN} += "${TCLIBC}-dbg" | 
 | 57 |  | 
 | 58 | RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob" | 
 | 59 |  | 
 | 60 | do_compile_ptest() { | 
 | 61 |     oe_runmake check CFLAGS="${CFLAGS} -O0" CXXFLAGS="${CXXFLAGS} -O0" | 
 | 62 | } | 
 | 63 |  | 
 | 64 |  | 
 | 65 | do_install_ptest() { | 
 | 66 |     chmod +x ${B}/tests/vg_regtest | 
 | 67 |  | 
 | 68 |     # The test application binaries are not automatically installed. | 
 | 69 |     # Grab them from the build directory. | 
 | 70 |     # | 
 | 71 |     # The regression tests require scripts and data files that are not | 
 | 72 |     # copied to the build directory.  They must be copied from the | 
 | 73 |     # source directory.  | 
 | 74 |     saved_dir=$PWD | 
 | 75 |     for parent_dir in ${S} ${B} ; do | 
 | 76 |         cd $parent_dir | 
 | 77 |  | 
 | 78 |         # exclude shell or the package won't install | 
 | 79 |         rm -rf none/tests/shell* 2>/dev/null | 
 | 80 |  | 
 | 81 |         subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests" | 
 | 82 |  | 
 | 83 |         # Get the vg test scripts, filters, and expected files | 
 | 84 |         for dir in $subdirs ; do | 
 | 85 |             find $dir | cpio -pvdu ${D}${PTEST_PATH} | 
 | 86 |         done | 
 | 87 |         cd $saved_dir | 
 | 88 |     done | 
 | 89 |  | 
 | 90 |     # clean out build artifacts before building the rpm | 
 | 91 |     find ${D}${PTEST_PATH} \ | 
 | 92 |          \( -name "Makefile*" \ | 
 | 93 |         -o -name "*.o" \ | 
 | 94 |         -o -name "*.c" \ | 
 | 95 |         -o -name "*.S" \ | 
 | 96 |         -o -name "*.h" \) \ | 
 | 97 |         -exec rm {} \; | 
 | 98 |  | 
 | 99 |     # needed by massif tests | 
 | 100 |     cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print | 
 | 101 |  | 
 | 102 |     # handle multilib | 
 | 103 |     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest | 
 | 104 | } | 
 | 105 |  |