From ab0e4733cd71ead78ae077f8022e52411ba9ff27 Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Sun, 28 Jul 2019 14:38:34 +0200 Subject: [PATCH] New package: fluidsynth --- src/fluidsynth-test.c | 21 +++++++++++++++++++++ src/fluidsynth.mk | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 src/fluidsynth-test.c create mode 100644 src/fluidsynth.mk diff --git a/src/fluidsynth-test.c b/src/fluidsynth-test.c new file mode 100644 index 00000000..fc5cb157 --- /dev/null +++ b/src/fluidsynth-test.c @@ -0,0 +1,21 @@ +/* + This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include + +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 00000000..7dfab9f6 --- /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