From 0453dadd766a918f33300a6c396622f88bbdf7ee Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 3 Aug 2016 20:22:30 +0200 Subject: [PATCH] fluidlite: add recipe for version 1.0.0. * static lib only. --- media-sound/fluidlite/fluidlite-1.0.0.recipe | 74 +++++++++++++++++++ .../patches/fluidlite-1.0.0.patchset | 66 +++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 media-sound/fluidlite/fluidlite-1.0.0.recipe create mode 100644 media-sound/fluidlite/patches/fluidlite-1.0.0.patchset diff --git a/media-sound/fluidlite/fluidlite-1.0.0.recipe b/media-sound/fluidlite/fluidlite-1.0.0.recipe new file mode 100644 index 000000000..ce84f7ecd --- /dev/null +++ b/media-sound/fluidlite/fluidlite-1.0.0.recipe @@ -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 +} diff --git a/media-sound/fluidlite/patches/fluidlite-1.0.0.patchset b/media-sound/fluidlite/patches/fluidlite-1.0.0.patchset new file mode 100644 index 000000000..b9a4f00f0 --- /dev/null +++ b/media-sound/fluidlite/patches/fluidlite-1.0.0.patchset @@ -0,0 +1,66 @@ +From 87b5d31b533b4b717861da44ff8b05278ddff37f Mon Sep 17 00:00:00 2001 +From: Jerome Duval +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 +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 +