# Template file for 'pygtk'
pkgname=pygtk
version=2.24.0
revision=12
lib32disabled=yes
build_style=gnu-configure
# XXX: missing python-numpy build dep
hostmakedepends="pkg-config python-gobject2-devel"
makedepends="python-devel gtk+-devel libxml2-devel libglade-devel
 python-gobject2-devel"
depends="python python-cairo python-gobject2"
pycompile_module="gtk-2.0/gtk"
short_desc="Python bindings for the GTK+ toolkit"
homepage="http://www.pygtk.org"
license="LGPL-2.1"
maintainer="Juan RP <xtraeme@gmail.com>"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.bz2"
checksum=cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912

do_configure() {
	if [ "$CROSS_BUILD" ]; then
		ln -s ${wrksrc}/.xbps/bin/python-config ${wrksrc}
	fi
	env PYTHON=python ./configure ${configure_args}
}
post_install() {
	vinstall gtk/gtk-extrafuncs.defs 644 usr/share/pygtk/2.0/defs
}

pygtk-devel_package() {
	lib32disabled=yes
	depends="python-devel gtk+-devel python-gobject2-devel python-cairo-devel
	 libglade-devel ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pycompile_module="demos"
	pkg_install() {
		vmove usr/include
		vmove usr/share
		vmove usr/bin
		vmove usr/lib/pkgconfig
		vmove usr/lib/pygtk
	}
}
