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

github.setup        liberationfonts liberation-fonts 2.1.5
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1

github.master_sites ${github.homepage}/files/7261482
# URL for releases is:
# https://github.com/liberationfonts/liberation-fonts/files/7261482/liberation-fonts-ttf-2.1.5.tar.gz
checksums           rmd160  1b63abd6acc8dc50e9d5264809196d9ba5180b18 \
                    sha256  7191c669bf38899f73a2094ed00f7b800553364f90e2637010a69c0e268f25d0 \
                    size    2385008

categories          x11 fonts
platforms           any
supported_archs     noarch
maintainers         {ctreleaven @ctreleaven} openmaintainer
# See homepage re license -
license             SIL
installs_libs       no

description         replacements for the three commonly used fonts on Microsoft systems

long_description    The Liberation Fonts are intended to be open font replacements for the \
                    three most commonly used fonts on Microsoft systems: Times New Roman, \
                    Arial, and Courier New.

distname            ${name}-ttf-${version}

depends_run         port:fontconfig

use_configure       no

build {}

destroot {
    set fontsdir ${destroot}${prefix}/share/fonts/TTF
    xinstall -d -m 755 ${fontsdir}
    xinstall -m 644 {*}[glob ${worksrcpath}/*.ttf] ${fontsdir}
}

post-activate {
    system "${prefix}/bin/fc-cache -fv ${prefix}/share/fonts"
}