# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Daniel Löbl <dloebl.2000@gmail.com>

pkgname=libcgif
pkgver=0.4.1
pkgrel=1
pkgdesc='A fast and lightweight GIF encoding library'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/dloebl/cgif"
license=('MIT')
depends=('glibc')
makedepends=('meson')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('8666f9c5f8123d1c22137a6dd714502a330377fb74e2007621926fe4258529d5')

build() {
	meson build "cgif-${pkgver}" --prefix=/usr
	meson compile -C build
}

check() {
	meson test -C build
}

package() {
	meson install -C build --destdir "${pkgdir}"
	install -Dm 644 "cgif-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
