comparison audio/fluidsynth/fluidsynth.sh @ 917:f183d1d76fa7

audio/fluidsynth: initial import, closes #2214
author David Demelier <markand@malikania.fr>
date Mon, 26 Aug 2019 20:48:21 +0200
parents
children ddab65a5b3f5
comparison
equal deleted inserted replaced
916:d1df72c046bc 917:f183d1d76fa7
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 # TODO: add PORTAUDIO option
19
20 PKGNAME=fluidsynth
21 PKGVERSION=2.0.6
22 PKGREVISION=1
23 PKGLICENSE="one of README.licenses.md or CUSTOM"
24 PKGSUMMARY="short summary"
25 PKGDOWNLOAD="https://github.com/FluidSynth/$PKGNAME/archive/v2.0.6.tar.gz"
26 PKGDEPENDS="cmake:build"
27 PKGOPTIONS="ALSA
28 AUDIO
29 DBUS
30 IPV6
31 JACK
32 LADSPA
33 OSS
34 PULSEAUDIO
35 READLINE
36 SNDFILE"
37
38 : ${CC:=clang}
39 : ${CFLAGS:=-O2}
40 : ${CXX:=clang++}
41 : ${CXXFLAGS:=-O2}
42 : ${ALSA:=yes}
43 : ${AUDIO:=yes}
44 : ${DBUS:=yes}
45 : ${IPV6:=yes}
46 : ${JACK:=yes}
47 : ${LADSPA:=yes}
48 : ${OSS:=yes}
49 : ${PULSEAUDIO:=yes}
50 : ${READLINE:=yes}
51 : ${SNDFILE:=yes}
52
53 if [ "$ALSA" = "yes" ]; then
54 PKGDEPENDS="alsa-lib $PKGDEPENDS"
55 with_alsa="-Denable-alsa=On"
56 else
57 with_alsa="-Denable-alsa=Off"
58 fi
59
60 if [ "$AUDIO" = "yes" ]; then
61 with_audio="-Denable-audio=On"
62 else
63 with_audio="-Denable-audio=Off"
64 fi
65
66 if [ "$DBUS" = "yes" ]; then
67 PKGDEPENDS="dbus $PKGDEPENDS"
68 with_dbus="-Denable-dbus=On"
69 else
70 with_dbus="-Denable-dbus=Off"
71 fi
72
73 if [ "$IPV6" = "yes" ]; then
74 with_ipv6="-Denable-ipv6=On"
75 else
76 with_ipv6="-Denable-ipv6=Off"
77 fi
78
79 if [ "$JACK" = "yes" ]; then
80 PKGDEPENDS="jack2 $PKGDEPENDS"
81 with_jack="-Denable-jack=On"
82 else
83 with_jack="-Denable-jack=Off"
84 fi
85
86 if [ "$LADSPA" = "yes" ]; then
87 PKGDEPENDS="ladspa glib $PKGDEPENDS"
88 with_ladspa="-Denable-ladspa=On"
89 else
90 with_ladspa="-Denable-ladspa=Off"
91 fi
92
93 if [ "$OSS" = "yes" ]; then
94 with_oss="-Denable-oss=On"
95 else
96 with_oss="-Denable-oss=Off"
97 fi
98
99 if [ "$PULSEAUDIO" = "yes" ]; then
100 PKGDEPENDS="pulseaudio $PKGDEPENDS"
101 with_pulseaudio="-Denable-pulseaudio=On"
102 else
103 with_pulseaudio="-Denable-pulseaudio=Off"
104 fi
105
106 if [ "$READLINE" = "yes" ]; then
107 PKGDEPENDS="readline $PKGDEPENDS"
108 with_readline="-Denable-readline=On"
109 else
110 with_readline="-Denable-readline=Off"
111 fi
112
113 if [ "$SNDFILE" = "yes" ]; then
114 PKGDEPENDS="libsndfile $PKGDEPENDS"
115 with_sndfile="-Denable-libsndfile=On"
116 else
117 with_sndfile="-Denable-libsndfile=Off"
118 fi
119
120 build()
121 {
122 rm -rf $PKGNAME-$PKGVERSION
123 tar xvf v$PKGVERSION.tar.gz
124 cd $PKGNAME-$PKGVERSION
125
126 mkdir build && cd build
127 cmake .. \
128 -DBUILD_SHARED_LIBS=On \
129 -DCMAKE_BUILD_TYPE=Release \
130 -DCMAKE_CXX_COMPILER="$CXX" \
131 -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
132 -DCMAKE_C_COMPILER="$CC" \
133 -DCMAKE_C_FLAGS="$CFLAGS" \
134 -DCMAKE_INSTALL_PREFIX= \
135 -DLIB_SUFFIX="" \
136 -Denable-systemd=Off \
137 $with_alsa \
138 $with_audio \
139 $with_dbus \
140 $with_ipv6 \
141 $with_ladspa \
142 $with_oss \
143 $with_pulseaudio \
144 $with_readline \
145 $with_sndfile
146 make
147 make install DESTDIR=$DESTDIR
148 cd ..
149
150 cd ..
151 rm -rf $PKGNAME-$PKGVERSION
152 }