# SliTaz package receipt.

PACKED_SIZE="216.0K"
UNPACKED_SIZE="644.0K"
PACKAGE="vte"
VERSION="0.28.2" # Also --> python-vte
CATEGORY="utilities"
SHORT_DESC="Terminal capabilities for GTK+ widgets."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://www.gnome.org/"
WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION%.*}/$TARBALL"
HOST_ARCH="i486 arm"

DEPENDS="gtk+ ncurses xorg-libXdamage"
BUILD_DEPENDS="gtk+-dev ncurses-dev"

# Handle cross compilation.
case "$ARCH" in
	i?86) 
		BUILD_DEPENDS="pygtk-dev python-dev gobject-introspection-dev
		perl perl-xml-parser ncurses-dev"
		ARCH_ARGS="--enable-introspection=yes" ;;
	arm) 
		ARCH_ARGS="--enable-introspection=no" ;;
esac

# Rules to configure and make the package.
compile_rules()
{
	patch -p1 -i $stuff/AltKey.patch
	./configure \
		--libexecdir=/usr/lib/vte \
		--with-html-dir=/usr/share/doc \
		--with-pcre \
		--disable-static \
		$CONFIGURE_ARGS &&
	make && make install
	# add 'Home' and 'End' keys
	#sed -i '9i\ \ \ \ :kh=\\E[H:@7=\\E[F:\\' $install/usr/share/vte/termcap-0.0/xterm
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib $fs/usr/share
	cp -a $install/usr/lib/*.so* $fs/usr/lib
	cp -a $install/usr/lib/vte $fs/usr/lib
	cp -a $install/usr/share/vte $fs/usr/share
}
