kumquat-buildroot/package/qt5/qt5webkit/qt5webkit.mk

72 lines
2.2 KiB
Makefile
Raw Normal View History

################################################################################
#
# qt5webkit
#
################################################################################
qt5: bump latest version to 5.9.2 qt5base: - removed 0001-Fix-error-attribute-target-crc-is-unknown.patch (upstream committed, see [1]) - removed 0002-examples-fix-compile-without-opengl-support.patch (upstream committed, see [2]) qt5declarative: - removed 0001-Fix-alignment-issue-on-ARMv7.patch (upstream committed, see [3]) - moved 0001-examples-photoviewer-needs-widgets-support.patch to 5.6.2 only (upstream 5.9.2 committed, see [4]) - moved 0002-examples-qquickviewcomparison-and-quickwidget-needs-.patch to 5.6.2 only (similare patch upstream committed, see [5]) qt5location: - removed 0001-Fix-plugins-build-dependency.patch (upstream committed, see [6]) qt5webchannel: - fix webchannel.js installation to target (the locatinon of the file webchannel.js changed from src/webchannel/qwebchannel.js to examples/webchannel/shared/qwebchannel.js, see commit [7]) qt5webengine: - removed 0001-Always-compile-QWebEnginePage-print.patch (upstream committed, see [8]) - keep 0002-Load-libEGL-and-libGLES2-symbols-implicitly.patch (upstream committed, see [9], but reverted afterwards, see [10]) qt5webkit: - fall back to 5.9.1 (no 5.9.2 package provided, see [11] and [12]). [1] http://code.qt.io/cgit/qt/qtbase.git/commit/?id=b7722c251c3a0938c7c71fc3da47fdbe920060b7 [2] http://code.qt.io/cgit/qt/qtbase.git/commit/?id=6ce4b680cdde7827a6ed4d00dbeb7e7e91569433 [3] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=03c2661b1243cc529fc3d8cfa65073f1da420307 [4] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=452a78d0ac4a1579733a8ab641be24c9b7c0dd96 [5] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=fa52bb665d6beb77a951c14c8edcba3541850afc [6] http://code.qt.io/cgit/qt/qtlocation.git/commit/?id=3ac051c4549575634cecc706175b019f4ed4c3bf [7] https://code.qt.io/cgit/qt/qtwebchannel.git/commit/?id=e7f150abaa8e81d3e404e9631a49341a7f7623d1 [8] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=085c2c529473bbe9dd7c8c5698a45053520cc423 [9] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d4c621f6a6b87f2a86069fa393b9f7c4f9e7b9ad [10] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=c11c2c8981e647c1eb2c6753ce77d436b92fff87 [11] https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/#comment-1200724 [12] https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/#comment-1200746 Signed-off-by: Peter Seiderer <ps.report@gmx.net> Tested-by: Joshua Henderson <joshua.henderson@microchip.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-10-17 22:28:03 +02:00
# no 5.9.2 package available, fall back to 5.9.1 version
ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
QT5WEBKIT_VERSION = 5.9.1
QT5WEBKIT_SITE = https://download.qt.io/official_releases/qt/5.9/5.9.1/submodules
qt5: bump latest version to 5.9.2 qt5base: - removed 0001-Fix-error-attribute-target-crc-is-unknown.patch (upstream committed, see [1]) - removed 0002-examples-fix-compile-without-opengl-support.patch (upstream committed, see [2]) qt5declarative: - removed 0001-Fix-alignment-issue-on-ARMv7.patch (upstream committed, see [3]) - moved 0001-examples-photoviewer-needs-widgets-support.patch to 5.6.2 only (upstream 5.9.2 committed, see [4]) - moved 0002-examples-qquickviewcomparison-and-quickwidget-needs-.patch to 5.6.2 only (similare patch upstream committed, see [5]) qt5location: - removed 0001-Fix-plugins-build-dependency.patch (upstream committed, see [6]) qt5webchannel: - fix webchannel.js installation to target (the locatinon of the file webchannel.js changed from src/webchannel/qwebchannel.js to examples/webchannel/shared/qwebchannel.js, see commit [7]) qt5webengine: - removed 0001-Always-compile-QWebEnginePage-print.patch (upstream committed, see [8]) - keep 0002-Load-libEGL-and-libGLES2-symbols-implicitly.patch (upstream committed, see [9], but reverted afterwards, see [10]) qt5webkit: - fall back to 5.9.1 (no 5.9.2 package provided, see [11] and [12]). [1] http://code.qt.io/cgit/qt/qtbase.git/commit/?id=b7722c251c3a0938c7c71fc3da47fdbe920060b7 [2] http://code.qt.io/cgit/qt/qtbase.git/commit/?id=6ce4b680cdde7827a6ed4d00dbeb7e7e91569433 [3] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=03c2661b1243cc529fc3d8cfa65073f1da420307 [4] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=452a78d0ac4a1579733a8ab641be24c9b7c0dd96 [5] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=fa52bb665d6beb77a951c14c8edcba3541850afc [6] http://code.qt.io/cgit/qt/qtlocation.git/commit/?id=3ac051c4549575634cecc706175b019f4ed4c3bf [7] https://code.qt.io/cgit/qt/qtwebchannel.git/commit/?id=e7f150abaa8e81d3e404e9631a49341a7f7623d1 [8] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=085c2c529473bbe9dd7c8c5698a45053520cc423 [9] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d4c621f6a6b87f2a86069fa393b9f7c4f9e7b9ad [10] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=c11c2c8981e647c1eb2c6753ce77d436b92fff87 [11] https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/#comment-1200724 [12] https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/#comment-1200746 Signed-off-by: Peter Seiderer <ps.report@gmx.net> Tested-by: Joshua Henderson <joshua.henderson@microchip.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-10-17 22:28:03 +02:00
else
QT5WEBKIT_VERSION = $(QT5_VERSION)
QT5WEBKIT_SITE = https://download.qt.io/community_releases/5.6/$(QT5_VERSION)
qt5: bump latest version to 5.9.2 qt5base: - removed 0001-Fix-error-attribute-target-crc-is-unknown.patch (upstream committed, see [1]) - removed 0002-examples-fix-compile-without-opengl-support.patch (upstream committed, see [2]) qt5declarative: - removed 0001-Fix-alignment-issue-on-ARMv7.patch (upstream committed, see [3]) - moved 0001-examples-photoviewer-needs-widgets-support.patch to 5.6.2 only (upstream 5.9.2 committed, see [4]) - moved 0002-examples-qquickviewcomparison-and-quickwidget-needs-.patch to 5.6.2 only (similare patch upstream committed, see [5]) qt5location: - removed 0001-Fix-plugins-build-dependency.patch (upstream committed, see [6]) qt5webchannel: - fix webchannel.js installation to target (the locatinon of the file webchannel.js changed from src/webchannel/qwebchannel.js to examples/webchannel/shared/qwebchannel.js, see commit [7]) qt5webengine: - removed 0001-Always-compile-QWebEnginePage-print.patch (upstream committed, see [8]) - keep 0002-Load-libEGL-and-libGLES2-symbols-implicitly.patch (upstream committed, see [9], but reverted afterwards, see [10]) qt5webkit: - fall back to 5.9.1 (no 5.9.2 package provided, see [11] and [12]). [1] http://code.qt.io/cgit/qt/qtbase.git/commit/?id=b7722c251c3a0938c7c71fc3da47fdbe920060b7 [2] http://code.qt.io/cgit/qt/qtbase.git/commit/?id=6ce4b680cdde7827a6ed4d00dbeb7e7e91569433 [3] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=03c2661b1243cc529fc3d8cfa65073f1da420307 [4] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=452a78d0ac4a1579733a8ab641be24c9b7c0dd96 [5] http://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=fa52bb665d6beb77a951c14c8edcba3541850afc [6] http://code.qt.io/cgit/qt/qtlocation.git/commit/?id=3ac051c4549575634cecc706175b019f4ed4c3bf [7] https://code.qt.io/cgit/qt/qtwebchannel.git/commit/?id=e7f150abaa8e81d3e404e9631a49341a7f7623d1 [8] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=085c2c529473bbe9dd7c8c5698a45053520cc423 [9] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d4c621f6a6b87f2a86069fa393b9f7c4f9e7b9ad [10] http://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=c11c2c8981e647c1eb2c6753ce77d436b92fff87 [11] https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/#comment-1200724 [12] https://blog.qt.io/blog/2017/10/06/qt-5-9-2-released/#comment-1200746 Signed-off-by: Peter Seiderer <ps.report@gmx.net> Tested-by: Joshua Henderson <joshua.henderson@microchip.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-10-17 22:28:03 +02:00
endif
QT5WEBKIT_SOURCE = qtwebkit-opensource-src-$(QT5WEBKIT_VERSION).tar.xz
QT5WEBKIT_DEPENDENCIES = \
host-bison host-flex host-gperf host-python host-ruby \
qt5webkit: select leveldb package and memenv This patch fixes the build issue reported by autobuilder [0]. /home/naourr/work/instance-2/output/build/qt5webkit-5.9.1/Source/WebCore//.obj/platform/leveldb/LevelDBDatabase.o: In function `WebCore::LevelDBDatabase::openInMemory(WebCore::LevelDBComparator const*)': LevelDBDatabase.cpp.text._ZN7WebCore15LevelDBDatabase12openInMemoryEPKNS_17LevelDBComparatorE+0x34): undefined reference to `leveldb::NewMemEnv(leveldb::Env*)' collect2: error: ld returned 1 exit status make[3]: *** [Makefile.api:97: ../lib/libQt5WebKit.so.5.9.1] Error 1 The issue happens when both packages leveldb and qt5webkit are enabled. QtWebKit builds its own copy of leveldb [1] (as a third-party) if the system does not provided it (i.e. buildroot). It builds it differently and this is the origin of that issue. Instead of using the Makefile provided by leveldb [2], QtWebKit uses qmake to build that library [3]. The missing symbol issue happens because the symbol leveldb::NewMemEnv is bundled in the static library libmemenv.a (aside libleveldb.so). This static library consists of this single symbol which is like an extra that is built but *NOT* shipped by default at installation in the staging directory. Unfortunatly, that symbol is required later by WebCore [4]. The copy built by QtWebKit is an all-in-one library including both libleveldb and libmemenv; thus QtWebKit links against libleveldb only. Also, the linker finds the buildroot's copy first (not the third-party): that explains why it is complaining about a missing symbol. That copy does not have the symbol leveldb::NewMemEnv. Fortunatly, QtWebKit provides a facility to link against the system leveldb package. The qmake flag WEBKIT_CONFIG+=use_system_leveldb tells Qt5WebKit to link against libleveldb *AND* libmemenv [5]. To fix that issue, this commit selects the package leveldb that now installs the libmemenv static library and its header. It ensures that QtWebKit has everything it needs to be built. It also sets the appropriate qmake configure flags to tell QtWebKit to use the leveldb copy built by buildroot instead of the bundled one. [0]: http://autobuild.buildroot.net/results/46033e82adf592c3b92c6d50cfaf45bd58beeaa4 [1]: https://github.com/qt/qtwebkit/tree/5.9/Source/ThirdParty/leveldb [2]: https://github.com/qt/qtwebkit/blob/5.9/Source/ThirdParty/leveldb/Makefile#L167-L169 [3]: https://github.com/qt/qtwebkit/blob/5.9/Source/ThirdParty/leveldb/Target.pri#L80 [4]: https://github.com/qt/qtwebkit/blob/5.9/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp#L185 [5]: https://github.com/qt/qtwebkit/blob/5.9/Source/WebCore/WebCore.pri#L254 [6]: https://github.com/google/leveldb/commit/739c25100e46576cdcdfff2d6f43f9f7008103c7 Signed-off-by: Gaël PORTAY <gael.portay@collabora.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-01-02 21:56:30 +01:00
leveldb qt5base sqlite
QT5WEBKIT_INSTALL_STAGING = YES
QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1
QT5WEBKIT_LICENSE = LGPL-2.1+, BSD-3-Clause, BSD-2-Clause
# Source files contain references to LGPL_EXCEPTION.txt but it is not included
# in the archive.
QT5WEBKIT_LICENSE_FILES += LICENSE.LGPLv21
ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
QT5WEBKIT_DEPENDENCIES += xlib_libXext xlib_libXrender
endif
ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
QT5WEBKIT_DEPENDENCIES += qt5declarative
endif
# QtWebkit's build system uses python, but only supports python2. We work
# around this by forcing python2 early in the PATH, via a python->python2
# symlink.
QT5WEBKIT_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
define QT5WEBKIT_PYTHON2_SYMLINK
mkdir -p $(@D)/host-bin
ln -sf $(HOST_DIR)/bin/python2 $(@D)/host-bin/python
endef
QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
define QT5WEBKIT_CONFIGURE_CMDS
qt5webkit: select leveldb package and memenv This patch fixes the build issue reported by autobuilder [0]. /home/naourr/work/instance-2/output/build/qt5webkit-5.9.1/Source/WebCore//.obj/platform/leveldb/LevelDBDatabase.o: In function `WebCore::LevelDBDatabase::openInMemory(WebCore::LevelDBComparator const*)': LevelDBDatabase.cpp.text._ZN7WebCore15LevelDBDatabase12openInMemoryEPKNS_17LevelDBComparatorE+0x34): undefined reference to `leveldb::NewMemEnv(leveldb::Env*)' collect2: error: ld returned 1 exit status make[3]: *** [Makefile.api:97: ../lib/libQt5WebKit.so.5.9.1] Error 1 The issue happens when both packages leveldb and qt5webkit are enabled. QtWebKit builds its own copy of leveldb [1] (as a third-party) if the system does not provided it (i.e. buildroot). It builds it differently and this is the origin of that issue. Instead of using the Makefile provided by leveldb [2], QtWebKit uses qmake to build that library [3]. The missing symbol issue happens because the symbol leveldb::NewMemEnv is bundled in the static library libmemenv.a (aside libleveldb.so). This static library consists of this single symbol which is like an extra that is built but *NOT* shipped by default at installation in the staging directory. Unfortunatly, that symbol is required later by WebCore [4]. The copy built by QtWebKit is an all-in-one library including both libleveldb and libmemenv; thus QtWebKit links against libleveldb only. Also, the linker finds the buildroot's copy first (not the third-party): that explains why it is complaining about a missing symbol. That copy does not have the symbol leveldb::NewMemEnv. Fortunatly, QtWebKit provides a facility to link against the system leveldb package. The qmake flag WEBKIT_CONFIG+=use_system_leveldb tells Qt5WebKit to link against libleveldb *AND* libmemenv [5]. To fix that issue, this commit selects the package leveldb that now installs the libmemenv static library and its header. It ensures that QtWebKit has everything it needs to be built. It also sets the appropriate qmake configure flags to tell QtWebKit to use the leveldb copy built by buildroot instead of the bundled one. [0]: http://autobuild.buildroot.net/results/46033e82adf592c3b92c6d50cfaf45bd58beeaa4 [1]: https://github.com/qt/qtwebkit/tree/5.9/Source/ThirdParty/leveldb [2]: https://github.com/qt/qtwebkit/blob/5.9/Source/ThirdParty/leveldb/Makefile#L167-L169 [3]: https://github.com/qt/qtwebkit/blob/5.9/Source/ThirdParty/leveldb/Target.pri#L80 [4]: https://github.com/qt/qtwebkit/blob/5.9/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp#L185 [5]: https://github.com/qt/qtwebkit/blob/5.9/Source/WebCore/WebCore.pri#L254 [6]: https://github.com/google/leveldb/commit/739c25100e46576cdcdfff2d6f43f9f7008103c7 Signed-off-by: Gaël PORTAY <gael.portay@collabora.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-01-02 21:56:30 +01:00
(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(HOST_DIR)/bin/qmake WEBKIT_CONFIG+=use_system_leveldb)
endef
define QT5WEBKIT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D)
endef
define QT5WEBKIT_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D) install
endef
ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
define QT5WEBKIT_INSTALL_TARGET_QMLS
cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/
endef
endif
define QT5WEBKIT_INSTALL_TARGET_CMDS
cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib
cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/
$(QT5WEBKIT_INSTALL_TARGET_QMLS)
endef
$(eval $(generic-package))