summaryrefslogtreecommitdiff
path: root/audio/fluidsynth
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2005-04-25 13:53:37 +0000
committeradam <adam@pkgsrc.org>2005-04-25 13:53:37 +0000
commit3a818383086d545e754b5723c8b8591213bb3ae3 (patch)
treead1e8fc8bfc569eb46b410c20b37abb35656d0b2 /audio/fluidsynth
parente220456334c250c2bd0ca4c6d6e4072cc46d039c (diff)
downloadpkgsrc-3a818383086d545e754b5723c8b8591213bb3ae3.tar.gz
FluidSynth is a real-time software synthesiser based on the SoundFont 2 spec
Diffstat (limited to 'audio/fluidsynth')
-rw-r--r--audio/fluidsynth/DESCR9
-rw-r--r--audio/fluidsynth/Makefile23
-rw-r--r--audio/fluidsynth/PLIST24
-rw-r--r--audio/fluidsynth/buildlink3.mk20
-rw-r--r--audio/fluidsynth/distinfo8
-rw-r--r--audio/fluidsynth/patches/patch-aa162
-rw-r--r--audio/fluidsynth/patches/patch-ab31
-rw-r--r--audio/fluidsynth/patches/patch-ac13
8 files changed, 290 insertions, 0 deletions
diff --git a/audio/fluidsynth/DESCR b/audio/fluidsynth/DESCR
new file mode 100644
index 00000000000..610ab01e8ab
--- /dev/null
+++ b/audio/fluidsynth/DESCR
@@ -0,0 +1,9 @@
+FluidSynth is a real-time software synthesizer based on the SoundFont 2
+specifications. FluidSynth can read MIDI events from a MIDI input
+device and render them to an audio device using SoundFont instruments.
+SoundFont files are composed of digital audio "samples" and additional
+instrument parameters. These files can be created or downloaded off the
+Internet. FluidSynth also has support for controlling effects in real
+time and can play MIDI files.
+
+Note: FluidSynth was previously called IIWU Synth.
diff --git a/audio/fluidsynth/Makefile b/audio/fluidsynth/Makefile
new file mode 100644
index 00000000000..18bb0b1da0d
--- /dev/null
+++ b/audio/fluidsynth/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/04/25 13:53:37 adam Exp $
+
+DISTNAME= fluidsynth-1.0.5
+CATEGORIES= audio
+MASTER_SITES= http://savannah.nongnu.org/download/fluid/
+
+MAINTAINER= ben@NetBSD.org
+HOMEPAGE= http://www.fluidsynth.org/
+COMMENT= Software synthesizer based on SoundFont2
+
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
+USE_LIBTOOL= yes
+GNU_CONFIGURE= yes
+PKGCONFIG_OVERRIDE= fluidsynth.pc.in
+
+CFLAGS+= -DDEVOSSAUDIO="\"${DEVOSSAUDIO}\""
+LDFLAGS+= ${LIBOSSAUDIO}
+
+.include "../../devel/readline/buildlink3.mk"
+.include "../../mk/ossaudio.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/fluidsynth/PLIST b/audio/fluidsynth/PLIST
new file mode 100644
index 00000000000..d7689b644ca
--- /dev/null
+++ b/audio/fluidsynth/PLIST
@@ -0,0 +1,24 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/04/25 13:53:37 adam Exp $
+bin/fluidsynth
+include/fluidsynth.h
+include/fluidsynth/audio.h
+include/fluidsynth/event.h
+include/fluidsynth/gen.h
+include/fluidsynth/log.h
+include/fluidsynth/midi.h
+include/fluidsynth/misc.h
+include/fluidsynth/mod.h
+include/fluidsynth/ramsfont.h
+include/fluidsynth/seq.h
+include/fluidsynth/seqbind.h
+include/fluidsynth/settings.h
+include/fluidsynth/sfont.h
+include/fluidsynth/shell.h
+include/fluidsynth/synth.h
+include/fluidsynth/types.h
+include/fluidsynth/version.h
+include/fluidsynth/voice.h
+lib/libfluidsynth.la
+lib/pkgconfig/fluidsynth.pc
+man/man1/fluidsynth.1
+@dirrm include/fluidsynth
diff --git a/audio/fluidsynth/buildlink3.mk b/audio/fluidsynth/buildlink3.mk
new file mode 100644
index 00000000000..dd1c4c116f5
--- /dev/null
+++ b/audio/fluidsynth/buildlink3.mk
@@ -0,0 +1,20 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2005/04/25 13:53:37 adam Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+FLUIDSYNTH_BUILDLINK3_MK:= ${FLUIDSYNTH_BUILDLINK3_MK}+
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= fluidsynth
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nfluidsynth}
+BUILDLINK_PACKAGES+= fluidsynth
+
+.if !empty(FLUIDSYNTH_BUILDLINK3_MK:M+)
+BUILDLINK_DEPENDS.fluidsynth+= fluidsynth>=1.0.5
+BUILDLINK_PKGSRCDIR.fluidsynth?= ../../audio/fluidsynth
+.endif # FLUIDSYNTH_BUILDLINK3_MK
+
+.include "../../devel/readline/buildlink3.mk"
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/audio/fluidsynth/distinfo b/audio/fluidsynth/distinfo
new file mode 100644
index 00000000000..7b7b17706a6
--- /dev/null
+++ b/audio/fluidsynth/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2005/04/25 13:53:37 adam Exp $
+
+SHA1 (fluidsynth-1.0.5.tar.gz) = c74c8ecd6c8e3dbb2a33fe83b42267df5db75829
+RMD160 (fluidsynth-1.0.5.tar.gz) = 04f0166abab4196179fb459e033370ffb4e4aa6b
+Size (fluidsynth-1.0.5.tar.gz) = 991183 bytes
+SHA1 (patch-aa) = 0cd5f42d4df763ef358f1d8a05826e0626882bf2
+SHA1 (patch-ab) = 8b9f615cf81bab81e0e6fc8f3e1c1a589b29cd90
+SHA1 (patch-ac) = d74ac15c241bee879483531c88a79c398c820c6e
diff --git a/audio/fluidsynth/patches/patch-aa b/audio/fluidsynth/patches/patch-aa
new file mode 100644
index 00000000000..fff40b6c3fd
--- /dev/null
+++ b/audio/fluidsynth/patches/patch-aa
@@ -0,0 +1,162 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/04/25 13:53:37 adam Exp $
+
+--- src/fluid_oss.c.orig Wed Mar 3 03:02:28 2004
++++ src/fluid_oss.c
+@@ -43,6 +43,12 @@
+ #include <errno.h>
+ #include <sys/poll.h>
+
++#ifdef __NetBSD__
++#define DEVOSSMIDI "/dev/rmidi0"
++#else
++#define DEVOSSMIDI "/dev/midi"
++#endif
++
+ #define BUFFER_LENGTH 512
+
+ /* SCHED_FIFO priorities for OSS threads (see pthread_attr_setschedparam) */
+@@ -103,7 +109,7 @@ static void* fluid_oss_midi_run(void* d)
+ void
+ fluid_oss_audio_driver_settings(fluid_settings_t* settings)
+ {
+- fluid_settings_register_str(settings, "audio.oss.device", "/dev/dsp", 0, NULL, NULL);
++ fluid_settings_register_str(settings, "audio.oss.device", DEVOSSAUDIO, 0, NULL, NULL);
+ }
+
+ /*
+@@ -122,8 +128,10 @@ new_fluid_oss_audio_driver(fluid_setting
+ int format;
+ pthread_attr_t attr;
+ int err;
++#if !defined(__NetBSD__)
+ int sched = SCHED_FIFO;
+ struct sched_param priority;
++#endif
+
+ dev = FLUID_NEW(fluid_oss_audio_driver_t);
+ if (dev == NULL) {
+@@ -168,7 +176,7 @@ new_fluid_oss_audio_driver(fluid_setting
+ }
+
+ if (!fluid_settings_getstr(settings, "audio.oss.device", &devname)) {
+- devname = "/dev/dsp";
++ devname = DEVOSSAUDIO;
+ }
+
+ if (stat(devname, &devstat) == -1) {
+@@ -229,6 +237,13 @@ new_fluid_oss_audio_driver(fluid_setting
+ goto error_recovery;
+ }
+
++#ifdef __NetBSD__
++ err = pthread_create(&dev->thread, &attr, fluid_oss_audio_run, (void*) dev);
++ if (err) {
++ FLUID_LOG(FLUID_ERR, "Couldn't create audio thread");
++ goto error_recovery;
++ }
++#else
+ /* the pthread_create man page explains that
+ pthread_attr_setschedpolicy returns an error if the user is not
+ permitted the set SCHED_FIFO. it seems however that no error is
+@@ -264,6 +279,7 @@ new_fluid_oss_audio_driver(fluid_setting
+ }
+ break;
+ }
++#endif /* __NetBSD__ */
+
+ return (fluid_audio_driver_t*) dev;
+
+@@ -285,8 +301,10 @@ new_fluid_oss_audio_driver2(fluid_settin
+ int format;
+ pthread_attr_t attr;
+ int err;
++#if !defined(__NetBSD__)
+ int sched = SCHED_FIFO;
+ struct sched_param priority;
++#endif
+
+ dev = FLUID_NEW(fluid_oss_audio_driver_t);
+ if (dev == NULL) {
+@@ -311,7 +329,7 @@ new_fluid_oss_audio_driver2(fluid_settin
+
+
+ if (!fluid_settings_getstr(settings, "audio.oss.device", &devname)) {
+- devname = "/dev/dsp";
++ devname = DEVOSSAUDIO;
+ }
+ if (stat(devname, &devstat) == -1) {
+ FLUID_LOG(FLUID_ERR, "Device <%s> does not exists", devname);
+@@ -380,6 +398,13 @@ new_fluid_oss_audio_driver2(fluid_settin
+ goto error_recovery;
+ }
+
++#ifdef __NetBSD__
++ err = pthread_create(&dev->thread, &attr, fluid_oss_audio_run2, (void*) dev);
++ if (err) {
++ FLUID_LOG(FLUID_ERR, "Couldn't create audio2 thread");
++ goto error_recovery;
++ }
++#else
+ /* the pthread_create man page explains that
+ pthread_attr_setschedpolicy returns an error if the user is not
+ permitted the set SCHED_FIFO. it seems however that no error is
+@@ -415,6 +440,7 @@ new_fluid_oss_audio_driver2(fluid_settin
+ }
+ break;
+ }
++#endif /* __NetBSD__ */
+
+ return (fluid_audio_driver_t*) dev;
+
+@@ -644,7 +670,7 @@ fluid_oss_audio_run2(void* d)
+
+ void fluid_oss_midi_driver_settings(fluid_settings_t* settings)
+ {
+- fluid_settings_register_str(settings, "midi.oss.device", "/dev/midi", 0, NULL, NULL);
++ fluid_settings_register_str(settings, "midi.oss.device", DEVOSSMIDI, 0, NULL, NULL);
+ }
+
+ /*
+@@ -657,8 +683,10 @@ new_fluid_oss_midi_driver(fluid_settings
+ int err;
+ fluid_oss_midi_driver_t* dev;
+ pthread_attr_t attr;
++#if !defined __NetBSD__
+ int sched = SCHED_FIFO;
+ struct sched_param priority;
++#endif
+ char* device;
+
+ /* not much use doing anything */
+@@ -689,7 +717,7 @@ new_fluid_oss_midi_driver(fluid_settings
+ /* get the device name. if none is specified, use the default device. */
+ fluid_settings_getstr(settings, "midi.oss.device", &device);
+ if (device == NULL) {
+- device = "/dev/midi";
++ device = DEVOSSMIDI;
+ }
+
+ /* open the default hardware device. only use midi in. */
+@@ -706,6 +734,14 @@ new_fluid_oss_midi_driver(fluid_settings
+ FLUID_LOG(FLUID_ERR, "Couldn't initialize midi thread attributes");
+ goto error_recovery;
+ }
++
++#ifdef __NetBSD__
++ err = pthread_create(&dev->thread, &attr, fluid_oss_midi_run, (void*) dev);
++ if (err) {
++ FLUID_LOG(FLUID_ERR, "Couldn't create midi thread");
++ goto error_recovery;
++ }
++#else
+ /* use fifo scheduling. if it fails, use default scheduling. */
+ while (1) {
+ err = pthread_attr_setschedpolicy(&attr, sched);
+@@ -737,6 +773,7 @@ new_fluid_oss_midi_driver(fluid_settings
+ }
+ break;
+ }
++#endif /* __NetBSD__ */
+ return (fluid_midi_driver_t*) dev;
+
+ error_recovery:
diff --git a/audio/fluidsynth/patches/patch-ab b/audio/fluidsynth/patches/patch-ab
new file mode 100644
index 00000000000..282e5a18f78
--- /dev/null
+++ b/audio/fluidsynth/patches/patch-ab
@@ -0,0 +1,31 @@
+$NetBSD: patch-ab,v 1.1.1.1 2005/04/25 13:53:37 adam Exp $
+
+--- src/fluid_sys.c.orig Fri Mar 26 01:20:55 2004
++++ src/fluid_sys.c
+@@ -630,8 +630,10 @@ new_fluid_timer(int msec, fluid_timer_ca
+ {
+ pthread_attr_t *attr = NULL;
+ pthread_attr_t rt_attr;
++#if !defined(__NetBSD__)
+ int sched = SCHED_FIFO;
+ struct sched_param priority;
++#endif
+ int err;
+
+ fluid_timer_t* timer = FLUID_NEW(fluid_timer_t);
+@@ -647,6 +649,7 @@ new_fluid_timer(int msec, fluid_timer_ca
+ timer->auto_destroy = auto_destroy;
+
+ err = pthread_attr_init(&rt_attr);
++#if !defined(__NetBSD__)
+ if (err == 0) {
+ err = pthread_attr_setschedpolicy(&rt_attr, SCHED_FIFO);
+ if (err == 0) {
+@@ -657,6 +660,7 @@ new_fluid_timer(int msec, fluid_timer_ca
+ }
+ }
+ }
++#endif
+
+ if (new_thread) {
+ err = pthread_create(&timer->thread, attr, fluid_timer_start, (void*) timer);
diff --git a/audio/fluidsynth/patches/patch-ac b/audio/fluidsynth/patches/patch-ac
new file mode 100644
index 00000000000..b3f2b031b83
--- /dev/null
+++ b/audio/fluidsynth/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2005/04/25 13:53:37 adam Exp $
+
+--- configure.orig 2005-04-22 15:45:10.000000000 +0000
++++ configure
+@@ -20182,7 +20182,7 @@ fi;
+
+ case "$ENABLE_DEBUG" in
+ no)
+- CFLAGS="${CFLAGS} ${FCCFLAGS} -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused -Winline"
++ CFLAGS="${CFLAGS} ${FCCFLAGS} -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused -Winline"
+
+ cat >>confdefs.h <<\_ACEOF
+ #define DEBUG 0