APP=soxr
VERSION=0.1.3
BUILD=1sml
HOMEPAGE="https://github.com/chirlu/soxr"
DOWNLOAD="https://github.com/chirlu/soxr/archive/refs/tags/0.1.3.tar.gz"
DESC="audio library that outputs fast and high quality results for resampling ratio"
REQUIRES="gcc-libs"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION-Source

  tar xf $SRCDIR/$APP-$VERSION-Source.tar.?z*
  cd $APP-$VERSION-Source
  fixbuilddirpermissions

  mkdir -p smbuild && cd smbuild
  cmake .. \
   -DCMAKE_BUILD_TYPE=Release \
   -DCMAKE_INSTALL_PREFIX="" \
   -DBUILD_EXAMPLES='OFF' \
   -DBUILD_SHARED_LIBS='ON' \
   -DWITH_AVFFT='ON' \
   -DWITH_LSR_BINDINGS='ON' \
   -DWITH_OPENMP='ON' \
   -DWITH_PFFFT='ON' 

  make
  make install DESTDIR=$PKG

  cp ../COPYING* ../LICENCE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
afd8e9f2a9be8ead553640c713bfa6daaf88ee3c393d1cf30a4c20ed09b92e5c80869abd152370075d30c7f38c5cdeab322c758c43f1f19ffdd78a58e3e0fa6a  soxr-0.1.3-Source.tar.lz
"
