# -*- 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$

PortSystem          1.0

name                google-perftools
version             2.4
categories          devel
platforms           darwin
license             BSD
maintainers         nomaintainer

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.
homepage            http://code.google.com/p/gperftools

master_sites        https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk
distname            gperftools-${version}
checksums           rmd160  19ce825850b8a3bc50db54fa022390878dd753bb \
                    sha256  982a37226eb42f40714e26b8076815d5ea677a422fb52ff8bfca3704d9c30a2d

# 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}
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     gperftools-(\\d+(\\.\\d+)*)${extract.suffix}