# Maintainer: PktSurf <smlinux@pktsurf.in>
app=soxr
version=0.1.3
build=2sml
homepage="https://github.com/chirlu/soxr"
download="https://github.com/chirlu/soxr/archive/refs/tags/$version.tar.gz"
desc="Audio library that outputs fast and high quality results for resampling ratio"
requires="gcc-libs"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version-Source

  tar xf $srcdir/$app-$version-Source.tar.?z*
  cd $app-$version-Source
  fixbuilddirpermissions
}

build() {
  mkdir -p smbuild && cd smbuild
  cmake .. \
   -DCMAKE_BUILD_TYPE=Release \
   -DCMAKE_INSTALL_PREFIX= \
   -DBUILD_EXAMPLES='OFF' \
   -DBUILD_TESTS='OFF' \
   -DDOC_INSTALL_DIR="/share/doc/$app-$version" \
   -DBUILD_SHARED_LIBS='ON' \
   -DWITH_AVFFT='ON' \
   -DWITH_LSR_BINDINGS='ON' \
   -DWITH_OPENMP='ON' \
   -DWITH_PFFFT='ON' 

  make
  make install DESTDIR=$pkg

  mkfinalpkg
}

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