# $Id: Portfile 76886 2011-03-11 22:35:54Z ryandesign@macports.org $

PortSystem      1.0

name            lcdf-typetools
version         2.88
categories      print tex
maintainers     nomaintainer
description     Tools for manipulating fonts.
long_description \
                The LCDF Typetools package contains several programs for manipulating \
                PostScript Type 1, Type 1 multiple master, and PostScript-flavored OpenType \
                fonts.
platforms       darwin
license         GPL-2+
homepage        http://www.lcdf.org/type/
master_sites    ${homepage}
checksums       md5     526c6877e0c6145c1c821e89276b2a32 \
                sha1    09d2604ccd282738fa07c62be6bf558c415434d5 \
                rmd160  2093d3c69b1eaad4851e1560bddfaefb1dab97f3

depends_lib     port:texlive-bin

configure.args  --mandir=${prefix}/share/man --with-kpathsea=${prefix}

use_parallel_build  yes

destroot.target install-strip
post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/doc
    xinstall -m 644 -W ${worksrcpath} COPYING INSTALL NEWS ONEWS README ${destroot}${prefix}/share/doc/${name}
}

variant without_kpathsea conflicts ptex description {Do not use libkpathsea} {
    depends_lib-delete port:texlive-bin
    configure.args-delete --with-kpathsea=${prefix}
    configure.args-append --without-kpathsea
}

variant ptex conflicts without_kpathsea description {Link against pTeX's libkpathsea} {
    # Note that pTeX installs libkpathsea as a static library.
    depends_lib-delete port:texlive-bin
    depends_lib-append port:pTeX
}

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