SUMMARY="An IRC client library"
DESCRIPTION="
libircclient is a library implementing the client-server IRC protocol.
"
HOMEPAGE="http://sourceforge.net/projects/libircclient/"
COPYRIGHT="
	2004-2012 George Yunaev
	"
LICENSE="GNU LGPL v2"
SOURCE_URI="http://downloads.sourceforge.net/project/libircclient/libircclient/$portVersion/libircclient-$portVersion.tar.gz"
CHECKSUM_SHA256="2cf8523ac683588f2785b08159a2df3e4d15939ee655c0024aa86334149de8f6"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PATCHES="libircclient-$portVersion.patchset"

PROVIDES="
	libircclient$secondaryArchSuffix = $portVersion compat >= 1
	lib:libircclient$secondaryArchSuffix = 1
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libssl$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libssl$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	autoreconf -f -i
	runConfigure ./configure
	make $jobArgs
	cd src; make $jobArgs shared
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libircclient
	fixPkgconfig

	# devel package
	packageEntries devel \
		$developDir
}

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

PROVIDES_devel="
	libircclient${secondaryArchSuffix}_devel = $portVersion compat >= 1
	devel:libircclient$secondaryArchSuffix = 1
	"
REQUIRES_devel="
	libircclient$secondaryArchSuffix == $portVersion base
	"
