# Template build file for 'pango'.
pkgname=pango
version=1.36.3
revision=1
build_style=gnu-configure
configure_args="--with-included-modules=basic-fc"
hostmakedepends="libtool pkg-config glib-devel"
# XXX Add missing dependency libthai.
makedepends="libglib-devel>=2.38 cairo-devel libXft-devel harfbuzz-devel>=0.9.9"
depends="libharfbuzz>=0.9.9 fontconfig>=2.10.91"
triggers="pango-modules"
short_desc="Library for layout and rendering of text"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.pango.org/"
license="LGPL-2.1"
distfiles="${GNOME_SITE}/pango/1.36/${pkgname}-${version}.tar.xz"
checksum=ad48e32917f94aa9d507486d44366e59355fcfd46ef86d119ddcba566ada5d22

# Package build options
build_options="gir"
desc_option_gir="Enable support for building gobject introspection data"

# Disable gir for cross builds.
if [ -z "$CROSS_BUILD" ]; then
	build_options_default="gir"
fi

if [ "$build_option_gir" ]; then
	configure_args+=" --enable-introspection"
	makedepends+=" gobject-introspection"
else
	configure_args+=" --disable-introspection"
fi

pre_configure() {
	libtoolize -f
}

pango-devel_package() {
	depends="libglib-devel>=2.38 cairo-devel fontconfig-devel freetype-devel
		libXft-devel harfbuzz-devel pango>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		if [ "$build_option_gir" ]; then
			vmove "usr/share/gir-*"
		fi
		vmove usr/share/gtk-doc
	}
}
