summaryrefslogtreecommitdiff
path: root/repo/zynaddsubfx/zynaddsubfx.xibuild
blob: 228806be6aed02ce9700ac5a2a561919fb55d686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh

NAME="zynaddsubfx"
DESC="Opensource software synthesizer capable of making a countless number of instruments."

MAKEDEPS="cmake jack fltk portaudio mxml sndio bash-completion liblo libxpm"
DEPS="less "

PKG_VER=3.0.5
SOURCE="https://downloads.sourceforge.net/project/zynaddsubfx/zynaddsubfx/$PKG_VER/zynaddsubfx-$PKG_VER.tar.bz2"
ADDITIONAL="
cmake-build-type-none.patch
fix-bogus-strstr.patch
fix-memset.patch
"
prepare () {
    apply_patches
    sed -e '/-DASM_F2I_YES/d' -i src/CMakeLists.txt

    sed -e 's/COMMAND.*lv2-ttl-generator/COMMAND lv2-ttl-generator/g' -i \
		src/Plugin/AlienWah/CMakeLists.txt \
		src/Plugin/Chorus/CMakeLists.txt \
		src/Plugin/Distortion/CMakeLists.txt \
		src/Plugin/DynamicFilter/CMakeLists.txt \
		src/Plugin/Echo/CMakeLists.txt \
		src/Plugin/Phaser/CMakeLists.txt \
		src/Plugin/Reverb/CMakeLists.txt \
		src/Plugin/ZynAddSubFX/CMakeLists.txt

    sed -i -e 's;gcc ;${CC} ;' \
		-e 's;.fltk-config --cflags.;& ${CFLAGS};' \
		-e 's;.fltk-config --ldflags.;& ${LDFLAGS};' \
		ExternalPrograms/Spliter/Makefile \
		ExternalPrograms/Controller/Makefile
}

build () {
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib  \
        -DDefaultOutput=jack \
        -DDefaultInput=jack \
        -DGuiModule=fltk
	cmake --build build &&
    make -C ExternalPrograms/Spliter &&
	make -C ExternalPrograms/Controller
}

package () {
	DESTDIR="$PKG_DEST" cmake --install build
}