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-2015 Dimitri van Heesch"
LICENSE="GNU GPL v2"
SOURCE_URI="http://ftp.stack.nl/pub/users/dimitri/doxygen-$portVersion.src.tar.gz"
CHECKSUM_SHA256="cedf78f6d213226464784ecb999b54515c97eab8a2f9b82514292f837cf88b93"
PATCHES="doxygen-$portVersion.patch"
REVISION="2"
ARCHITECTURES="x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
    # x86_gcc2 is fine as primary target architecture as long as we're building
    # for a different secondary architecture.
    ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
    ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	doxygen$secondaryArchSuffix = $portVersion compat >= 1.8
	cmd:doxygen = $portVersion compat >= 1.8
	cmd:doxytag = $portVersion compat >= 1.8
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libiconv$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libiconv$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:cmake
	cmd:python
	cmd:bison
	cmd:flex
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:perl
	cmd:sed
	"

BUILD()
{
	# doesn't use GNUInstallDirs so we can't use $cmakeDirArgs
	cmake . -DCMAKE_INSTALL_PREFIX=$prefix
	make $jobArgs
}

INSTALL()
{
	make install
}
