# $Id: Portfile,v 1.1 2005/12/06 15:09:11 pkern Exp $

PortSystem 1.0
name		pango-devel
version		1.12.0-20051205
categories	graphics
maintainers	pkern@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.

# Use a fixed checkout for now, due to unreliable CVS usage.
master_sites	http://www.opendarwin.org/~pkern/files/
checksums	md5 024d590d7a7fd20a3d6ca27e956bd0c0
use_bzip2	yes
#fetch.type	cvs
#cvs.root	:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome
#cvs.module	pango
worksrcdir	pango

# Fix the hardcoded libtoolize
patchfiles	patch-autogen.sh

# Depend directly on the ports for now...
depends_lib	port:glib2-devel port:cairo-devel

# We are building a CVS checkout, so we need to build the configure script
# on our own...
depends_build   port:autoconf port:automake port:libtool port:gtk-doc-devel
configure.cmd   "LIBTOOLIZE='${prefix}/bin/glibtoolize' DARWINPORTS='${prefix}' ./autogen.sh"
configure.env	CPPFLAGS="-no-cpp-precomp" \
		LDFLAGS="-no-undefined -bind_at_load"
configure.args	--mandir=${prefix}/share/man --enable-cairo --disable-gtk-doc \
		--without-x

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}/examples/pangox.aliases \
		    ${destroot}${prefix}/etc/pango" 
		  reinplace "s|\\./|${prefix}/etc/pango/|g" \
		    ${destroot}/${prefix}/etc/pango/pangorc
		  reinplace "s|\\./|${prefix}/etc/pango/|g" \
		    ${destroot}/${prefix}/etc/pango/pangox.aliases
		  system "env LANG=C DYLD_LIBRARY_PATH=${destroot}${prefix}/lib \
		    ${destroot}${prefix}/bin/pango-querymodules ${destroot}${prefix}/lib/pango/1.4.0/modules/* >${destroot}${prefix}/etc/pango/pango.modules"
		  reinplace s|${destroot}||g ${destroot}${prefix}/etc/pango/pango.modules }
