mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 03:35:38 +03:00
this does not download deps that won't be used for the default build target (the ctarget we are building for implicitly). this makes quite a few fetches faster.. because a ton of crates download a 10mb "windows-sys" that is never used, amongst other things. maybe breaks a thing or two.
58 lines
1.3 KiB
Text
58 lines
1.3 KiB
Text
# Contributor: TBK <alpine@jjtc.eu>
|
|
# Maintainer: TBK <alpine@jjtc.eu>
|
|
pkgname=libimagequant
|
|
pkgver=4.1.0
|
|
pkgrel=0
|
|
pkgdesc="Rust library for high-quality conversion of RGBA images to 8-bit indexed-color (palette) images"
|
|
url="https://pngquant.org/lib/"
|
|
arch="all !s390x !riscv64" # rust
|
|
license="GPL-3.0-or-later"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
makedepends="cargo 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 cbuild --release \
|
|
--frozen \
|
|
--prefix /usr \
|
|
--library-type cdylib
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen
|
|
}
|
|
|
|
package() {
|
|
cargo cinstall --release \
|
|
--frozen \
|
|
--prefix /usr \
|
|
--destdir "$pkgdir" \
|
|
--library-type cdylib
|
|
}
|
|
|
|
sha512sums="
|
|
16b6683b6e963b33fb8bc91f653a1129e44efd644c76cf88d1a85e59627c30b6135f550255d6883958aae49951961967af1b84c95b51fb9a2c2f1181c9ba3008 libimagequant-4.1.0.tar.gz
|
|
44adca243b16ab11ab678c84dd9423e13589b49dba508af447d2ae86ae18a9c0e954e63cd0eb40ebffd68e7830643e4394e0c1347245d011a5f508f128727b13 Cargo.lock
|
|
"
|