# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 114328 2013-12-05 10:21:52Z ryandesign@macports.org $

PortSystem 1.0

name            google-perftools
version         2.0
description     Fast, multi-threaded malloc() and nifty performance analysis tools
long_description    These tools are for use by developers so that they can create \
    more robust applications. Especially of use to those developing multi-threaded \
    applications in C++ with templates. Includes TCMalloc, heap-checker, heap-profiler \
    and cpu-profiler.
maintainers     nomaintainer
license         BSD
categories      devel
platforms       darwin
homepage        http://code.google.com/p/gperftools/
master_sites    googlecode:gperftools

distname        gperftools-${version}

checksums       sha1    da7181a7ba9b5ee7302daf6c16e886c179fe8d1b \
                rmd160  565943c6e6ca4e7cc318d98d46dcf757f7486bd3

# http://code.google.com/p/google-perftools/issues/detail?id=66
if {![variant_isset universal] && ${build_arch} eq "x86_64" ||
    [variant_isset universal] && [string match *x86_64* $universal_archs]} {
    configure.args-append --enable-frame-pointers \
                          --build=x86_64-apple-${os.platform}${os.major}
}
