archrelease: copy trunk to community-any
[arch-community.git] / bespokesynth / trunk / PKGBUILD
blob668bcd0945167c7d762ee6eb0fc4c9b0374d052e
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=bespokesynth
4 pkgver=1.1.0.r154.g0acb8ebf
5 _commit=0acb8ebff6e59f8b000da240e11f31ccee9cca72  # current HEAD
6 pkgrel=2
7 pkgdesc="A software modular synth"
8 arch=(x86_64)
9 url="https://www.bespokesynth.com/"
10 license=(GPL3)
11 groups=(pro-audio)
12 depends=(
13   gcc-libs
14   glibc
15   hicolor-icon-theme
16   libglvnd
17   libpng
18   python
19   zlib
21 makedepends=(
22   abletonlink
23   alsa-lib
24   cmake
25   freetype2
26   git
27   jack
28   jsoncpp
29   libusb
30   libx11
31   libxcursor
32   libxinerama
33   pybind11
34   tuning-library
35   xorg-xrandr
37 optdepends=(
38   'jack: to use with JACK'
39   'python-jedi: for code completion'
41 provides=(vst3-host)
42 source=(
43   $pkgname::git+https://github.com/$pkgname/$pkgname#commit=$_commit
44   MTS-ESP::git+https://github.com/ODDSound/MTS-ESP
45   $pkgname-1.1.0-devendor_ableton_link.patch
47 sha512sums=('SKIP'
48             'SKIP'
49             '29f6ea325ae9ab974443bfc87ace59a89b18c8ec355224a4d15ad5bda6601c1901381259761f561b96426ab4688680f0409297eb8750b2d6516e6ca49da16f73')
50 b2sums=('SKIP'
51         'SKIP'
52         'f1d45e9220ec4d33327fb96594b6b3b5db2b4d3fc8716946568fe695de8ad5a8558218f803a9906cb31f955fc3f44ce9fd5265db65a94ea4cd538cb7777c88f4')
54 pkgver() {
55   cd $pkgname
56   git describe --exclude Nightly --long --tags | sed 's/v//;s/\([^-]*-g\)/r\1/;s/-/./g'
59 prepare() {
60   # devendor abletonlink
61   patch -Np1 -d $pkgname -i ../$pkgname-1.1.0-devendor_ableton_link.patch
63   cd $pkgname
64   git submodule init
65   git config submodule.libs/oddsound-mts/MTS-ESP.url "$srcdir/MTS-ESP"
66   # NOTE: use bundled juce as upstream is seemingly not interested in doing releases: https://github.com/BespokeSynth/BespokeSynth/issues/918
67   # git submodule deinit libs/JUCE
68   git submodule deinit libs/pybind11
69   git submodule deinit libs/tuning-library
70   git submodule deinit libs/json/jsoncpp
71   git -c protocol.file.allow=always submodule update
74 build() {
75   local cmake_options=(
76     -B build
77     -D CMAKE_BUILD_TYPE=None
78     -D CMAKE_INSTALL_PREFIX=/usr
79     -D BESPOKE_DEVENDORED_SYSTEM_JUCE=OFF
80     -D BESPOKE_SYSTEM_ABLETONLINK=ON
81     -D BESPOKE_SYSTEM_PYBIND11=ON
82     -D BESPOKE_SYSTEM_JSONCPP=ON
83     -D BESPOKE_SYSTEM_TUNING_LIBRARY=ON
84     -D BESPOKE_SYSTEM_JUCE=OFF
85     -S $pkgname
86     -W no-dev
87   )
89   cmake "${cmake_options[@]}"
90   cmake --build build --verbose
93 check() {
94   ctest --test-dir build --output-on-failure
97 package() {
98   depends+=(
99     alsa-lib libasound.so
100     freetype2 libfreetype.so
101     jsoncpp libjsoncpp.so
102     libusb libusb-1.0.so
103   )
105   DESTDIR="$pkgdir" cmake --install build