# -*- 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             app     1.0
PortGroup             cargo   1.0
PortGroup             github  1.0

github.setup          fralonra wgshadertoy 0.3.3 v
github.tarball_from   archive
revision              0

description           A WGSL playground inspired by Shadertoy
long_description      WgShadertoy is a WGSL playground inspired by Shadertoy. \
                      It uses a binary format 'wgs' to save and load shaders and textures.

categories            graphics
installs_libs         no
license               MIT
maintainers           {gmail.com:zoronlivingston @fralonra} \
                      openmaintainer

checksums             ${distname}${extract.suffix} \
                      rmd160  42ee4d601ce34a617b3988ca7e77831f595d42e3 \
                      sha256  a6d8b32874561142ce6d3b719b09911a67ba0a3f4797a3620b7465e7158d06f8 \
                      size    836025

app.name              WgShadertoy
app.icon              ${worksrcpath}/extra/logo/wgshadertoy.svg
app.retina            yes

fetch.type            git

post-extract {
    build.env-append  GIT_COMMIT_HASH=[exec git -C ${worksrcpath} rev-parse --short HEAD]
}

build.pre_args-delete --frozen --offline

destroot {
    xinstall -m 0755 \
        ${worksrcpath}/target/[cargo.rust_platform]/release/${name} \
        ${destroot}${prefix}/bin/
}
