SUMMARY="Full-featured Jabber/XMPP client library"
DESCRIPTION="
Rock-solid, full-featured Jabber/XMPP client library, written in clean ANSI C++.
"
HOMEPAGE="http://camaya.net/gloox/"
LICENSE="GNU GPL v2"
COPYRIGHT="2002-2012 Jakob Schröter"
SOURCE_URI="http://camaya.net/download/gloox-$portVersion.tar.bz2"
CHECKSUM_SHA256="4d9f1eeac97c6563dde11d4bdba346a025ef27908b088b47b5c8d3d03df6ea8a"
REVISION="1"
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_gcc2 x86"
PATCHES="gloox-1.0.9.patch"

PROVIDES="
	gloox$secondaryArchSuffix = $portVersion
	lib:libgloox$secondaryArchSuffix = 13.0.0 compat >= 13
	"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libcrypto$secondaryArchSuffix
	lib:libssl$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libstdc++$secondaryArchSuffix
	lib:libgcc_s$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcrypto$secondaryArchSuffix
	devel:libssl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:libtoolize
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:pkg_config$secondaryArchSuffix
	"
BUILD()
{
	autoreconf -fi
	runConfigure ./configure
	make
}

INSTALL()
{
	make install
	
	# prepare development lib links
	prepareInstalledDevelLib libgloox
	
	# devel package
	packageEntries devel $developDir $binDir
}

TEST()
{
	make check
}


# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	gloox${secondaryArchSuffix}_devel = $portVersion
	cmd:gloox_config${secondaryArchSuffix}
	devel:libgloox$secondaryArchSuffix = 13.0.0 compat >= 13
	"
REQUIRES_devel="
	gloox$secondaryArchSuffix == $portVersion base
	"
