# -*- 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.4 v
github.tarball_from archive

categories          devel
maintainers         {mps @Schamschula} openmaintainer
description         xxHash is an Extremely fast Hash algorithm, running at RAM speed \
                    limits.
long_description    {*}${description}

checksums           rmd160  cfb63bc04f3f1a26c4b8ecd7118f0e3f57bba158 \
                    sha256  5738270935e7c3d38a79b3adf7c9692566ce7895a25f67de43ad52ab504acd32 \
                    size    1167538

# Avoid build failures due to use of MMX instructions
# See: https://trac.macports.org/ticket/71687
compiler.blacklist-append \
                    {clang < 900}

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
}

subport ${name} {
    revision        0

    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        0

    license         BSD

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