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

PortSystem          1.0
PortGroup           github 1.0
PortGroup           makefile 1.0

github.setup        Cyan4973 xxhash 0.8.2 v
categories          devel
maintainers         {mps @Schamschula} openmaintainer
description         xxHash is an Extremely fast Hash algorithm, running at RAM speed \
                    limits.
long_description    {*}${description}
platforms           darwin

checksums           rmd160  d43e9dec217723faa4c2d86f044cec04d484c303 \
                    sha256  2de0721e622b5eb38585f165641e0fb05dab07aae31fb1db41d7ae4cb9ac57cd \
                    size    1141201

if {[string match "*gcc-4.*" ${configure.compiler}]} {
    # See https://trac.macports.org/ticket/60710 for why this is needed.
    patchfiles-append \
                    patch-Makefile-gcc.diff
}

# see https://trac.macports.org/ticket/67963
# clang: error: unable to execute command: Segmentation fault: 11
patchfiles-append lion-clang-segfault-fix.diff

subport ${name} {
    revision        2

    license         GPL-2+

    depends_run     port:${name}lib

    post-destroot {
        file delete -force ${destroot}${prefix}/include
        file delete -force ${destroot}${prefix}/lib
    }
}

subport ${name}lib {
    revision        3

    license         BSD

    post-destroot {
        file delete -force ${destroot}${prefix}/bin
        file delete -force ${destroot}${prefix}/share
    }
}
