# $Id: Portfile,v 1.40 2006/06/27 18:36:45 mij Exp $

PortSystem 1.0
name		pango
version		1.12.3
categories	x11
maintainers	mij@opendarwin.org gnome-darwinports@opendarwin.org
description	Framework for the layout and rendering of i18n text
platforms	darwin

long_description The goal of the Pango project is to provide an \
		 open-source framework for the layout and rendering \
		 of internationalized text.

master_sites	gnome:sources/pango/1.12

checksums	md5 c8178e11a895166d86990bb2c38d831b \
		sha1 ad493c4560c0ffd9dcdb8a1724d5bff058ef112c \
		rmd160 7692828276e9b5a54b0b8c32fa07d7db6ac45bed

use_bzip2	yes

depends_lib	lib:libglib.2:glib2 lib:libX11.6:XFree86 \
		lib:libXft.2.1.2:Xft2 lib:libcairo.2:cairo

patchfiles	patch-ltmain.sh

configure.env	CPPFLAGS="-no-cpp-precomp" \
		LDFLAGS="-no-undefined -bind_at_load"

configure.args	--mandir=${prefix}/share/man --enable-cairo

post-destroot	{ system "install -o root -m 755 -d \
		    ${destroot}${prefix}/etc/pango"
		  system "cp ${worksrcpath}/examples/pangorc \
		    ${destroot}${prefix}/etc/pango"
		  system "cp ${worksrcpath}/pango/pangox.aliases \
		    ${destroot}${prefix}/etc/pango" 
		  reinplace "s|\\.\\./modules/|${prefix}/etc/pango/|g" \
		    ${destroot}/${prefix}/etc/pango/pangorc
		  system "env LANG=C DYLD_LIBRARY_PATH=${destroot}${prefix}/lib \
		    ${destroot}${prefix}/bin/pango-querymodules ${destroot}${prefix}/lib/pango/1.5.0/modules/*.so >${destroot}${prefix}/etc/pango/pango.modules"
		  reinplace s|${destroot}||g ${destroot}${prefix}/etc/pango/pango.modules }
