# -*- 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            wget ttf2eot 0.0.3 v
platforms               darwin
categories              print www
maintainers             {ryandesign @ryandesign}
license                 BSD LGPL-2 LGPL-2.1

description             TrueType font (ttf) to Embeddable OpenType font (eot) \
                        converter

long_description        ${name} converts TrueType font (ttf) files into \
                        Embeddable OpenType font (eot) files for use in CSS \
                        @font-face rules for Internet Explorer for Windows

github.tarball_from     archive
checksums               rmd160  18cf5a87286834861d1e0d860f91c3aed86d3270 \
                        sha256  f363c4f2841b6d0b0545b30462e3c202c687d002da3d5dec7e2b827a032a3a65 \
                        size    158384

if {${os.endian} eq "big"} {
    known_fail          yes
    pre-fetch {
        ui_error "${name} does not currently work on PowerPC Macs."
        ui_error "See https://code.google.com/p/ttf2eot/issues/detail?id=14"
        return -code error "incompatible processor"
    }
}

patchfiles              patch-Makefile.diff

use_configure           no

build.target            ${name}
build.env               CXX=${configure.cxx}

destroot {
    xinstall -m 0755 -W ${worksrcpath} ${name} ${destroot}${prefix}/bin
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 0644 -W ${worksrcpath} README ${docdir}
}
