SUMMARY="crossplatform widgetset"
DESCRIPTION="ParaGUI is a cross-platform high-level application framework and \
GUI (graphical user interface) library. It can be compiled on various \
platforms (Linux, Win32, BeOS, MacOS, ...)"
HOMEPAGE="http://www.nongnu.org/paragui/"
REVISION="1"
LICENSE="GNU LGPL v2"
COPYRIGHT="2000-2004 Alexander Pipelka"

ARCHITECTURES="x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

SOURCE_URI="http://download.savannah.gnu.org/releases/paragui/paragui-$portVersion.tar.gz"
CHECKSUM_SHA256="5a6663d3be6819bce8a8ca0bf8a0d33c7508e28d8e9f220649cef19e9d5260c3"
PATCHES="paragui-$portVersion.patchset"

PROVIDES="
	paragui$secondaryArchSuffix = $portVersion
	lib:libparagui_1.1 = 8.0.0 compat = 8
	lib:libparagui
"

REQUIRES="
	haiku
	lib:libexpat
	lib:libphysfs
	lib:libSDL_1.2
	lib:libGL
	lib:libpng16
	lib:libz
	lib:libsigc_1.2
"

PROVIDES_devel="
	cmd:paragui_config
	devel:libparagui_1.1 = 8.0.0 compat = 8
	devel:libparagui
"

REQUIRES_devel="
	paragui$secondaryArchSuffix == $portVersion base
"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libsigc_1.2$secondaryArchSuffix
	devel:libsdl$secondaryArchSuffix
	devel:libfreetype$secondaryArchSuffix
	devel:libexpat$secondaryArchSuffix
	devel:libphysfs$secondaryArchSuffix
"

BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:autoconf
	cmd:automake
	cmd:find
	cmd:libtoolize
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
"

BUILD()
{
	libtoolize --force --copy --install
	aclocal
	autoconf
	runConfigure --omit-dirs "docDir dataRootDir" ./configure --with-libstdcpp=stdc++.r4
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLib libparagui
	rm $developLibDir/*.la

	fixPkgconfig

	packageEntries devel $relativeDevelopDir $relativeBinDir
}
