# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=soundtouch
pkgver=2.3.3
pkgrel=0
pkgdesc="Audio Processing library for changing Tempo, Pitch and Playback Rates"
url="http://www.surina.net/soundtouch/"
arch="all"
license="LGPL-2.0-or-later"
makedepends="cmake samurai"
subpackages="$pkgname-dev"
source="https://www.surina.net/soundtouch/soundtouch-$pkgver.tar.gz
	no-fast.patch
	"
builddir="$srcdir/$pkgname"
options="!check" # no tests

# secfixes:
#   2.1.2-r0:
#     - CVE-2018-17096
#     - CVE-2018-17097
#     - CVE-2018-17098

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=ON \
		-DOPENMP=ON \
		-DNEON=OFF
	cmake --build build
}

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

sha512sums="
9cc507e15be065fe404e3f9ac71cdc596474c4a86b04a4b969c6c3ed4aff865cdf6aee24929046818a7d3791f005778aea112d74ef4d8f60b05460755a08dbe3  soundtouch-2.3.3.tar.gz
a2aa7ce31d2625a61b4b13aa5ddc3da68b949a8a41fb655b0324f188cc72b75080f85ffeed93ceab3d6b3f652c4df0e99ea1ef12bc7aec57528a2299a689fd7e  no-fast.patch
"
