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

github.setup        typst typst 0.13.1 v
github.tarball_from archive
revision            0
epoch               1

homepage            https://typst.app

description         \
    A new markup-based typesetting system that is powerful and easy to learn.

long_description    \
    Typst is a new markup-based typsetting system that is designed to be as \
    powerful as LaTeX while being much easier to learn and use. Typst has \
    built-in markup for the most common formatting tasks, flexible functions \
    for everything else, a tightly integrated scripting system, math \
    typesetting, bibliography management, and more. Typst also has fast \
    compile times thanks to incremental compilatioa, as well as friendly \
    error messages in case something goes wrong.

checksums           rmd160  10809595a8059b171bdeb21c143b485bb62c1858 \
                    sha256  2ffd8443668bc0adb59e9893f7904fd9f64dce8799a1930569f56a91305e8b71 \
                    size    3640907

categories          textproc
installs_libs       no
license             Apache-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

build.pre_args-delete \
                    --frozen --offline
build.dir           ${worksrcpath}/cli

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

    xinstall -d ${destroot}${prefix}/share/doc/${name}
    copy {*}[glob ${worksrcpath}/docs/*] \
        ${destroot}${prefix}/share/doc/${name}/
}

github.livecheck.regex \
                    (\[0-9.\]+\\.?\[0-9.\]+\\.?\[0-9.\]+)
