fluidlite: add recipe for version 1.0.0.

* static lib only.
This commit is contained in:
Jerome Duval
2016-08-03 20:22:30 +02:00
parent 54f1fa8771
commit 0453dadd76
2 changed files with 140 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
SUMMARY="A very light software real-time synthesizer"
DESCRIPTION="FluidLite is a very light version of FluidSynth \
designed to be hardware, platform and external dependency independant.
It only uses standard C libraries.
It also adds support for SF3 files (SF2 files compressed with ogg vorbis) \
and an additional setting to remove the constraint of channel 9 (drums): \
fluid_settings_setstr(settings, "synth.drums-channel.active", "no"); \
you can still select bank 128 on any channel to use drum kits.
FluidLite keeps very minimal functionnalities (settings and synth), \
therefore MIDI file reading, realtime MIDI events and audio output must be \
implemented externally."
HOMEPAGE="https://github.com/divideconcept/FluidLite"
COPYRIGHT="2007-2012 Josh Green, Pedro Lopez-Cabanillas, David Henningsson"
LICENSE="GNU LGPL v2.1"
REVISION="1"
gitRevision="b9573fd464ce3f872b2f5511b595bc67d4498466"
SOURCE_URI="$HOMEPAGE/archive/$gitRevision.tar.gz"
CHECKSUM_SHA256="e7501cee0f4b2312cf42b7a8eae671849416cb25c9dc7ca86ab9dce801225c7a"
SOURCE_DIR="FluidLite-$gitRevision"
PATCHES="fluidlite-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
fluidlite${secondaryArchSuffix} = $portVersion
"
REQUIRES="
haiku${secondaryArchSuffix}
"
PROVIDES_devel="
fluidlite${secondaryArchSuffix}_devel = $portVersion
devel:libfluidlite$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES_devel="
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libogg$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix .
make $jobArgs
}
INSTALL()
{
make install
mv $prefix/lib $prefix/lib2
mkdir -p $(dirname $includeDir) $(dirname $libDir)
mv $prefix/include $includeDir
mv $prefix/lib2 $libDir
prepareInstalledDevelLib libfluidlite
# devel package
packageEntries devel \
$developDir
}

View File

@@ -0,0 +1,66 @@
From 87b5d31b533b4b717861da44ff8b05278ddff37f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 3 Aug 2016 19:08:44 +0200
Subject: gcc2 patch
diff --git a/src/fluid_synth.c b/src/fluid_synth.c
index aa3bf60..a743750 100644
--- a/src/fluid_synth.c
+++ b/src/fluid_synth.c
@@ -568,7 +568,8 @@ new_fluid_synth(fluid_settings_t *settings)
void
fluid_synth_set_sample_rate(fluid_synth_t* synth, float sample_rate)
{
- for (int i = 0; i < synth->nvoice; i++) {
+ int i;
+ for (i = 0; i < synth->nvoice; i++) {
delete_fluid_voice(synth->voice[i]);
synth->voice[i] = new_fluid_voice(synth->sample_rate);
}
@@ -3061,6 +3062,7 @@ int fluid_synth_tune_notes(fluid_synth_t* synth, int bank, int prog,
int len, int *key, double* pitch, int apply)
{
fluid_tuning_t* old_tuning, *new_tuning;
+ int i;
if(!(synth != NULL)) return FLUID_FAILED; //fluid_return_val_if_fail
if(!(bank >= 0 && bank < 128)) return FLUID_FAILED; //fluid_return_val_if_fail
@@ -3079,7 +3081,7 @@ int fluid_synth_tune_notes(fluid_synth_t* synth, int bank, int prog,
return FLUID_FAILED;
}
- for (int i = 0; i < len; i++) {
+ for (i = 0; i < len; i++) {
fluid_tuning_set_pitch(new_tuning, key[i], pitch[i]);
}
--
2.2.2
From bf9855376cacbf45d9bfe9906c9b6f8359461a42 Mon Sep 17 00:00:00 2001
From: Pete Goodeve <pete.goodeve@computer.org>
Date: Fri, 24 May 2013 19:33:20 -0700
Subject: adjust fluidsynth fine tuning range to match standard
diff --git a/src/fluid_chan.c b/src/fluid_chan.c
index a06bec7..943465d 100644
--- a/src/fluid_chan.c
+++ b/src/fluid_chan.c
@@ -268,9 +268,9 @@ fluid_channel_cc(fluid_channel_t* chan, int num, int value)
fluid_channel_pitch_wheel_sens (chan, value); /* Set bend range in semitones */
/* FIXME - Handle LSB? (Fine bend range in cents) */
break;
- case RPN_CHANNEL_FINE_TUNE: /* Fine tune is 14 bit over 1 semitone (+/- 50 cents, 8192 = center) */
+ case RPN_CHANNEL_FINE_TUNE: /* Fine tune is 14 bit over +/-1 semitone (+/- 100 cents, 8192 = center) */
fluid_synth_set_gen(chan->synth, chan->channum, GEN_FINETUNE,
- (data - 8192) / 8192.0 * 50.0);
+ (data - 8192) / 8192.0 * 100.0);
break;
case RPN_CHANNEL_COARSE_TUNE: /* Coarse tune is 7 bit and in semitones (64 is center) */
fluid_synth_set_gen(chan->synth, chan->channum, GEN_COARSETUNE,
--
2.2.2