# $Id: Portfile,v 1.2 2005/12/06 15:17:51 pkern Exp $

PortSystem 1.0
name		cairo-devel
version		1.2.0-20051206
categories	graphics
maintainers	pkern@opendarwin.org
description	Vector graphics library with cross-device output support \
		(Quartz build)
long_description \
		Cairo is designed to produce identical \
		output on all output media while taking advantage of \
		display hardware acceleration when available.
homepage	http://cairographics.org/
platforms	darwin

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

# 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
configure.cmd	"LIBTOOLIZE='${prefix}/bin/glibtoolize' ./autogen.sh"
configure.args	--disable-xlib --enable-atsui --enable-quartz

depends_lib	lib:libpixman.1:libpixman port:fontconfig \
		port:freetype lib:libpng:libpng port:zlib \
		lib:libexpat:expat

post-configure {
	reinplace "s/-dynamiclib/-dynamiclib -flat_namespace/" ${worksrcpath}/libtool

	reinplace "s/#error Not yet implemented//g" ${worksrcpath}/test/cairo-test.c
}

