# Maintainer: jc_gargma # Maintainer (AUR): Luis Martinez # Contributor (AUR): Caltlgin Stsodaat # Contributor (AUR): Sandy Carter # # I maintain this because: # Arch lacks this package and vcmi relies on it # Aur version build fails with Werror pkgname=fuzzylite pkgver=6.0 pkgrel=7 pkgdesc="C++ fuzzy logic control library" arch=(x86_64 i686 aarch64) url="https://github.com/fuzzylite/fuzzylite" license=(GPL-3.0-only) depends=( gcc-libs glibc ) makedepends=(cmake) provides=('libfuzzylite.so') changelog=CHANGELOG source=( "$pkgname-$pkgver.tar.gz::https://github.com/fuzzylite/fuzzylite/archive/v$pkgver.tar.gz" "remove-werror.patch" "fix-catch-glibc-compatibility.patch" ) sha256sums=('7e9f56deb9baf063de2232bfd8285f57ddccb651dae842fe3f587d0ac65ecdb0' '397f8888000225c4ee2b4a1b639c04dc59979e041dd3b8a6e7f65344f68d5b3b' '02474d9d973f65338d95d00b72cf7370b00c8e5c1c3cb42f63d844d967e267a7') prepare() { cd "$pkgname-$pkgver" patch --forward --strip=1 --input="$srcdir/remove-werror.patch" patch --forward --strip=1 --input="$srcdir/fix-catch-glibc-compatibility.patch" sed -i '/BenchmarkTest.cpp/d' fuzzylite/FL_TESTS } build() { cd $pkgname-$pkgver cmake \ -B build \ -S "$pkgname" \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -Wno-dev \ -DFL_BUILD_STATIC=OFF \ -DFL_BUILD_TESTS=ON cmake --build build } check() { cd "$pkgname-$pkgver/build/bin" ./fuzzylite-tests } package() { cd "$pkgname-$pkgver" 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" }