# -*- 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        sass dart-sass 1.86.3
github.tarball_from archive
categories          www textproc
supported_archs     x86_64 arm64
license             MIT
maintainers         @queensferryme openmaintainer
description         The reference implementation of Sass, written in Dart.
long_description    Dart Sass is the primary implementation of Sass, which means \
                    it gets new features before any other implementation. It's fast, \
                    easy to install, and it compiles to pure JavaScript which makes it \
                    easy to integrate into modern web development workflows.
homepage            https://sass-lang.com/dart-sass
checksums           rmd160  044117f24274bcd26cf0ad98b26837f91ba9e1e8 \
                    sha256  b168902cfed5560084f86d3f8a1a9c13fc31ed840644b1ca8a20975f94e21cd0 \
                    size    729880

use_configure       no

depends_build       port:dart-sdk port:buf
build               {
    system -W ${worksrcpath} "dart pub get"
    system -W ${worksrcpath} "dart run grinder protobuf"
    system -W ${worksrcpath} "dart compile exe -Dversion=${version} bin/sass.dart"
}

destroot {
    xinstall ${worksrcpath}/bin/sass.exe ${destroot}${prefix}/bin/sass
}
