SUMMARY="Great Qt GUI front-end for mplayer/mpv"
DESCRIPTION="SMPlayer intends to be a complete front-end for MPlayer, from \
basic features like playing videos, DVDs, and VCDs to more advanced features \
like support for MPlayer filters and more."
HOMEPAGE="http://smplayer.sourceforge.net"
LICENSE="GNU GPL v2"
COPYRIGHT="2006-2015 Ricardo Villalba"
SOURCE_URI="http://sourceforge.net/projects/smplayer/files/SMPlayer/14.9.0/smplayer-$portVersion.tar.bz2"
CHECKSUM_SHA256="b24fb478e637151215bf050d3e84f99d802de2d9e3d10588aba33626fa24a34e"
REVISION="1"

ARCHITECTURES="x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	smplayer$secondaryArchSuffix = $portVersion
	app:SMPlayer
	"

REQUIRES="
	haiku$secondaryArchSuffix
	libqt4$secondaryArchSuffix >= 4.8
	lib:libz$secondaryArchSuffix
	cmd:mplayer
	cmd:smtube$secondaryArchSuffix
	"

BUILD_REQUIRES="
	libqt4${secondaryArchSuffix}_devel >= 4.8
	devel:libz$secondaryArchSuffix
	"

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

PATCH()
{
	sed -i 's/USE_SVN_VERSIONS 1/USE_SVN_VERSIONS 0/' src/version.cpp
}

PATCHES="smplayer_x86-14.9.0.6966.patchset"

BUILD()
{
	# TODO: fix paths
	#		DATA_PATH
	#		DOC_PATH
	#		TRANSLATION_PATH
	#		THEMES_PATH
	#		SHORTCUTS_PATH

	make $jobArgs
}

INSTALL()
{
	mkdir -p $appsDir/SMPlayer
	cp src/smplayer $appsDir/SMPlayer/SMPlayer
	addResourcesToBinaries $portDir/additional-files/smplayer.rdef $appsDir/SMPlayer/SMPlayer
	addAppDeskbarSymlink $appsDir/SMPlayer/SMPlayer
}
