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

deprecated.eol_version yes

name                dotnet-sdk-2.1
version             2.1.818
revision            1
categories          dotnet devel
license             MIT
maintainers         {@judaew judaew} openmaintainer

description         Core functionality needed to create .NET Core projects, that is \
                    shared between Visual Studio and CLI

long_description    .NET is a free, cross-platform, open source developer platform \
                    for building many different types of applications. \
                    \
                    With .NET, you can use multiple languages, editors, and libraries \
                    to build for web, mobile, desktop, games, and IoT.

homepage            https://dotnet.microsoft.com/
platforms           {darwin any} {darwin >= 16}
distname            dotnet-sdk-${version}-osx-x64
master_sites        https://builds.dotnet.microsoft.com/dotnet/Sdk/${version}/

checksums           rmd160  f013b7b489627ad0df00a0afe4496d06e7d03e80 \
                    sha256  eceea62b5ae716fa149ceabfd9de66f89fd91f48e701be3ea498d7f3cbc8a988 \
                    size    167336021

worksrcdir          ${name}-${version}
extract.mkdir       yes

use_configure       no

depends_run         port:dotnet-cli \
                    port:dotnet-runtime-2.1 \
                    port:aspnetcore-runtime-2.1

build {}

destroot {
    set dotnet_home ${prefix}/share/dotnet

    # Create the target directory
    xinstall -d ${destroot}${dotnet_home}/sdk

    move ${worksrcpath}/sdk/${version} ${destroot}${dotnet_home}/sdk
}

livecheck.type      regex
livecheck.url       https://dotnet.microsoft.com/download/dotnet/2.1
livecheck.regex     "SDK (\\d+(?:\\.\\d+)*)"
