42 lines
986 B
Text
42 lines
986 B
Text
# Maintainer: psykose <alice@ayaya.dev>
|
|
pkgname=rapidfuzz
|
|
pkgver=1.10.4
|
|
pkgrel=0
|
|
pkgdesc="Rapid fuzzy string matching in C++ using the Levenshtein Distance"
|
|
url="https://github.com/maxbachmann/rapidfuzz-cpp"
|
|
arch="all"
|
|
license="MIT"
|
|
makedepends="
|
|
cmake
|
|
samurai
|
|
"
|
|
checkdepends="catch2-3"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v$pkgver.tar.gz"
|
|
builddir="$srcdir/rapidfuzz-cpp-$pkgver"
|
|
|
|
case "$CARCH" in
|
|
x86)
|
|
# float rounding
|
|
options="!check"
|
|
;;
|
|
esac
|
|
|
|
build() {
|
|
cmake -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DRAPIDFUZZ_BUILD_TESTING="$(want_check && echo ON || echo OFF)"
|
|
cmake --build build
|
|
}
|
|
|
|
check() {
|
|
ctest --test-dir build --output-on-failure
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
sha512sums="
|
|
11dfd3b5f869eaf11edcb2c075709416645c89ab6057dbcaf12eb5defd609c33e792265b131942f22e3e2661f8c00a653e23a83eb2ba4bd8c82a7d16960d3b3b rapidfuzz-1.10.4.tar.gz
|
|
"
|