# Contributor: TBK # Maintainer: TBK pkgname=libimagequant pkgver=4.2.0 pkgrel=2 pkgdesc="Rust library for high-quality conversion of RGBA images to 8-bit indexed-color (palette) images" url="https://pngquant.org/lib/" arch="all" license="GPL-3.0-or-later" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends="cargo cargo-auditable cargo-c" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/ImageOptim/libimagequant/archive/$pkgver.tar.gz Cargo.lock " builddir="$srcdir/$pkgname-$pkgver/imagequant-sys" options="net" case "$CARCH" in x86) # tests fail options="$options !check" ;; *) ;; esac prepare() { default_prepare ln -sfv "$srcdir"/Cargo.lock ../Cargo.lock cargo fetch --target="$CTARGET" --locked } build() { cargo auditable cbuild --release \ --frozen \ --prefix /usr \ --library-type cdylib } check() { cargo test --frozen } package() { cargo auditable cinstall --release \ --frozen \ --prefix /usr \ --destdir "$pkgdir" \ --library-type cdylib } sha512sums=" 3b023368c33990f72926036b8aa890104630e3a51aef85d3ef0a938961e7bad30c0662c5230df42c612fb3013e08c8cabea0e0e10855f2920601cdc981fe4033 libimagequant-4.2.0.tar.gz 0005d2df7c7005d2b450d05d3686ee9385d2facf6a02dfce5a711747e8b739cc178f21fa872e8dffd3f7d9f8b6cbace055fa0a9bcd3fe0449df561e20b25a462 Cargo.lock "