SUMMARY="Shared library to take care your preferences"
DESCRIPTION="
Shared library to take care your preferences.
"
HOMEPAGE="ftp://ftp.icm.edu.pl/vol/rzm1/beos/contrib/libraries"
SOURCE_URI="ftp://ftp.icm.edu.pl/vol/rzm1/beos/contrib/libraries/libprefs125.zip"
CHECKSUM_SHA256="39532c9c6c69f915a6d99fde4fd827a5bdb676ee0cf00558b6956fc91db9a737"
REVISION="1"
LICENSE="Public Domain"
COPYRIGHT="1998 libprefs@mindcontrol.org"

ARCHITECTURES="x86_gcc2 !x86 !x86_64"
SECONDARY_ACRHITECTURES="x86_gcc2 !x86"

PROVIDES="
	libprefs$secondaryArchSuffix = $portVersion
	lib:libprefs$secondaryArchSuffix = $portVersion
"
REQUIRES="
	haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
	haiku$secondaryArchSuffix
	haiku${secondaryArchSuffix}_devel
	cmd:gcc
"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
"

SOURCE_DIR="libprefs125"

PATCHES="libprefs-1.2.5.patch"

BUILD()
{
	g++ -shared -fPIC -o libprefs.so src/libprefs.cpp -lroot -lbe
}
INSTALL()
{
	mkdir -p $libDir
	mkdir -p $includeDir
	
	#cp bigprefs.x86.a $libDir/bigprefs.x86.a
	cp libprefs.so $libDir
	cp src/*.h $includeDir
}
