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

github.setup        ninxsoft mist-cli 2.2 v
github.tarball_from archive
revision            0

platforms           {darwin >= 20}
supported_archs     arm64 x86_64

categories          sysutils
license             MIT
maintainers         {pguyot @pguyot} openmaintainer

description         A Mac command-line tool to download macOS Firmwares and Installers
long_description    {*}${description}

checksums           rmd160  071688fa72cd7dc03d3a4a1a1319a5bacc734651 \
                    sha256  556b0680ea8aec5be5b111a0858c3434765efe6efe3526432ba13d33232d7706 \
                    size    1725521

# Clearing CPATH because of header conflicts when using swiftPM build system
compiler.cpath

use_configure       no
use_xcode           yes

build.cmd           swift
build.target        build
build.args          --configuration release --disable-sandbox \
                    --cache-path ${workpath}/.swiftpm/cache \
                    --security-path ${workpath}/.swiftpm/security \
                    --config-path ${workpath}/.swiftpm/config

destroot {
    xinstall -m 755 ${worksrcpath}/.build/release/mist ${destroot}${prefix}/bin/
}
