# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
supported_archs i386 x86_64
maintainers {raimue @raimue} \
description A powerful open-source memory debugger
Valgrind is a powerful open-source memory debugger. When valgrind is \
attached to a program, it intercepts calls to malloc/new/free/delete and \
all memory operations are checked for invalid read or write.
homepage http://valgrind.org
master_sites http://sourceware.org/pub/valgrind/
mpi.setup -gcc44 -gcc45 -gcc46
depends_build bin:perl:perl5
# Ignore trace reports about boost, Qt and OpenMP
# as they are only used for tests
configure.args --without-mpicc
if {${build_arch} eq "i386"} {
configure.args-append --enable-only32bit
} elseif {${build_arch} eq "x86_64"} {
configure.args-append --enable-only64bit
# valgrind sets up -arch by itself, adding our own interferes with the build
configure.cc_archflags {}
configure.ld_archflags {}
configure.args-delete --enable-only32bit --enable-only64bit
configure.universal_cflags {}
configure.universal_cxxflags {}
configure.universal_ldflags {}
if {${build_arch} eq "i386"} {
# See #25684 and https://bugs.kde.org/show_bug.cgi?id=243362
ui_error "${subport} does not build +universal on a 32-bit only CPU!"
return -code error "unsupported CPU"
if {[gcc_variant_isset]} {
patchfiles-append patch-gcc.diff