#############################################################
#
# webkit
#
#############################################################
WEBKIT_VERSION = r38860
WEBKIT_SOURCE = WebKit-$(WEBKIT_VERSION).tar.bz2
WEBKIT_SITE = http://nightly.webkit.org/files/trunk/src/
WEBKIT_INSTALL_STAGING = YES
WEBKIT_INSTALL_TARGET = YES
WEBKIT_AUTORECONF = YES
WEBKIT_CONF_ENV = ac_cv_path_GLIB_GENMARSHAL=$(HOST_GLIB)/bin/glib-genmarshal \
		ac_cv_path_GLIB_MKENUMS=$(HOST_GLIB)/bin/glib-mkenums \
		LIBXSLT_CFLAGS=-I$(STAGING_DIR)/usr/include/

WEBKIT_DEPENDENCIES_EXTRA =

ifneq ($(BR2_PACKAGE_XSERVER_none),y)
	WEBKIT_DEPENDENCIES_EXTRA += xserver_xorg-server
else
	WEBKIT_CONF_OPT += --with-target=directfb
endif

ifeq ($(BR2_PACKAGE_ICU),y)
	WEBKIT_DEPENDENCIES_EXTRA += icu
	WEBKIT_CONF_OPT += --with-unicode-backend=icu
else
	WEBKIT_CONF_OPT += --with-unicode-backend=glib
endif

WEBKIT_DEPENDENCIES = curl libxml2 libxslt $(WEBKIT_DEPENDENCIES_EXTRA) libgtk2 sqlite libidn

$(eval $(call AUTOTARGETS,package,webkit))

$(WEBKIT_HOOK_POST_INSTALL):
	cp -f $(WEBKIT_DIR)/Programs/GtkLauncher $(ROOTFS)/usr/bin/
	touch $@
