# $Id: Portfile 59973 2009-10-28 07:05:26Z pguyot@kallisys.net $

PortSystem      1.0
name            tex-tipa
version         1.3
revision        1
description     Fonts and macros for IPA phonetics characters.
long_description \
                TIPA (TeX International Phonetic Alphabet) is a latex \
                package for International Phonetic Alphabet characters \
                by Rei Fukui, Hajime Kobayashi, and Shun Shirakawa
platforms       darwin
categories      tex print
maintainers     nomaintainer
homepage        http://www.essex.ac.uk/linguistics/clmt/latex4ling/tipa/
master_sites    macports
#               ftp://ftp.jussieu.fr/pub/TeX/CTAN/fonts/
#               http://ftp.nara.wide.ad.jp/pub/TeX/CTAN/fonts/
distname        tipa-20090407
use_zip         yes
dist_subdir     ${name}/${version}
patchfiles      patch-tipa-1.3-Makefile
checksums       md5     5b8384b4b7a0fc8dad302b65d1bd3293 \
                sha1    04f8ee142faecf3017738e23c1c6835158556c40 \
                rmd160  ea4f393f8a2e151b0933829ba7d193761ca8433a

depends_lib     bin:mktexlsr:texlive

worksrcdir      tipa

use_configure   no

build {}

destroot {
        system "cd ${worksrcpath}/tipa-${version}/ && make install DESTROOT=${destroot} PREFIX=${prefix}"

        file mkdir ${destroot}${prefix}/share/texmf-local/fonts/map/dvips/tipa
        file rename ${destroot}${prefix}/share/texmf-local/dvips/config/tipa.map \
                ${destroot}${prefix}/share/texmf-local/fonts/map/dvips/tipa
}
post-destroot {
        xinstall -m 755 -d ${destroot}${prefix}/share/texmf-local/doc/tipa
        xinstall -m 644 -W ${worksrcpath} 00README tipaface.pdf tipaman.pdf \
                ${destroot}${prefix}/share/texmf-local/doc/tipa
}

post-activate {
        system "mktexlsr"
        ui_msg "\nBefore using tipa, please make sure to update font map files.\n"
        ui_msg "  \$ sudo updmap-sys --enable MixedMap tipa.map\n"
}
