summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLothar Serra Mari <serra@scummvm.org>2019-07-28 12:38:34 (GMT)
committerTony Theodore <tonyt@logyst.com>2019-09-08 08:32:03 (GMT)
commitab0e4733cd71ead78ae077f8022e52411ba9ff27 (patch)
treee5e5771fcf7f633af34ee64804dba4f6f0bea368
parent90e30c7cfab95d350cdd48f8239695613d4ab14b (diff)
downloadmxe-ab0e4733cd71ead78ae077f8022e52411ba9ff27.zip
mxe-ab0e4733cd71ead78ae077f8022e52411ba9ff27.tar.gz
mxe-ab0e4733cd71ead78ae077f8022e52411ba9ff27.tar.bz2
New package: fluidsynth
-rw-r--r--src/fluidsynth-test.c21
-rw-r--r--src/fluidsynth.mk32
2 files changed, 53 insertions, 0 deletions
diff --git a/src/fluidsynth-test.c b/src/fluidsynth-test.c
new file mode 100644
index 0000000..fc5cb15
--- /dev/null
+++ b/src/fluidsynth-test.c
@@ -0,0 +1,21 @@
+/*
+ This file is part of MXE. See LICENSE.md for licensing information.
+ */
+
+#include <fluidsynth.h>
+
+int main(int argc, char *argv[])
+{
+ fluid_settings_t* settings;
+ fluid_synth_t* synth;
+ (void)argc;
+ (void)argv;
+ /* Set up the synthesizer */
+ settings = new_fluid_settings();
+ synth = new_fluid_synth(settings);
+
+ /* ...and delete it again*/
+ delete_fluid_synth(synth);
+ delete_fluid_settings(settings);
+ return 0;
+}
diff --git a/src/fluidsynth.mk b/src/fluidsynth.mk
new file mode 100644
index 0000000..7dfab9f
--- /dev/null
+++ b/src/fluidsynth.mk
@@ -0,0 +1,32 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+PKG := fluidsynth
+$(PKG)_WEBSITE := http://fluidsynth.org/
+$(PKG)_DESCR := FluidSynth - a free software synthesizer based on the SoundFont 2 specifications
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 2.0.5
+$(PKG)_CHECKSUM := 69b244512883491e7e66b4d0151c61a0d6d867d4d2828c732563be0f78abcc51
+$(PKG)_GH_CONF := FluidSynth/fluidsynth/tags,v
+$(PKG)_DEPS := cc glib
+
+define $(PKG)_BUILD
+ cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)'
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1
+
+ echo 'Requires: glib-2.0' >> '$(BUILD_DIR)'/fluidsynth.pc
+ $(SED) -i -e 's/Libs: -L$${libdir} -lfluidsynth/Libs: -L$${libdir} -lfluidsynth -ldsound/g' '$(BUILD_DIR)/fluidsynth.pc'
+ $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/fluidsynth'
+ $(INSTALL) -v '$(BUILD_DIR)/include/fluidsynth.h' '$(PREFIX)/$(TARGET)/include/'
+ $(INSTALL) -v '$(BUILD_DIR)/include/fluidsynth/'*.h '$(PREFIX)/$(TARGET)/include/fluidsynth/'
+ $(INSTALL) -v '$(SOURCE_DIR)/include/fluidsynth/'*.h '$(PREFIX)/$(TARGET)/include/fluidsynth/'
+ $(INSTALL) -v '$(BUILD_DIR)/fluidsynth.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig/'
+ $(INSTALL) -v '$(BUILD_DIR)/src/libfluidsynth.a' '$(PREFIX)/$(TARGET)/lib/'
+ $(if $(BUILD_SHARED),\
+ $(INSTALL) -m755 -v '$(BUILD_DIR)/src/libfluidsynth.dll.a' '$(PREFIX)/$(TARGET)/bin/')
+
+ # compile test
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-fluidsynth.exe' \
+ `'$(TARGET)-pkg-config' --cflags --libs fluidsynth`
+endef