# Description: An image loading library for GTK+
# URL: https://wiki.gnome.org/Projects/GdkPixbuf
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: gobject-introspection libpng libtiff shared-mime-info

name=gdk-pixbuf
version=2.42.10
release=1
source=(https://download.gnome.org/sources/$name/${version:0:4}/$name-$version.tar.xz
	gdk-pixbuf.loaders gdk-pixbuf-register.sh)

build() {
	meson setup build $name-$version \
		--prefix=/usr \
		--buildtype=plain \
		--wrap-mode nodownload \
		-D b_lto=true \
		-D b_pie=true \
		-D installed_tests=false \
		-D man=false

	meson compile -C build -j ${JOBS:-1}
	DESTDIR=$PKG meson install  -C build

	install -m 644 $SRC/gdk-pixbuf.loaders \
		$PKG/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
	install -m 755 $SRC/gdk-pixbuf-register.sh \
		$PKG/usr/bin/gdk-pixbuf-register
	rm -r $PKG/usr/share/locale
}
