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."
SOURCE_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.26.3.tar.gz"
CHECKSUM_SHA256="f410996e69b1095237c2128deae5fc7b6ce99055b095271abb14447bc2f37fa1"
REVISION="3"
ARCHITECTURES="x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PATCHES="graphviz-2.26.3.patch"

PROVIDES="
	graphviz$secondaryArchSuffix = $portVersion compat >= 2
	cmd:acyclic$secondaryArchSuffix
	cmd:bcomps$secondaryArchSuffix
	cmd:ccomps$secondaryArchSuffix
	cmd:circo$secondaryArchSuffix
	cmd:diffimg$secondaryArchSuffix
	cmd:dijkstra$secondaryArchSuffix
	cmd:dot$secondaryArchSuffix
	cmd:dot2gxl$secondaryArchSuffix
	cmd:dotty$secondaryArchSuffix
	cmd:fdp$secondaryArchSuffix
	cmd:gc$secondaryArchSuffix
	cmd:gml2gv$secondaryArchSuffix
	cmd:gv2gxl$secondaryArchSuffix
	cmd:gvcolor$secondaryArchSuffix
	cmd:gvgen$secondaryArchSuffix
	cmd:gvpack$secondaryArchSuffix
	cmd:gvpr$secondaryArchSuffix
	cmd:gxl2dot$secondaryArchSuffix
	cmd:gxl2gv$secondaryArchSuffix
	cmd:lneato$secondaryArchSuffix
	cmd:mm2gv$secondaryArchSuffix
	cmd:neato$secondaryArchSuffix
	cmd:nop$secondaryArchSuffix
	cmd:osage$secondaryArchSuffix
	cmd:prune$secondaryArchSuffix
	cmd:sccmap$secondaryArchSuffix
	cmd:sfdp$secondaryArchSuffix
	cmd:tred$secondaryArchSuffix
	cmd:twopi$secondaryArchSuffix
	cmd:unflatten$secondaryArchSuffix
	lib:libcdt$secondaryArchSuffix = $portVersion compat >= 2
	lib:libcdt$secondaryArchSuffix = $portVersion compat >= 2
	lib:libcdt$secondaryArchSuffix = $portVersion compat >= 2
	lib:libcgraph$secondaryArchSuffix = $portVersion compat >= 2
	lib:libcgraph$secondaryArchSuffix = $portVersion compat >= 2
	lib:libcgraph$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgraph$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgraph$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgraph$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgvc$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgvc$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgvc$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgvpr$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgvpr$secondaryArchSuffix = $portVersion compat >= 2
	lib:libgvpr$secondaryArchSuffix = $portVersion compat >= 2
	lib:libpathplan$secondaryArchSuffix = $portVersion compat >= 2
	lib:libpathplan$secondaryArchSuffix = $portVersion compat >= 2
	lib:libpathplan$secondaryArchSuffix = $portVersion compat >= 2
	lib:libxdot$secondaryArchSuffix = $portVersion compat >= 2
	lib:libxdot$secondaryArchSuffix = $portVersion compat >= 2
	lib:libxdot$secondaryArchSuffix = $portVersion compat >= 2
	"
PROVIDES_devel="
	graphviz${secondaryArchSuffix}_devel = $portVersion
	devel:libcdt$secondaryArchSuffix = $portVersion
	devel:libcgraph$secondaryArchSuffix = $portVersion
	devel:libgraph$secondaryArchSuffix = $portVersion
	devel:libgvc$secondaryArchSuffix = $portVersion
	devel:libgvpr$secondaryArchSuffix = $portVersion
	devel:libpathplan$secondaryArchSuffix = $portVersion
	devel:libxdot$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libfreetype$secondaryArchSuffix
	lib:libexpat$secondaryArchSuffix
	lib:libfreetype$secondaryArchSuffix
	lib:libpng$secondaryArchSuffix
	lib:libjpeg$secondaryArchSuffix
	lib:libfontconfig$secondaryArchSuffix
	"
REQUIRES_devel="
	graphviz$secondaryArchSuffix == $portVersion base
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libexpat$secondaryArchSuffix
	devel:libfreetype$secondaryArchSuffix
	devel:libpng$secondaryArchSuffix
	devel:libjpeg$secondaryArchSuffix
	devel:libfontconfig$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:freetype_config$secondaryArchSuffix
	"

BUILD()
{
	libtoolize -fci
	autoconf
	runConfigure ./configure \
		CPPFLAGS=`pkg-config --cflags freetype2` \
		LDFLAGS=`pkg-config --libs freetype2` \
		--enable-shared \
		--disable-perl 

	make $jobArgs
}

INSTALL()
{
	make install
	packageEntries devel \
		$developDir
}
