Name libsoxr
Description The SoX Resampler library that aims to give fast and high quality results for any constant resampling ratio
Version 0.1.3-4
Package Base libsoxr
Homepage https://sourceforge.net/p/soxr/wiki/Home/
Maintainers ['Maxime Gauduin <alucryd@archlinux.org>', 'T.J. Townsend <blakkheim@archlinux.org>']
Contributors ['Anatol Pomozov', 'JSpaces <jspace@unseen.is>', 'Triode <triode1@btinternet.com>']
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/libsoxr
Sources ['https://downloads.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz']
Dependencies ['gcc-libs']
Optional-Dependencies []
Build-Dependencies ['cmake', 'ninja']
Provides []
Builddate 12-07-2024 23:18:42
Architecture x86_64
Distro-Version
Licenses ['GPL']
Hash 6428ae79d1a8fcd4b282c7bd7139fbc412018b865f671d435eb5786b211f1f6d
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Anatol Pomozov
# Contributor: JSpaces <jspace@unseen.is>
# Contributor: Triode <triode1@btinternet.com>

pkgname=libsoxr
pkgver=0.1.3
pkgrel=4
pkgdesc='The SoX Resampler library that aims to give fast and high quality results for any constant resampling ratio'
arch=(x86_64)
url=https://sourceforge.net/p/soxr/wiki/Home/
license=(GPL)
depends=(gcc-libs)
makedepends=(
  cmake
  ninja
)
source=(https://downloads.sourceforge.net/project/soxr/soxr-$pkgver-Source.tar.xz)
b2sums=('5b7078f71404b9ef83917dcabc0c99cf17fd625d3e033d1b934382a7b60e55e359931a6ab53f8adaf955c0d811d6cbf231cd6a226549560b3506a3867e845607')

build() {
  cmake -S soxr-${pkgver}-Source -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_EXAMPLES=OFF \
    -DBUILD_SHARED_LIBS=ON \
    -DWITH_AVFFT=ON \
    -DWITH_LSR_BINDINGS=ON \
    -DWITH_OPENMP=ON \
    -DWITH_PFFFT=ON \
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5
    cmake --build build
}

check() {
  ctest --test-dir build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
  rm -rf "${pkgdir}"/usr/share/doc
  install -Dm 644 soxr-${pkgver}-Source/LICENCE -t "${pkgdir}"/usr/share/licenses/libsoxr/
}

# vim: ts=2 sw=2 et: