# -*- 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.0 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  4aabed2e244e99c0c7f667a8131775b7a48caaef \
                    sha256  5a7224e32a555ac647ff202667a183b80d35539b685b3ce64bedf5d4e5a1a286 \
                    size    3639558

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.\]+)
