SUMMARY="Generate documentation from source code"
DESCRIPTION="
Doxygen is the de facto standard tool for generating documentation from \
annotated C++ sources, but it also supports other popular programming \
languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba and \
Microsoft flavors), Fortran, VHDL, Tcl, and to some extent D.
Doxygen can:
  * generate an on-line documentation browser (in HTML) and/or an \
off-line reference manual (in LaTeX) from a set of documented source \
files. There is also support for generating output in RTF (MS-Word), \
PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The \
documentation is extracted directly from the sources, which makes it much \
easier to keep the documentation consistent with the source code.
 * extract the code structure from undocumented source files. This is \
very useful to quickly find your way in large source distributions. \
Doxygen can also visualize the relations between the various elements \
by means of include dependency graphs, inheritance diagrams, and \
collaboration diagrams, which are all generated automatically."
HOMEPAGE="http://www.doxygen.org"
COPYRIGHT="1997-2011 Dimitri van Heesch"
LICENSE="GNU GPL v2"
SOURCE_URI="http://ftp.stack.nl/pub/users/dimitri/doxygen-$portVersion.src.tar.gz"
CHECKSUM_SHA256="0e60e794fb172d3fa4a9a9535f0b8e0eeb04e8366153f6b417569af0bcd61fcd"
PATCHES="doxygen-$portVersion.patch"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"

PROVIDES="
	doxygen = $portVersion compat >= 1.7
	cmd:doxygen = $portVersion compat >= 1.7
	cmd:doxytag = $portVersion compat >= 1.7
	"
REQUIRES="
	haiku
	lib:libiconv
	"
BUILD_REQUIRES="
	devel:libiconv
	"
BUILD_PREREQUIRES="
	haiku_devel
	cmd:bison
	cmd:flex
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:perl
	cmd:sed
	"

PATCH()
{
	sed -i "s,MAN1DIR = man/man1,MAN1DIR = $relativeManDir/man1," Makefile.in
}

BUILD()
{
	# not an autotools configure
	./configure --prefix $prefix --docdir $docDir
	make $jobArgs
}

INSTALL()
{
	make install
}
