SUMMARY="Audio processing plug-ins in VST format"
DESCRIPTION="
These free effect plug-ins work with Cubase and other VST compatible \
applications.
This package provides Paul Kellett's MDA VST plugins:

* Ambience - Reverb effect
* Bandisto - Multi-band distortion
* BeatBox - Drum replacer
* Combo - Amp & speaker simulation
* De-ess - High frequency dynamics processor
* Degrade - Sample quality reduction
* Delay - Simple stereo delay with feedback tone control
* Detune - Simple up/down pitch shifting thickener
* Dither - Range of dither types including noise shaping
* DubDelay - Delay with feedback saturation and time/pitch modulation
* Dynamics - Compressor / Limiter / Gate
* DX10 - FM Synthesizer
* Envelope - Envelope follower / VCA
* Image - Stereo image adjustment and M-S matrix
* JX10 - 2-Oscillator analog synthesizer
* Leslie - Rotary speaker simulator
* Limiter - Opto-electronic style limiter
* Looplex - Looping plugin
* Loudness - Equal loudness contours for bass EQ and mix correction
* Multiband - Multi-band compressor with M-S processing modes
* Overdrive - Soft distortion
* RePsycho - Drum loop pitch changer
* RezFilter - Resonant filter with LFO and envelope follower
* RingMod - Ring modulator with sine-wave oscillator
* Round Panner - 3D panner
* SpecMeter - VU-meter
* Splitter - Frequency / level crossover for setting up dynamic processing
* Stereo Simulator - Haas delay and comb filtering
* Sub-Bass Synthesizer - Several low frequency enhancement methods
* Talkbox - High resolution vocoder
* Thru-Zero Flanger - Classic tape-flanging simulation
* Tracker - Pitch tracking oscillator, or pitch tracking EQ
* Transient - Transient shaper
* Vocoder - Switchable 8 or 16 band vocoder
* VocInput - Pitch tracking oscillator for generating vocoder carrier input
"
LICENSE="MIT"
COPYRIGHT="Paul Kellett (paul.kellett@mda-vst.com)"
HOMEPAGE="http://sourceforge.net/projects/mda-vst"
SOURCE_URI="svn://svn.code.sf.net/p/mda-vst/code"
SOURCE_URI_2="svn+https://github.com/kxproject/kx-audio-driver/trunk/vst"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PATCHES="mda_vst-20100214.patchset"

PROVIDES="
	mda_vst$secondaryArchSuffix = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"

BUILD_PREREQUIRES="
	cmd:g++$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	cd $sourceDir
	rm -rf vst

	mkdir -p $sourceDir/vst/pluginterfaces
	ln -sfn $sourceDir2/h $sourceDir/vst/pluginterfaces/vst2.x

	mkdir -p $sourceDir/vst/public.sdk/source
	ln -sfn $sourceDir2/vstlib $sourceDir/vst/public.sdk/source/vst2.x

	cd $sourceDir/mda-vst.haiku

	# fix line endings
	sed -i 's/\r//' $sourceDir2/h/aeffect.h
	sed -i 's/\r//' $sourceDir2/h/aeffectx.h
	sed -i 's/\r//' $sourceDir2/h/vstfxstore.h

	make all
}

INSTALL()
{
	mkdir -p $addOnsDir/media/vstplugins
	for i in $sourceDir/mda-vst.haiku/*.so; do cp "$i" "$addOnsDir/media/vstplugins/$(basename ${i%.so})"; done
}
