# Maintainer: Carl Smedstad # Contributor: Luis Martinez # Contributor: Caltlgin Stsodaat # Contributor: Sandy Carter pkgname=fuzzylite pkgver=6.0 pkgrel=5 pkgdesc="C++ fuzzy logic control library" arch=(x86_64 i686 aarch64) url="https://github.com/fuzzylite/fuzzylite" license=(GPL3) depends=( gcc-libs glibc ) makedepends=(cmake) provides=('libfuzzylite.so') changelog=CHANGELOG source=( "$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz" "remove-werror.patch" "fix-catch-glibc-compatibility.patch" ) sha256sums=( '7e9f56deb9baf063de2232bfd8285f57ddccb651dae842fe3f587d0ac65ecdb0' '397f8888000225c4ee2b4a1b639c04dc59979e041dd3b8a6e7f65344f68d5b3b' '02474d9d973f65338d95d00b72cf7370b00c8e5c1c3cb42f63d844d967e267a7' ) _archive="$pkgname-$pkgver" prepare() { cd "$_archive" patch --forward --strip=1 --input="$srcdir/remove-werror.patch" patch --forward --strip=1 --input="$srcdir/fix-catch-glibc-compatibility.patch" } build() { cd "$_archive" cmake \ -B build \ -S "$pkgname" \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DFL_BUILD_STATIC=OFF \ -DFL_BUILD_TESTS=ON \ -Wno-dev cmake --build build } check() { cd "$_archive/build/bin" ./fuzzylite-tests } package() { cd "$_archive" DESTDIR="$pkgdir" cmake --install build install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" install -Dm644 "$pkgname/$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1" }