SUMMARY="libmikmod is a lib for playing mod files"
DESCRIPTION="
libmikmod is a library supporting many formats, including mod, s3m, it, and xm.
"
HOMEPAGE="http://mikmod.sourceforge.net" 
SRC_URI="http://sourceforge.net/projects/mikmod/files/libmikmod/3.1.14/libmikmod-3.1.14.tar.gz"
CHECKSUM_SHA256="fd78b67a74c802fee9040cd1f53d629beb985933585dd7d2f3bc69b069b321cd"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="1998-2004 Jean-Paul Mikkers, Jake Stine, Frank Loemker, Steve McIntyre, Peter Amstutz, and Miodrag Vallat."
REVISION="1"

ARCHITECTURES="x86_gcc2 x86 x86_64"

PROVIDES="
	libmikmod = $portVersion compat >= 3.1
	lib:libmikmod = 2.0.5 compat >= 2
	"

REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	"
	
BUILD_PREREQUIRES="
	haiku_devel
	cmd:gcc${secondaryArchSuffix}
	cmd:ld${secondaryArchSuffix}
	cmd:libtool
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:make
	"

BUILD()
{
	libtoolize --force --copy --install
	aclocal --install -I m4
	autoconf
	automake --add-missing
	runConfigure ./configure 
	make
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libmikmod
	fixPkgconfig
	
	# devel package
	packageEntries devel \
		$developDir $binDir/libmikmod-config \
		$dataDir
}

# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	libmikmod_devel = $portVersion
	cmd:libmikmod_config
	devel:libmikmod = 2.0.5 compat >= 0
	"

REQUIRES_devel="
	libmikmod == $portVersion base
	"
