bbde7f4a26bb24a90ef338b704b59434d8a7e582
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / webkit / webkit.mk
1 ################################################################################
2 #
3 # webkit
4 #
5 ################################################################################
6
7 WEBKIT_VERSION = 1.11.5
8 WEBKIT_SITE = http://www.webkitgtk.org/releases
9 WEBKIT_SOURCE = webkitgtk-$(WEBKIT_VERSION).tar.xz
10 WEBKIT_INSTALL_STAGING = YES
11 WEBKIT_DEPENDENCIES = host-ruby host-flex host-bison host-gperf enchant harfbuzz \
12         icu jpeg libcurl libgail libsecret libsoup libxml2 libxslt libgtk2 sqlite webp
13
14 WEBKIT_DEPENDENCIES += \
15         $(if $(BR_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite) \
16         $(if $(BR_PACKAGE_XLIB_LIBXDAMAGE),xlib_libXdamage)
17
18 # webkit-disable-tests.patch changes configure.ac therefore autoreconf required
19 WEBKIT_AUTORECONF = YES
20 WEBKIT_AUTORECONF_OPTS = -I $(@D)/Source/autotools
21
22 # parallel make install deadlocks with make 3.81
23 WEBKIT_INSTALL_STAGING_OPTS = -j1 DESTDIR=$(STAGING_DIR) install
24 WEBKIT_INSTALL_TARGET_OPTS = -j1 DESTDIR=$(TARGET_DIR) install
25
26 # Does not build and it's disabled by default
27 # in newer releases
28 define DISABLE_INDEXED_DATABASE
29         $(SED) '/ENABLE_INDEXED_DATABASE/s:1:0:' \
30                 $(@D)/Source/WebCore/GNUmakefile.features.am
31 endef
32
33 WEBKIT_PRE_CONFIGURE_HOOKS += DISABLE_INDEXED_DATABASE
34
35 # Give explicit path to icu-config, and silence gazillions of warnings
36 # with recent gcc versions.
37 WEBKIT_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config \
38         CFLAGS="$(TARGET_CFLAGS) -Wno-cast-align -Wno-sign-compare" \
39         CXXFLAGS="$(TARGET_CXXFLAGS) -Wno-cast-align -Wno-sign-compare" \
40         AR_FLAGS="cru"
41
42 WEBKIT_CONF_OPTS += \
43         --enable-dependency-tracking \
44         --with-gtk=2.0 \
45         --disable-geolocation \
46         --disable-webkit2 \
47         --disable-glibtest \
48         --disable-video \
49         --disable-tests
50
51 # Xorg Dependencies
52 WEBKIT_CONF_OPTS += --with-target=x11
53 WEBKIT_DEPENDENCIES += xlib_libXt
54
55 ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yy)
56 WEBKIT_CONF_OPTS += --enable-gles2
57 WEBKIT_DEPENDENCIES += libegl libgles
58 else
59 WEBKIT_CONF_OPTS += --disable-gles2
60 endif
61
62 # gles/egl support is prefered over opengl by webkit configure
63 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
64 WEBKIT_CONF_OPTS += --with-acceleration-backend=opengl
65 WEBKIT_DEPENDENCIES += libgl
66 else
67 # OpenGL/glx is auto-detected due to the presence of gl.h/glx.h, which is not
68 # enough, so disable glx and the use of the OpenGL acceleration backend here
69 WEBKIT_CONF_OPTS += --disable-glx --with-acceleration-backend=none
70 endif
71
72 $(eval $(autotools-package))