# -*- 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            urw-fonts
version         1.0.7pre44
categories      x11 fonts
maintainers     nomaintainer
license             GPL-2+
description     Cyrillized free URW fonts
long_description \
                These fonts were made from the free URW fonts distributed with ghostcript. \
                There are NO changes in the latin part of them (I hope). \
                Cyrillic glyphs were added by copying suitable latin ones \
                and painting oulines of unique cyrillic glyphs in same style as the others.
platforms       any
supported_archs noarch
homepage        ftp://ftp.gnome.ru/fonts/urw/release/
master_sites    macports \
                ftp://ftp.gnome.ru/fonts/urw/release/
use_bzip2       yes
checksums       md5 51c6c2690593cd9bd92f197a6f2ff8bd \
                sha1 465fd5faab9ba9e7590f1bf761015862eb09748d \
                rmd160 52bddb1e267e6aa3cace9197293718e4919384bd

depends_run     port:fontconfig

extract.mkdir   yes

use_configure   no

build {}

destroot {
    set fontsdir ${destroot}${prefix}/share/fonts/${name}
    xinstall -d -m 755 ${fontsdir}
    foreach f {*.afm *.pfb *.pfm fonts.*} {
        xinstall -m 644 {*}[glob ${worksrcpath}/${f}] ${fontsdir}
    }
}
post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} COPYING ChangeLog README README.tweaks ${destroot}${prefix}/share/doc/${name}
}
post-activate {
    #though this approach is not so scalable.
    system "${prefix}/bin/fc-cache -fv ${prefix}/share/fonts"
}

#livecheck.name urw-fonts-cyrillic
livecheck.type  none
