# Template file for 'anjuta'
pkgname=anjuta
version=3.10.0
revision=2
build_style=gnu-configure
short_desc="GNOME Integrated Development Environment"
maintainer="davehome <davehome@redthumb.info.tm>"
license="GPL-2"
homepage="https://projects.gnome.org/anjuta"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=72c8569fcd629f3ed1f248cfd452e1f0b473e890421679bd5bb4d6ab2ce3fedb

hostmakedepends="pkg-config intltool flex itstool python autogen"
makedepends="
 gtksourceview-devel>=3.10 libxml2-devel vte3-devel gjs-devel>=1.38
 libxslt-devel glade3-devel>=3.16 graphviz-devel vala-devel>=0.22 gdl-devel>=3.10
 libgda-devel devhelp-devel>=3.10 sqlite-devel apr-util-devel
 neon-devel subversion-devel python-devel"
depends="autogen"

# 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

anjuta-devel_package() {
	short_desc+=" - development files"
	depends="anjuta>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		if [ "$build_option_gir" ]; then
			vmove usr/share/gir-1.0
		fi
		vmove "usr/lib/*.so"
	}
}

anjuta-docs_package() {
	short_desc+=" - Documentation"
	noarch=yes
	pkg_install() {
		vmove usr/share/doc
		vmove usr/share/gtk-doc
	}
}
