gtk+: add gir pkg option and disable it in cross builds.

This commit is contained in:
Juan RP 2013-05-06 16:40:26 +02:00
parent c212556f4f
commit 8773634820

View file

@ -1,7 +1,7 @@
# Template build file for 'gtk+'.
pkgname=gtk+
version=2.24.17
revision=3
revision=4
build_style=gnu-configure
configure_args="--enable-cups --with-xinput"
short_desc="The GTK+ toolkit (v2)"
@ -11,27 +11,55 @@ license="LGPL-2.1"
distfiles="${GNOME_SITE}/gtk+/2.24/gtk+-$version.tar.xz"
checksum=e947b2b460156d98e8e38930b82458e1d613a71eb26e927f966f7081a640f415
makedepends="pkg-config perl shared-mime-info glib-devel libXcursor-devel
hostmakedepends="pkg-config perl"
makedepends="shared-mime-info glib-devel libXcursor-devel
libXext-devel libXrender-devel libXinerama-devel libXi-devel libXrandr-devel
libXcomposite-devel libXdamage-devel fontconfig-devel
gdk-pixbuf-devel>=2.26.1_2 cairo-devel pango-devel>=1.28.0
atk-devel>=1.32.0 gobject-introspection cups-devel dbus-x11"
atk-devel>=1.32.0 cups-devel>=1.6.1_9 dbus-x11"
if [ "$CROSS_BUILD" ]; then
# XXX remove once there are -config wrappers.
hostmakedepends+=" automake libtool gtk-doc gettext-devel glib-devel
gtk-update-icon-cache gdk-pixbuf-devel cups-devel"
pre_configure() {
autoreconf -fi
}
fi
# 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
gtk+-devel_package() {
depends="glib-devel atk-devel cairo-devel gdk-pixbuf-devel pango-devel gtk+>=${version}"
short_desc="${short_desc} - development files"
depends="libglib-devel atk-devel cairo-devel gdk-pixbuf-devel pango-devel gtk+>=${version}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/gtk-2.0/include
vmove usr/share/gir-1.0
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
vmove usr/share/gtk-doc
vmove usr/share/aclocal
}
}
gtk+-demo_package() {
short_desc="${short_desc} - demonstration application"
short_desc+=" - demonstration application"
pkg_install() {
vmove usr/bin/gtk-demo
vmove usr/share/gtk-2.0
@ -39,7 +67,7 @@ gtk+-demo_package() {
}
gtk-update-icon-cache_package() {
short_desc="${short_desc} - The GTK+ update icon cache tool"
short_desc+=" - The GTK+ update icon cache tool"
replaces="gtk+<=2.24.8_3 gtk+3<=3.2.2"
depends="gdk-pixbuf>=2.26.1_2" # libpng-1.5
pkg_install() {
@ -54,7 +82,6 @@ gtk+_package() {
conf_files="/etc/gtk-2.0/im-multipress.conf"
triggers="gtk-immodules"
pkg_install() {
vmove etc
vmove usr
vmove all
}
}