SUMMARY="A simple GUI framework for SDL"
DESCRIPTION="
GUIlib is a very simple GUI library for SDL. It provides some general widgets \
like button, scrollbar, and image.
"
HOMEPAGE="http://www.libsdl.org/projects/GUIlib/" 
SOURCE_URI="http://www.libsdl.org/projects/GUIlib/src/GUIlib-1.2.1.tar.gz"
CHECKSUM_SHA256="3b383e537238048f4712395a38b9e3c65475d1dc93413e557f1b0a39c88f68df"
LICENSE="Public Domain"
COPYRIGHT="Public Domain"

REVISION="1"

ARCHITECTURES="x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	guilib$secondaryArchSuffix = $portVersion compat >= 1.2
	lib:libGUI$secondaryArchSuffix = 1.2_0.0.1 compat >= 1.2_0
	lib:libGUI_1.2$secondaryArchSuffix = 0.0.1 compat >= 0
	"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libsdl$secondaryArchSuffix
	"
	
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libsdl$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:libtool
	cmd:aclocal
	cmd:autoconf
	cmd:make
	"

SOURCE_DIR="GUIlib-$portVersion"

BUILD()
{
	rm -f aclocal.m4
	rm -f acinclude.m4
	echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in
	libtoolize -fci
	aclocal --install -I m4
	./autogen.sh

	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	
	prepareInstalledDevelLibs libGUI \
					libGUI-1.2
	fixPkgconfig
	
	# devel package
	packageEntries devel \
		$developDir
}

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

PROVIDES_devel="
	guilib${secondaryArchSuffix}_devel = $portVersion compat >= 1.2
	devel:libGUI$secondaryArchSuffix = 1.2_0.0.1 compat >= 1.2_0
	devel:libGUI_1.2$secondaryArchSuffix = 0.0.1 compat >= 0
	"
REQUIRES_devel="
	guilib$secondaryArchSuffix == $portVersion base
	"
