SUMMARY="Plugins for the Audacious player"
DESCRIPTION="This package provides plugins for the Audacious audio player.
Included are various skins, visualizations, support for more in/output \
formats, effects, and services like fetching lyrics for your music or setting \
an alarm in the morning, and more."
HOMEPAGE="https://audacious-media-player.org/"
COPYRIGHT="2001-2021 Audacious developers and others"
LICENSE="BSD (2-clause)"
REVISION="3"
SOURCE_URI="https://github.com/audacious-media-player/audacious-plugins/archive/audacious-plugins-$portVersion.tar.gz"
CHECKSUM_SHA256="94c732488ac836c0c9f37c5634bdb41d222e956b18cb66499ab8c870361768e8"
SOURCE_DIR="audacious-plugins-audacious-plugins-$portVersion"
PATCHES="audacious_plugins-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	audacious_plugins$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libaudcore$secondaryArchSuffix >= 5.3
	lib:libaudqt$secondaryArchSuffix >= 2.3
	lib:libaudtag$secondaryArchSuffix >= 3
	lib:libavcodec$secondaryArchSuffix
	lib:libavformat$secondaryArchSuffix
	lib:libavutil$secondaryArchSuffix
	lib:libbs2b$secondaryArchSuffix
	lib:libcurl$secondaryArchSuffix
	lib:libfaad$secondaryArchSuffix
	lib:libFLAC$secondaryArchSuffix
	lib:libfluidsynth$secondaryArchSuffix >= 2
	lib:libgio_2.0$secondaryArchSuffix
	lib:libGL$secondaryArchSuffix
	lib:libglib_2.0$secondaryArchSuffix
	lib:libgobject_2.0$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libmms$secondaryArchSuffix
	lib:libmodplug$secondaryArchSuffix
	lib:libmp3lame$secondaryArchSuffix
	lib:libmpg123$secondaryArchSuffix
	lib:libneon$secondaryArchSuffix
	lib:libogg$secondaryArchSuffix
	lib:libopenmpt$secondaryArchSuffix
	lib:libQt5Core$secondaryArchSuffix
	lib:libQt5Gui$secondaryArchSuffix
	lib:libQt5Multimedia$secondaryArchSuffix
	lib:libQt5Network$secondaryArchSuffix
	lib:libQt5OpenGL$secondaryArchSuffix
	lib:libQt5Widgets$secondaryArchSuffix
	lib:libsamplerate$secondaryArchSuffix
	lib:libsidplayfp$secondaryArchSuffix
	lib:libsndfile$secondaryArchSuffix
	lib:libsoxr$secondaryArchSuffix
	lib:libvorbis$secondaryArchSuffix
	lib:libvorbisenc$secondaryArchSuffix
	lib:libvorbisfile$secondaryArchSuffix
	lib:libwavpack$secondaryArchSuffix
	lib:libxml2$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"
SUPPLEMENTS="audacious$secondaryArchSuffix"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libaudcore$secondaryArchSuffix >= 5.3
	devel:libavcodec$secondaryArchSuffix
	devel:libbs2b$secondaryArchSuffix
	devel:libcddb$secondaryArchSuffix
	devel:libcdio$secondaryArchSuffix
	devel:libcurl$secondaryArchSuffix
	devel:libfaad$secondaryArchSuffix
	devel:libflac$secondaryArchSuffix
	devel:libfluidsynth$secondaryArchSuffix >= 2
	devel:libgl$secondaryArchSuffix
	devel:libglib_2.0$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	devel:libmms$secondaryArchSuffix
	devel:libmodplug$secondaryArchSuffix
	devel:libmp3lame$secondaryArchSuffix
	devel:libmpg123$secondaryArchSuffix
	devel:libneon$secondaryArchSuffix
	devel:libopenmpt$secondaryArchSuffix
	devel:libQt5Core$secondaryArchSuffix
	devel:libQt5DBus$secondaryArchSuffix
	devel:libQt5Gui$secondaryArchSuffix
	devel:libQt5Widgets$secondaryArchSuffix
	devel:libsamplerate$secondaryArchSuffix
	devel:libsidplayfp$secondaryArchSuffix
	devel:libsndfile$secondaryArchSuffix
	devel:libsoxr$secondaryArchSuffix
	devel:libswresample$secondaryArchSuffix
	devel:libvorbis$secondaryArchSuffix
	devel:libvorbisenc$secondaryArchSuffix
	devel:libwavpack$secondaryArchSuffix
	devel:libxml2$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autom4te
	cmd:autoreconf
	cmd:awk
	cmd:find
	cmd:gcc$secondaryArchSuffix
	cmd:lrelease$secondaryArchSuffix >= 5
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:python2
	"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure \
		--disable-gtk \
		--enable-qt \
		--disable-mpris2
	make $jobArgs
}

INSTALL()
{
	make install
	strip $libDir/audacious/*/*
}
