# $Id: Portfile 56061 2009-08-24 00:33:19Z ryandesign@macports.org $

PortSystem 1.0

name            monafont
version         2.90
revision        1
categories      x11 fonts
platforms       darwin
maintainers     nifty.com:pelopor
description     Japanese proportional font to show Japanese text arts correctly
long_description \
   Mona Font is a Japanese proportional font which allows you to view Japanese \
   text arts correctly. Mona Font is based on Shinonome Font, a Japanese font \
   developed by /efont/ Project.
homepage        http://monafont.sourceforge.net/
master_sites    sourceforge
use_bzip2       yes
checksums       md5 2b914878b19b1550757cea5d8a771612
depends_build   bin:mkfontscale:mkfontscale bin:mkfontdir:mkfontdir
use_configure   no
build.target    {}
set myfontdir   ${prefix}/share/fonts/${name}
destroot.destdir X11FONTDIR=${destroot}${myfontdir}
pre-destroot {
  xinstall -d -m 755 ${destroot}${myfontdir} \
    ${destroot}${prefix}/share/doc/monafont
  eval xinstall -m 644 [glob ${worksrcpath}/README*] \
    ${destroot}${prefix}/share/doc/monafont
}

post-activate {
   system "mkfontscale ${myfontdir}"
   system "mkfontdir ${myfontdir}"
}

# This should be done when uninstalling, but deactivate doesn't currently work
#post-deactivate {
#   system "mkfontscale ${myfontdir}"
#   system "mkfontdir ${myfontdir}"
#}

