# $Id: Portfile,v 1.3 2006/07/08 06:49:37 takanori Exp $

PortSystem		1.0
name			urw-fonts
version			1.0.7pre41
revision		1
categories		x11 fonts
maintainers		takanori@opendarwin.org
description		Cyrillized free URW fonts
long_description	These fonts were made from the free URW fonts distributed with ghostcript. \
			There are NO changes in the latin part of them (I hope). \
			Cyrillic glyphs were added by copying suitable latin ones \
			and painting oulines of unique cyrillic glyphs in same style as the others.
homepage		ftp://ftp.gnome.ru/fonts/urw/release/
master_sites		ftp://ftp.gnome.ru/fonts/urw/release/
distfiles		${name}-${version}.tar.bz2
depends_lib		port:fontconfig

checksums	${name}-${version}.tar.bz2 md5 eb088831196b4bf0138e43b68e884f63 \
					   sha1 6e64946a07a3770403c4e11449f181e9481666e0 \
					   rmd160 12a739bf425189c42e9b611c4ab0df063ac37de2
use_bzip2		yes
extract.dir		${worksrcpath}

pre-extract	{
		file mkdir ${worksrcpath}
}
configure {}
build {}
destroot	{
		set fontsdir ${destroot}${prefix}/share/fonts/${name}
		xinstall -d -m 755 ${fontsdir}
		foreach f {*.afm *.pfb *.pfm fonts.*} {
			eval xinstall -m 644 [glob ${worksrcpath}/${f}] ${fontsdir}
		}
}
post-destroot	{
		xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
		xinstall -m 644 -W ${worksrcpath} COPYING ChangeLog README README.tweaks TODO ${destroot}${prefix}/share/doc/${name}
}
post-activate	{
		#though this approach is not so scalable.
		system "${prefix}/bin/fc-cache -fv ${prefix}/share/fonts"
}
