summaryrefslogtreecommitdiff
path: root/repo/zynaddsubfx/zynaddsubfx.xibuild
blob: dea9ca19f315048fe0324296c2a2737c0a181235 (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
#!/bin/sh

NAME="zynaddsubfx"
DESC="fully featured open source software synthesizer"

MAKEDEPS="cmake "
DEPS="pkg-config zlib mxml ntk libx11 liblo fftw libxpm pulseaudio jack alsa-lib doxygen fltk "

PKG_VER=3.0.6
SOURCE="git://git.code.sf.net/p/zynaddsubfx/code/"
ADDITIONAL="
cmake-build-type-none.patch
fix-bogus-strstr.patch
fix-memset.patch
"

prepare () {
    git submodule init
    git submodule update
    apply_patches

    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 \
        -DGuiModule=ntk
    cmake --build build
}


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