# Description: Python bindings for GLib/GObject/GIO/GTK+/GStreamer
# URL: https://wiki.gnome.org/Projects/PyGObject
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: gobject-introspection python3-cairo

name=python3-gobject
version=3.48.2
release=1
source=(https://ftp.gnome.org/pub/GNOME/sources/pygobject/${version::4}/pygobject-$version.tar.xz)

build() {
	meson setup pygobject-$version build \
		--prefix=/usr \
		--buildtype=plain \
		--wrap-mode nodownload \
		-D b_lto=true \
		-D b_pie=true \
		-D python=/usr/bin/python3

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

	/usr/bin/python3 -m compileall -d /usr/lib $PKG/usr/lib
	/usr/bin/python3 -O -m compileall -d /usr/lib $PKG/usr/lib
}
