changeset 917:f183d1d76fa7

audio/fluidsynth: initial import, closes #2214
author David Demelier <markand@malikania.fr>
date Mon, 26 Aug 2019 20:48:21 +0200
parents d1df72c046bc
children 52d72b41a233
files audio/fluidsynth/fluidsynth.sh audio/fluidsynth/fluidsynth.sha1
diffstat 2 files changed, 153 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/fluidsynth/fluidsynth.sh	Mon Aug 26 20:48:21 2019 +0200
@@ -0,0 +1,152 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+# TODO: add PORTAUDIO option
+
+PKGNAME=fluidsynth
+PKGVERSION=2.0.6
+PKGREVISION=1
+PKGLICENSE="one of README.licenses.md or CUSTOM"
+PKGSUMMARY="short summary"
+PKGDOWNLOAD="https://github.com/FluidSynth/$PKGNAME/archive/v2.0.6.tar.gz"
+PKGDEPENDS="cmake:build"
+PKGOPTIONS="ALSA
+            AUDIO
+            DBUS
+            IPV6
+            JACK
+            LADSPA
+            OSS
+            PULSEAUDIO
+            READLINE
+            SNDFILE"
+
+: ${CC:=clang}
+: ${CFLAGS:=-O2}
+: ${CXX:=clang++}
+: ${CXXFLAGS:=-O2}
+: ${ALSA:=yes}
+: ${AUDIO:=yes}
+: ${DBUS:=yes}
+: ${IPV6:=yes}
+: ${JACK:=yes}
+: ${LADSPA:=yes}
+: ${OSS:=yes}
+: ${PULSEAUDIO:=yes}
+: ${READLINE:=yes}
+: ${SNDFILE:=yes}
+
+if [ "$ALSA" = "yes" ]; then
+	PKGDEPENDS="alsa-lib $PKGDEPENDS"
+	with_alsa="-Denable-alsa=On"
+else
+	with_alsa="-Denable-alsa=Off"
+fi
+
+if [ "$AUDIO" = "yes" ]; then
+	with_audio="-Denable-audio=On"
+else
+	with_audio="-Denable-audio=Off"
+fi
+
+if [ "$DBUS" = "yes" ]; then
+	PKGDEPENDS="dbus $PKGDEPENDS"
+	with_dbus="-Denable-dbus=On"
+else
+	with_dbus="-Denable-dbus=Off"
+fi
+
+if [ "$IPV6" = "yes" ]; then
+	with_ipv6="-Denable-ipv6=On"
+else
+	with_ipv6="-Denable-ipv6=Off"
+fi
+
+if [ "$JACK" = "yes" ]; then
+	PKGDEPENDS="jack2 $PKGDEPENDS"
+	with_jack="-Denable-jack=On"
+else
+	with_jack="-Denable-jack=Off"
+fi
+
+if [ "$LADSPA" = "yes" ]; then
+	PKGDEPENDS="ladspa glib $PKGDEPENDS"
+	with_ladspa="-Denable-ladspa=On"
+else
+	with_ladspa="-Denable-ladspa=Off"
+fi
+
+if [ "$OSS" = "yes" ]; then
+	with_oss="-Denable-oss=On"
+else
+	with_oss="-Denable-oss=Off"
+fi
+
+if [ "$PULSEAUDIO" = "yes" ]; then
+	PKGDEPENDS="pulseaudio $PKGDEPENDS"
+	with_pulseaudio="-Denable-pulseaudio=On"
+else
+	with_pulseaudio="-Denable-pulseaudio=Off"
+fi
+
+if [ "$READLINE" = "yes" ]; then
+	PKGDEPENDS="readline $PKGDEPENDS"
+	with_readline="-Denable-readline=On"
+else
+	with_readline="-Denable-readline=Off"
+fi
+
+if [ "$SNDFILE" = "yes" ]; then
+	PKGDEPENDS="libsndfile $PKGDEPENDS"
+	with_sndfile="-Denable-libsndfile=On"
+else
+	with_sndfile="-Denable-libsndfile=Off"
+fi
+
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf v$PKGVERSION.tar.gz
+	cd $PKGNAME-$PKGVERSION
+
+	mkdir build && cd build
+	cmake .. \
+		-DBUILD_SHARED_LIBS=On \
+		-DCMAKE_BUILD_TYPE=Release \
+		-DCMAKE_CXX_COMPILER="$CXX" \
+		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+		-DCMAKE_C_COMPILER="$CC" \
+		-DCMAKE_C_FLAGS="$CFLAGS" \
+		-DCMAKE_INSTALL_PREFIX= \
+		-DLIB_SUFFIX="" \
+		-Denable-systemd=Off \
+		$with_alsa \
+		$with_audio \
+		$with_dbus \
+		$with_ipv6 \
+		$with_ladspa \
+		$with_oss \
+		$with_pulseaudio \
+		$with_readline \
+		$with_sndfile
+	make
+	make install DESTDIR=$DESTDIR
+	cd ..
+
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/fluidsynth/fluidsynth.sha1	Mon Aug 26 20:48:21 2019 +0200
@@ -0,0 +1,1 @@
+a05f7d5f2dd875cc5e7a076a6d5919bfbe9c180e  v2.0.6.tar.gz