fs/ubifs: work around fakeroot / sed -i issue on systems with SELinux enabled
[buildroot-gz.git] / package / qt5 / qt5webkit / qt5webkit.mk
blob378cdf78573e21ef7d6542c10565286edd801f4b
1 ################################################################################
3 # qt5webkit
5 ################################################################################
7 QT5WEBKIT_VERSION = b35917bcb44d7f200af0f4ac68a126fa0aa8d93d
8 # Using GitHub since it supports downloading tarballs from random commits.
9 # The http://code.qt.io/cgit/qt/qtwebkit.git/ repo doesn't allow to do so.
10 QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION))
11 QT5WEBKIT_DEPENDENCIES = \
12 host-bison host-flex host-gperf host-python host-ruby \
13 qt5base sqlite
14 QT5WEBKIT_INSTALL_STAGING = YES
16 QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1
18 ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
19 QT5WEBKIT_LICENSE = LGPLv2.1+, BSD-3c, BSD-2c
20 # Source files contain references to LGPL_EXCEPTION.txt but it is not included
21 # in the archive.
22 QT5WEBKIT_LICENSE_FILES += LICENSE.LGPLv21
23 else
24 QT5WEBKIT_LICENSE = LGPLv2.1+ (WebCore), Commercial license
25 QT5WEBKIT_REDISTRIBUTE = NO
26 endif
28 ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
29 QT5WEBKIT_DEPENDENCIES += xlib_libXext xlib_libXrender
30 endif
32 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
33 QT5WEBKIT_DEPENDENCIES += qt5declarative
34 endif
36 # QtWebkit's build system uses python, but only supports python2. We work
37 # around this by forcing python2 early in the PATH, via a python->python2
38 # symlink.
39 QT5WEBKIT_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
40 define QT5WEBKIT_PYTHON2_SYMLINK
41 mkdir -p $(@D)/host-bin
42 ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/host-bin/python
43 endef
44 QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
46 # Since we get the source from git, generated header files are not included.
47 # qmake detects that header file generation (using the syncqt tool) must be
48 # done based on the existence of a .git directory (cfr. the git_build config
49 # option which is set in qt_build_paths.prf).
50 # So, to make sure that qmake detects that header files must be generated,
51 # create an empty .git directory.
52 define QT5WEBKIT_CONFIGURE_CMDS
53 mkdir -p $(@D)/.git
54 (cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(HOST_DIR)/usr/bin/qmake)
55 endef
57 define QT5WEBKIT_BUILD_CMDS
58 $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D)
59 endef
61 define QT5WEBKIT_INSTALL_STAGING_CMDS
62 $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D) install
63 $(QT5_LA_PRL_FILES_FIXUP)
64 endef
66 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
67 define QT5WEBKIT_INSTALL_TARGET_QMLS
68 cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/
69 endef
70 endif
72 define QT5WEBKIT_INSTALL_TARGET_CMDS
73 cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib
74 cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/
75 $(QT5WEBKIT_INSTALL_TARGET_QMLS)
76 endef
78 $(eval $(generic-package))