# Maintainer: robertfoster
# Contributor: Bleuzen <supgesu@gmail.com>
# Contributor: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Wellington <wellingtonwallace@gmail.com>

pkgname=easyeffects-git
pkgver=8.0.0.r0.g2a3986ca4
pkgrel=1
pkgdesc='Simple audio effects'
arch=(x86_64 i686 arm armv6h armv7h aarch64)
url='https://github.com/wwmm/easyeffects'
license=('GPL3')
depends=(
  'kcolorscheme' 
  'kirigami' 
  'kirigami-addons'
  'kiconthemes'
  'kconfigwidgets'
  'qqc2-desktop-style' 
  'breeze-icons' 
  'qt6-base' 
  'qt6-graphs' 
  'pipewire-pulse' 
  'lilv'
  'libsndfile' 
  'zita-convolver' 
  'libebur128' 
  'rnnoise' 
  'soundtouch' 
  'libbs2b' 
  'nlohmann-json' 
  'tbb' 
  'speexdsp'
  'gsl'
  'webrtc-audio-processing'
  'libmysofa'
)
makedepends=('cmake' 'extra-cmake-modules' 'git' 'ninja' 'intltool' 'appstream' 'ladspa')
optdepends=('calf: exciter, bass enhancer and others'
            'lsp-plugins-lv2: limiter, equalizer, compressor, loudness and others'
            'zam-plugins-lv2: maximizer'
            'mda.lv2: bass loudness'
            'x42-plugins-lv2: autotune'
            'libdeep_filter_ladspa: deep noise remover'
            'breeze: kde breeze style')
conflicts=("${pkgname%%-git}")
provides=("${pkgname%%-git}")
source=("$pkgname::git+${url}")
# source=("$pkgname::git+${url}#branch=eeqt")
sha512sums=('SKIP')

pkgver() {
  cd "$pkgname"
  printf "%s" "$(git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')"
}

build() {
  local cmake_options=(
    -B build
    -S $pkgname
    -W no-dev
    -D CMAKE_BUILD_TYPE=None
    -D CMAKE_INSTALL_PREFIX=/usr
    -G Ninja
  )
  cmake "${cmake_options[@]}"
  cmake --build build
}

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