# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=libvips
pkgver=8.15.1
pkgrel=5
pkgdesc="A fast image processing library with low memory needs"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=('LGPL')
url="https://libvips.github.io/libvips/"
depends=('cfitsio' 'fftw' 'libexif' 'libarchive' 'libimagequant' 'librsvg' 'libwebp' 'openexr'
         'highway' 'pango' 'libcgif' 'python' 'cairo')
makedepends=('gobject-introspection' 'libheif' 'libjxl' 'imagemagick' 'openslide'
             'poppler-glib' 'meson' 'gtk-doc')
optdepends=('libheif: for heif module'
            'imagemagick: for magick module'
            'openslide: for openslide module'
            'poppler-glib: for poppler module'
            'libjxl: for jxl module')
source=("https://github.com/libvips/libvips/releases/download/v$pkgver/vips-$pkgver.tar.xz")
sha512sums=('41f81c3bcb49e570c548d47494b0b705c5dbf870e16d67a85098a00c3f198a6f04e43899d97f92efe9bfdd5cedde79f51cc112c6953574748e1905d91d083dfa')

build() {
  meson build vips-$pkgver \
    --prefix=/usr \
    -Dgtk_doc=true
  meson compile -C build
}

package() {
  meson install -C build --destdir="$pkgdir"
}
