# Description: Graph based image processing framework
# URL: https://gegl.org/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: babl gexiv2 json-glib librsvg poppler-glib graphviz
# Optional: asciidoc ffmpeg4 gtk-doc jasper lcms2 ruby libsdl2 libspiro libwebp umfpack v4l-utils vala lensfun libopenraw libumfpack luajit openexr

name=gegl
version=0.4.46
release=1
source=(https://download.gimp.org/pub/$name/${version%.*}/$name-$version.tar.xz)

build() {
  prt-get isinst ffmpeg && export PKG_CONFIG_PATH='/usr/lib/ffmpeg4/pkgconfig'
  prt-get isinst vala || PKGMK_GEGL+=' -D vapigen=disabled'

  meson setup build $name-$version $PKGMK_GEGL \
    --prefix=/usr \
    --buildtype=plain \
    --wrap-mode nodownload \
    -D b_lto=true \
    -D b_pie=true
  meson compile -C build -j ${JOBS:-1}
  DESTDIR=$PKG meson install -C build

  rm -r $PKG/usr/share/locale
}
