blob: bf5899f7260b527987703b18b9ee331183cde8b0 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# Maintainer: Yauheni Kirylau <actionless dot loveless AT gmail MF com>
# Contributor: Simon Thorpe <simon@hivetechnology.com.au>
pkgname=mrswatson-git
_reponame=MrsWatson
pkgver=0.9.8.r128.g32ec2b4
pkgrel=3
pkgdesc="Apply VST to WAV files or convert MIDI files to WAV using VST plugins from the CLI"
arch=('x86_64')
url="https://github.com/teragonaudio/$_reponame"
license=('BSD')
depends=(libx11 lib32-libx11 flac lib32-flac audiofile)
makedepends=(gcc lib32-gcc-libs cmake git vst2sdk)
optdepends=('wine: render windows vst plugins')
conflicts=(mrswatson-bin)
source=(
git+$url
CMakeLists_vendor_arch.txt
long_filenames.patch
)
sha256sums=('SKIP'
'600fa7d38fc58239991786b6c78512ad0f00cd0933cde857517c107d6f0dc4a6'
'b1ec7eceea820407d2df0dfe1ba34fe7ea343bde2cc6dd439390a0748f6bcaf1')
pkgver() {
cd $srcdir/$_reponame
set -o pipefail
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || echo 0.0.1
}
prepare(){
cd $srcdir/$_reponame
git submodule sync
git submodule update --init --recursive
rm -fr vendor/{flac,flac-config}
cp $srcdir/CMakeLists_vendor_arch.txt vendor/CMakeLists.txt
sed -i -e 's/-1 << kScaleBits/-1U << kScaleBits/g' vendor/audiofile/libaudiofile/modules/SimpleModule.h
patch -Np1 -i "${srcdir}/long_filenames.patch"
}
build(){
cd $srcdir/$_reponame
mkdir -p build
cd build
mkdir -p lib32
ln -sf /usr/lib32/libX11.so lib32/libx11.so
ln -sf /usr/lib32/libFLAC.so lib32/libflac32.so
mkdir -p lib64
ln -sf /usr/lib/libX11.so lib64/libx11.so
ln -sf /usr/lib/libFLAC.so lib64/libflac64.so
ln -sf /usr/lib/libaudiofile.so lib64/libaudiofile64.so
cmake \
-D CMAKE_BUILD_TYPE=Release \
-DVERBOSE=TRUE \
-DX11_X11_LIB=/usr/lib/libX11.so \
-DX11=/usr/include/X11 \
-DX11_X11_INCLUDE_PATH=/usr/include/X11 \
-DX11_Xlib_INCLUDE_PATH=/usr/include/X11 \
-DWITH_GUI=1 \
-DWITH_FLAC=1 \
-DCMAKE_LIBRARY_PATH=/usr/lib \
"-DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG -fmessage-length=0 -pipe -Werror -Waddress -Wchar-subscripts -Wcomment -Wformat -Wmissing-field-initializers -Wno-trigraphs -Wnonnull -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wswitch-default -Wtrigraphs -Wuninitialized -Wunused-label -Wunused-value -Wunused-variable -Wvolatile-register-var -Wmaybe-uninitialized -Wenum-compare -Wimplicit-int -Wimplicit-function-declaration -Wmain -Wmissing-braces -Wpointer-sign -std=c99 -Wno-error=uninitialized -Wno-unused-const-variable -Wno-error=unused-const-variable= -Wno-error=sign-compare" \
"-DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG -fmessage-length=0 -pipe -Waddress -Wchar-subscripts -Wcomment -Wformat -Wmissing-field-initializers -Wno-trigraphs -Wnonnull -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wswitch-default -Wtrigraphs -Wuninitialized -Wunused-label -Wunused-value -Wunused-variable -Wvolatile-register-var -Wmaybe-uninitialized -Wc++11-compat -Wreorder -I /usr/src/vst2sdk/pluginterfaces/vst2.x/ -Wno-error=deprecated-declarations -Wno-error=maybe-uninitialized -Wno-error=alloc-size-larger-than=" \
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -L$srcdir/$_reponame/build/lib64 -L$srcdir/$_reponame/build/lib32" \
..
make
}
package(){
mkdir -p $pkgdir/usr/bin
cd $srcdir/$_reponame
install -Dm755 bin/Windows/mrswatson.exe $pkgdir/usr/bin/
install -Dm755 bin/Windows/mrswatson64.exe $pkgdir/usr/bin/
install -Dm755 build/main/mrswatson $pkgdir/usr/bin/
install -Dm755 build/main/mrswatson64 $pkgdir/usr/bin/
}
|