# -*- 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

name                freefont-ttf
version             20120503
categories          x11 fonts
license             GPL-3+
platforms           any
maintainers         {mps @Schamschula} openmaintainer

description         Free UCS Outline Fonts
long_description    A set of free outline fonts covering the ISO \
                    10646/Unicode UCS (Universal Character Set).
homepage            https://www.gnu.org/software/freefont/

installs_libs       no
supported_archs     noarch

master_sites        gnu:freefont
use_zip             yes
checksums           rmd160  6d557859062a9aaf2022f4bfd63b9973f31474f0 \
                    sha256  7c85baf1bf82a1a1845d1322112bc6ca982221b484e3b3925022e25b5cae89af

worksrcdir          freefont-${version}

post-extract {
    foreach f {fonts.dir fonts.scale} {
        system "bzip2 -dc ${filespath}/${f}.bz2 > ${worksrcpath}/${f}"
    }
}
use_configure       no

build {}

destroot {
    set fontdir ${destroot}${prefix}/share/fonts/${name}
    xinstall -d -m 755 ${fontdir}
    foreach f {*.ttf fonts.*} {
        xinstall -m 644 {*}[glob ${worksrcpath}/${f}] ${fontdir}
    }
}

livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
