SUMMARY="Open Source Graph Visualization Software"
DESCRIPTION="Graphviz is open source graph visualization software. Graph \
visualization is a way of representing structural information as diagrams of \
abstract graphs and networks. It has important applications in networking, \
bioinformatics,  software engineering, database and web design, machine \
learning, and in visual interfaces for other technical domains.
The Graphviz layout programs take descriptions of graphs in a simple text \
language, and make diagrams in useful formats, such as images and SVG for web \
pages, PDF or Postscript for inclusion in other documents; or display in an \
interactive graph browser. (Graphviz also supports GXL, an XML dialect.) \
Graphviz has many useful features for concrete diagrams, such as options for \
colors, fonts, tabular node layouts, line styles, hyperlinks, rolland custom \
shapes.
"
HOMEPAGE="http://www.graphviz.org/"
LICENSE="CPL v1.0"
COPYRIGHT="1994-2010 AT&T Corp."
SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.26.3.tar.gz"
CHECKSUM_MD5="6f45946fa622770c45609778c0a982ee"
REVISION="2"
ARCHITECTURES="!x86_gcc2"

PATCHES="graphviz-2.26.3.patch"

PROVIDES="
	graphviz = $portVersion compat >= 2
	"

# TODO: There are several of optional features (e.g. png and jpeg), some of
# which should be enabled.
REQUIRES="
	haiku >= $haikuVersion
	lib:libfreetype
	"
BUILD_REQUIRES="
	"
BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:autoconf
	cmd:automake
	cmd:gcc
	cmd:ld
	cmd:libtoolize
	cmd:make
	"


BUILD()
{
	libtoolize -fci
	autoconf
	# The CPPFLAGS, LDFLAGS paths hack is currently required to get the freetype
	# headers and library to be found. freetype is part of the system package
	# and not in the proper paths.
	runConfigure ./configure \
		CPPFLAGS="-I/boot/system/develop/headers/3rdparty/freetype2" \
		LDFLAGS="-L/boot/system/lib" \
		--enable-shared \
		--disable-perl 
	make $jobArgs
}

INSTALL()
{
	make install
}
