SUMMARY="Fasttracker II inspired music tracker"
DESCRIPTION="MilkyTracker is an open source, multi-platform music application \
for creating .MOD and .XM module files. It attempts to recreate the module \
replay and user experience of the popular DOS program Fasttracker II, with \
special playback modes available for improved Amiga ProTracker 2/3 \
compatibility."
HOMEPAGE="http://www.milkytracker.org/"
LICENSE="
	GNU GPL v3
	New-BSD
	"
REVISION="2"

ARCHITECTURES="x86_gcc2 x86 x86_64"

PATCHES="milkytracker-$portVersion.patchset"
if [ $effectiveTargetArchitecture != "x86_gcc2" ]; then
	PATCHES="milkytracker-$portVersion-gcc4.patchset"
fi

SOURCE_URI="http://www.milkytracker.org/files/milkytracker-0.90.86.tar.bz2"
CHECKSUM_SHA256="eb93000ed4855e198dfb02df54f3e3536dc891084ca47cdd5393121137ba3bed"
COPYRIGHT="
	1994-2013
	Peter 'pailes' Barth,
	Christopher 'Deltafire' O'Neill,
	Antti S. Lankila,
	Varthall,
	Andrew Simper,
	David Ross,
	Stuart Caie,
	Claudio Matsuoka,
	Julian 'jua' Harnath
	"

PROVIDES="
	milkytracker = $portVersion
	app:MilkyTracker = $portVersion
	app:MilkySettings = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libz$secondaryArchSuffix >= 1.2.3
	"
BUILD_REQUIRES="
	devel:libz$secondaryArchSuffix >= 1.2.3
	"
BUILD_PREREQUIRES="
	haiku_devel
	cmd:gcc${secondaryArchSuffix}
	cmd:ld${secondaryArchSuffix}
	cmd:jam
	"

BUILD()
{
	cd $sourceDir/platforms/haiku
	bash ./Add_Jamfiles.sh
	cd ../..
	jam -q
}

INSTALL()
{
	TARGET_DIR=$appsDir/MilkyTracker
	mkdir -p $TARGET_DIR
	cd $sourceDir
	cp -af src/tracker/MilkyTracker $TARGET_DIR/
	cp -af src/tracker/haiku/MilkySettings/MilkySettings $TARGET_DIR/
	cp -af docs/ChangeLog.html $TARGET_DIR/
	cp -af docs/FAQ.html $TARGET_DIR/
	cp -af docs/MilkyTracker.html $TARGET_DIR/
	cp -af docs/TiTAN.nfo $TARGET_DIR/
	cp -af COPYING $TARGET_DIR/
	addAppDeskbarSymlink $TARGET_DIR/MilkyTracker MilkyTracker
}
