summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 23234271b2d09ec62b106f081b6374263c8c00a0 (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
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>

_pkgname=ensemble-chorus
pkgname="${_pkgname}-git"
pkgver=0.0.1.r56.59baeb8
pkgrel=1
pkgdesc="An LV2/VST2 plugin and stand-alone application emulating a string ensemble chorus"
arch=('i686' 'x86_64')
url="https://github.com/jpcima/ensemble-chorus"
license=('Boost')
depends=('fltk' 'jack' 'libpulse')
makedepends=('git')
groups=('pro-audio' 'lv2-plugins' 'vst-plugins')
provides=("${_pkgname}" "${_pkgname}=${pkgver//.r*/}")
conflicts=("${_pkgname}")
source=(
    "${_pkgname}::git+https://github.com/jpcima/${_pkgname}.git"
    'git+https://github.com/vinniefalco/DSPFilters.git'
    'git+https://github.com/martinmoene/gsl-lite.git'
    'git+https://github.com/thestk/rtaudio.git'
    'git+https://github.com/boostorg/predef.git'
    'git+https://github.com/zeux/pugixml.git'
    'git+https://github.com/jpcima/JUCE.git'
    'juce-pixel.patch'
)
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
         'a98866e03ccdebf93969755277c2712d')


pkgver() {
  cd "${srcdir}/${_pkgname}"

  local ver=$(grep 'EnsembleChorus VERSION' CMakeLists.txt | cut -d '"' -f 2)
  echo "$ver.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${srcdir}/${_pkgname}"

  for submodule in DSPFilters gsl-lite rtaudio predef pugixml JUCE; do
    git config submodule.thirdparty/${submodule}.url "${srcdir}/${submodule}"
  done
  git submodule update

  # https://github.com/WeAreROLI/JUCE/commit/4e0adb2af8b424c43d22bd431011c9a6c57d36b6.patch
  ( cd thirdparty/JUCE; patch -N -r - -p1 -i "${srcdir}/juce-pixel.patch" || exit 0; )
}

build() {
  cd "${srcdir}/${_pkgname}"

  mkdir -p build && cd build
  cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    ..
  cmake --build .
}

package() {
  cd "${srcdir}/${_pkgname}/build"

  make DESTDIR="${pkgdir}" install
}