SUMMARY="Deprecated custom widget library"
DESCRIPTION="Santa's Gift Bag has some useful custom widgets \
(color picker, column list view, scroll view etc.) DO NOT use for new \
applications! Use libwalter or Haiku's experimental widgets (libshared). \
This package only exists for applications that have not yet been migrated."
HOMEPAGE="https://github.com/HaikuArchives/SantasGiftBag"
COPYRIGHT="1997-2000 Brian Tietz"
LICENSE="libsanta"
REVISION="1"
SOURCE_URI="https://github.com/HaikuArchives/SantasGiftBag/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="eeacdd5a0c2a147e40d796900425c5dbea57b966e7025b10451e0e2effb712ff"
SOURCE_DIR="SantasGiftBag-$portVersion"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	libsanta$secondaryArchSuffix = $portVersion
	lib:libsanta$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

PROVIDES_devel="
	libsanta${secondaryArchSuffix}_devel = $portVersion
	devel:libsanta$secondaryArchSuffix = $portVersion
	"
REQUIRES_devel="
	libsanta$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make OBJ_DIR=objects $jobArgs
}

INSTALL()
{
	mkdir -p $developDocDir $includeDir $libDir $developLibDir

	cp -R docs/* $developDocDir/

	cp objects/libsanta.so $libDir/libsanta.so.3.0.1
	ln -sr $libDir/libsanta.so.3.0.1 $libDir/libsanta.so
	ln -sr $libDir/libsanta.so.3.0.1 $developLibDir/libsanta.so.3.0.1

	ln -sr $developLibDir/libsanta.so.3.0.1 $developLibDir/libsanta.so

	cp -R include/. $includeDir/

	packageEntries devel \
		$developDir
}
