# Description: Small, efficient and fast rendering engine for Web Browsers.
# URL: http://www.webkitgtk.org/
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
# Packager: Brett Goulder, predatorfreak at dcaf-security dot org
# Depends on: enchant gst-plugins-base gtk icu libsoup mesa3d
# Nice to have: geoclue

name=webkit
version=1.8.3
release=1
source=(http://webkitgtk.org/releases/$name-$version.tar.xz
	gtkdoc-rebase-remove.patch
	webkit-bison26.patch)

build() {
	cd $name-$version

	patch -p1 -i $SRC/gtkdoc-rebase-remove.patch
	patch -p1 -i $SRC/webkit-bison26.patch

	if [ -z "$(pkginfo -i | grep '^geoclue ')" ]; then
		local config='--disable-geolocation'
	fi

	./configure $config \
		--prefix=/usr \
		--enable-video \
		--with-font-backend=freetype \
		--disable-gtk-doc \
		--enable-jit \
		--with-unicode-backend=icu \
		--with-gtk=2.0

	make -j 1
	make DESTDIR=$PKG install

	rm -r \
		$PKG/usr/share/locale \
		$PKG/usr/share/gtk-doc
}
