# $Id: $

PortSystem        1.0

name              webomints
version           1.1
categories        tex font
maintainers       nomaintainer
description       Webomints font support.
long_description  A set of files for using the Galapagos Design Group's free Web-O-Mints font with (La)TeX.  The original announcement of the font said ``Created by George Ryan, Web-O-Mints contains a rich assortment of typographic decorations inspired by historical sources''.  A copy of the type 1 font file is included with the distribution, as are test (demonstration) files.

platforms         darwin 
homepage          http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=webomints

master_sites      http://www.ctan.org/get/fonts/

distname          ${name}
checksums         md5 9eb1d72394e0cf18811072471e8723a4\
                  sha1 fd59906c165e307231420dcdfe2812d3b3b4bec1\
                  rmd160 c7db7e6ed029611316a5736ab9a3c31e99747e3d

use_zip           yes

depends_lib       port:pTeX

use_configure     no
build {
	system "cd ${worksrcpath} && afm2tfm WebOMintsGD.afm -p 8r.enc -t EC.enc -v WebOMintsGD.vpl rWebOMintsGD.tfm"
	system "cd ${worksrcpath} && vptovf WebOMintsGD.vpl"
	system "cd ${worksrcpath} && echo 'rWebOMintsGD WebOMintsGD \" TeXBase1Encoding ReEncodeFont \" <8r.enc <WebOMintsGD.pfb' > ${name}.map"
}

set texmflocal ${prefix}/share/texmf-local

destroot {
	xinstall -m 755 -d ${destroot}${texmflocal}/fonts/afm/${name}
	xinstall -m 644 ${worksrcpath}/WebOMintsGD.afm ${destroot}${texmflocal}/fonts/afm/${name}
	xinstall -m 755 -d ${destroot}${texmflocal}/fonts/pfm/${name}
	xinstall -m 644 ${worksrcpath}/WebOMintsGD.pfm ${destroot}${texmflocal}/fonts/pfm/${name}
	xinstall -m 755 -d ${destroot}${texmflocal}/fonts/type1/${name}
	xinstall -m 644 ${worksrcpath}/WebOMintsGD.pfb ${destroot}${texmflocal}/fonts/type1/${name}
	xinstall -m 755 -d ${destroot}${texmflocal}/fonts/tfm/${name}
	xinstall -m 644 ${worksrcpath}/rWebOMintsGD.tfm ${destroot}${texmflocal}/fonts/tfm/${name}
	xinstall -m 644 ${worksrcpath}/WebOMintsGD.tfm ${destroot}${texmflocal}/fonts/tfm/${name}
	xinstall -m 755 -d ${destroot}${texmflocal}/fonts/vf/${name}
	xinstall -m 644 ${worksrcpath}/WebOMintsGD.vf ${destroot}${texmflocal}/fonts/vf/${name}
	xinstall -m 755 -d ${destroot}${texmflocal}/fonts/map/dvips/${name}
	xinstall -m 644 ${worksrcpath}/${name}.map ${destroot}${texmflocal}/fonts/map/dvips/${name}
	xinstall -m 755 -d ${destroot}${texmflocal}/tex/dvips/config
	xinstall -m 644 ${worksrcpath}/config.webo ${destroot}${texmflocal}/tex/dvips/config
	xinstall -m 755 -d ${destroot}${texmflocal}/tex/latex/sty
	xinstall -m 644 ${worksrcpath}/uwebo.fd ${destroot}${texmflocal}/tex/latex/sty
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
	eval xinstall -m 644 [glob ${worksrcpath}/sample*.tex] ${destroot}${prefix}/share/doc/${name}
}

post-activate {
	system "mktexlsr && cd ${texmflocal}/fonts/map/dvips/${name} && updmap-sys --enable Map ${name}.map"
	ui_msg "Three samples (sample1.tex, sample2.tex sample3.tex) were placed into ${prefix}/share/doc/${name} ."
}
