# -*- 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        DLTcollab sse2neon d55a36ae38cb79ce4587d7fd7f47c53a4ab55d57
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             0.0.0
revision            20210505
categories          devel
license             MIT
maintainers         @jasonliu-- openmaintainer

description         library for translating Intel SSE intrinsics to \
                    ARM Neon intrinsics
long_description    sse2neon is a C/C++ header file that translates \
                    Intel SSE (Streaming SIMD Extensions) intrinsics \
                    to ARM Neon intrinsics. This allows code that uses \
                    SSE intrinsics to compile and run on ARM \
                    processors without needing to rewrite the code to \
                    directly use Neon intrinsics. \
                    \n \
                    \nIf you need to translate more advanced Intel \
                    intrinsics (such as AVX) to ARM intrinsics, then \
                    please consider using SIMDe (SIMD everywhere) \
                    instead of sse2neon.

checksums           rmd160  7e9dd4321de629478476654af737d587ec2c4dab \
                    sha256  9f1d7915b71b6920e12fd0d2358562f6dcd9e6477d81f3d785b2724c53557658 \
                    size    88677

compiler.blacklist-append   {clang < 1103}

use_configure       no
build.target        {}
destroot.target     {}

post-destroot {
    xinstall ${worksrcpath}/sse2neon.h ${destroot}${prefix}/include
}

variant tests description {Build unit tests} {
    post-destroot {
        set destroot_share ${destroot}${prefix}/share/${name}
        if {![file exists $destroot_share]} {
            file mkdir $destroot_share
        }
        copy ${worksrcpath}/tests $destroot_share/
    }
}

default_variants    +tests

if {![variant_isset tests]} {
    build           {}
    destroot        {}
}
