# -*- 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.14.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  82e74df8e0af346fc67699693410aa845c896b08 \
                    sha256  39df9db43c792b0ab71cde97bdc03d4763fff7d3525b67d549ffc8bfc99b6395 \
                    size    4110929

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