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

github.setup        simd-everywhere simde 0.7.2 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
categories          devel
license             MIT
maintainers         @jasonliu-- openmaintainer

description         library that implements SIMD instruction sets for \
                    systems which don't natively support them
long_description    SIMDe (SIMD everywhere) is a header-only library \
                    that provides fast, portable implementations of \
                    SIMD (Single Instruction, Multiple Data) \
                    intrinsics on hardware which doesn't natively \
                    them, such as calling Intel SSE or AVX functions \
                    on an ARM processor, or calling ARM Neon functions \
                    on an Intel processor. \
                    \n \
                    \nThis makes porting code to other architectures \
                    much easier in some key ways. First, instead of \
                    forcing you to rewrite everything for each \
                    architecture, SIMDe lets you get a port up and \
                    running almost effortlessly. Second, SIMDe makes \
                    it easier to write code targeting ISA extensions \
                    you don't have access to, without needing to \
                    resort to using an emulator.

checksums           rmd160  7b814ba0603038012d6ea663deb673afa31430f4 \
                    sha256  7df5285772f28ced8e3dff824a84f5fadb45654974e1e17d0f6a5c984f9b24ad \
                    size    3822187

compiler.blacklist-append   {clang < 1001}

pre-configure {
    if {![variant_isset tests]} {
        configure.args-append   -Dtests=false
    }
}

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 ${build.dir}/test $destroot_share/
    }
}

default_variants    +tests
