SUMMARY="A MOD music playing add-on library for Allegro"
DESCRIPTION="JGMOD is a mod library for MOD musics. It is built on top of \
Allegro lower level digital sound routines. Currently supports MOD, S3M, XM, \
Unreal S3M (in UMX extension), and JGM under DJGPP, Mingw32, MSVC, Linux,\
BeOS and Haiku."
HOMEPAGE="http://guan.is-a-geek.com/jgmod/jgmod.html"
COPYRIGHT="1997-2002 Guan Foo Wah"
LICENSE="JGMOD"
REVISION="4"
SOURCE_URI="http://guan.is-a-geek.com/jgmod/jgmod.zip"
CHECKSUM_SHA256="5d34c446904ddf2c6e3ee2272e6d4a9e6b1b4e59701237c5f4c961999623c77a"
SOURCE_FILENAME="jgmod-$portVersion.zip"
SOURCE_DIR="jgmod"

ARCHITECTURES="x86_gcc2"

PROVIDES="
	jgmod = $portVersion
	lib:libjgmod
	"
REQUIRES="
	lib:liballeg >= 4.4
	"

PROVIDES_devel="
	jgmod_devel
	devel:libjgmod
	"
REQUIRES_devel="
	jgmod == $portVersion base
	"

BUILD_REQUIRES="
	haiku_devel
	devel:liballeg
	"
BUILD_PREREQUIRES="
	cmd:find
	cmd:gcc
	cmd:make
	"

BUILD()
{
	chmod 777 ./fixbe.sh
	./fixbe.sh
	cd src
	make
}

INSTALL()
{
	cd src
	mkdir -p $libDir $includeDir
	make install CPLIBDEST=$libDir CPINCDEST=$includeDir

	prepareInstalledDevelLib libjgmod
	packageEntries devel $developDir
}
