@@ -12,11 +12,15 @@ LIBXML2_LICENSE_FILES = COPYING
LIBXML2_CPE_ID_VENDOR = xmlsoft
LIBXML2_CONFIG_SCRIPTS = xml2-config
+LIBXML2_CFLAGS = $(TARGET_CFLAGS)
+
# relocation truncated to fit: R_68K_GOT16O
ifeq ($(BR2_m68k_cf),y)
-LIBXML2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mxgot"
+LIBXML2_CFLAGS += -mxgot
endif
+LIBXML2_CONF_ENV += CFLAGS="$(LIBXML2_CFLAGS)"
+
LIBXML2_CONF_OPTS = --with-gnu-ld --without-python --without-debug
HOST_LIBXML2_DEPENDENCIES = host-pkgconf
@@ -24,6 +28,13 @@ LIBXML2_DEPENDENCIES = host-pkgconf
HOST_LIBXML2_CONF_OPTS = --without-zlib --without-lzma --without-python
+ifeq ($(BR2_PACKAGE_ICU),y)
+LIBXML2_DEPENDENCIES += icu
+LIBXML2_CONF_OPTS += --with-icu
+else
+LIBXML2_CONF_OPTS += --without-icu
+endif
+
ifeq ($(BR2_PACKAGE_ZLIB),y)
LIBXML2_DEPENDENCIES += zlib
LIBXML2_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr
@@ -61,7 +61,7 @@ $(2)_POST_PREPARE_HOOKS += QT5_QT_CONF_FIXUP
ifndef $(2)_CONFIGURE_CMDS
define $(2)_CONFIGURE_CMDS
cd $$($(2)_BUILDDIR) && \
- $$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS)
+ $$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) -- $$($(2)_CONF_OPTS)
endef
endif
@@ -8,6 +8,10 @@
include(../common/linux_device_pre.conf)
+# set up pkg-config
+QMAKE_PKG_CONFIG = $$[QT_HOST_PREFIX]/bin/pkg-config
+QMAKE_PKGCONFIG_PREFIX = /usr
+
# modifications to g++-unix.conf
QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_CXX = $${CROSS_COMPILE}g++
@@ -2,6 +2,21 @@
Prefix=/usr
HostPrefix=@@HOST_DIR@@
Sysroot=@@STAGING_DIR@@
-Headers=/usr/include/qt5
-Plugins=/usr/lib/qt/plugins
-Examples=/usr/lib/qt/examples
+SysrootifyPrefix=false
+Binaries=@@STAGING_DIR@@/usr/bin
+Libraries=@@STAGING_DIR@@/usr/lib
+Headers=@@STAGING_DIR@@/usr/include/qt5
+Plugins=@@STAGING_DIR@@/usr/lib/qt/plugins
+Examples=@@STAGING_DIR@@/usr/lib/qt/examples
+Tests=@@STAGING_DIR@@/usr/lib/qt/tests
+Data=@@STAGING_DIR@@
+Translations=@@STAGING_DIR@@/translations
+Documentation=@@STAGING_DIR@@/doc
+ArchData=@@STAGING_DIR@@/usr
+LibraryExecutables=@@STAGING_DIR@@/usr/libexec
+Imports=@@STAGING_DIR@@/usr/imports
+Qml2Imports=@@STAGING_DIR@@/usr/qml
+Settings=@@STAGING_DIR@@/etc
+HostBinaries=@@HOST_DIR@@/bin
+HostLibraries=@@HOST_DIR@@/lib
+HostData=@@STAGING_DIR@@
@@ -230,6 +230,22 @@ QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu)
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_EXAMPLES),-make,-nomake) examples
+# Used by qt5webengine
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_FFMPEG),ffmpeg)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBEVENT),libevent)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBNSS),libnss)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBXML2),libxml2)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBXSLT),libxslt)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_MINIZIP),minizip)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBVPX),libvpx)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_WEBP),webp)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBXCURSOR),xlib_libXcursor)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBXI),xlib_libXi)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBXRANDR),xlib_libXrandr)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),xlib_libXScrnSaver)
+QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBXTST),xlib_libXtst)
+
ifeq ($(BR2_PACKAGE_LIBINPUT),y)
QT5BASE_CONFIGURE_OPTS += -libinput
QT5BASE_DEPENDENCIES += libinput
@@ -311,12 +327,15 @@ define QT5BASE_CONFIGURE_CMDS
-v \
-prefix /usr \
-hostprefix $(HOST_DIR) \
+ -hostdatadir $(STAGING_DIR) \
-headerdir /usr/include/qt5 \
-sysroot $(STAGING_DIR) \
+ -no-gcc-sysroot \
-plugindir /usr/lib/qt/plugins \
-examplesdir /usr/lib/qt/examples \
-no-rpath \
-nomake tests \
+ -pkg-config \
-device buildroot \
-device-option CROSS_COMPILE="$(TARGET_CROSS)" \
-device-option BR_COMPILER_CFLAGS="$(QT5BASE_CFLAGS)" \
new file mode 100644
@@ -0,0 +1,76 @@
+From a3bc792bdc116806a50e022d9102914c8daf6210 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 4 Aug 2021 19:11:06 +0200
+Subject: [PATCH] chromium: breakpad: fix build with glibc-2.34
+
+* fixes:
+[218/24061] CXX obj/third_party/breakpad/client/exception_handler.o
+FAILED: obj/third_party/breakpad/client/exception_handler.o
+/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.4+gitAUTOINC+dd7f7a9166_555f348ae8-r0/recipe-sysroot-native/usr/bin/x86_64-webos-linux/x86_64-webos-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -Wdate-time --sysroot=/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.4+gitAUTOINC+dd7f7a9166_555f348ae8-r0/recipe-sysroot -MMD -MF obj/third_party/breakpad/client/exception_handler.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DCR_SYSROOT_HASH=5f64b417e1018dcf8fcc81dc2714e0f264b9b911 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../../../git/src/3rdparty/chromium/third_party/breakpad -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/third_party/linux/include -Igen -I../../../../git/src/3rdparty/chromium -I../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu++14 -fno-exceptions -fno-rtti --sysroot=../../../../recipe-sysroot -fvisibility-inlines-hidden -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -c ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -o obj/third_party/breakpad/client/exception_handler.o
+../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc: In function 'void google_breakpad::{anonymous}::InstallAlternateStackLocked()':
+../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: error: no matching function for call to 'max(int, long int)'
+ 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
+ | ~~~~~~~~^~~~~~~~~~~~~~~~~
+In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/char_traits.h:39,
+ from ../../../../recipe-sysroot/usr/include/c++/11.2.0/string:40,
+ from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h:38,
+ from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:66:
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
+ 254 | max(const _Tp& __a, const _Tp& __b)
+ | ^~~
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
+../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
+ 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
+ | ~~~~~~~~^~~~~~~~~~~~~~~~~
+In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/char_traits.h:39,
+ from ../../../../recipe-sysroot/usr/include/c++/11.2.0/string:40,
+ from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h:38,
+ from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:66:
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
+ 300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
+ | ^~~
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
+../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
+ 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
+ | ~~~~~~~~^~~~~~~~~~~~~~~~~
+In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/algorithm:62,
+ from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:85:
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
+ 3461 | max(initializer_list<_Tp> __l)
+ | ^~~
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3461:5: note: template argument deduction/substitution failed:
+../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
+ 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
+ | ~~~~~~~~^~~~~~~~~~~~~~~~~
+In file included from ../../../../recipe-sysroot/usr/include/c++/11.2.0/algorithm:62,
+ from ../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:85:
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
+ 3467 | max(initializer_list<_Tp> __l, _Compare __comp)
+ | ^~~
+../../../../recipe-sysroot/usr/include/c++/11.2.0/bits/stl_algo.h:3467:5: note: template argument deduction/substitution failed:
+../../../../git/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc:141:49: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
+ 141 | static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
+ | ~~~~~~~~^~~~~~~~~~~~~~~~~
+
+Adapted from:
+https://github.com/meta-qt5/meta-qt5/blob/2a38fca150f065f869ed530fffe1a07beec80692/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-breakpad-fix-build-with-glibc-2.34.patch
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+---
+ .../breakpad/src/client/linux/handler/exception_handler.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+index ca353c40997..2e43ba6fc04 100644
+--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
+ // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
+ // the alternative stack. Ensure that the size of the alternative stack is
+ // large enough.
+- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
++ static const unsigned kSigStackSize = std::max<size_t>(16384, SIGSTKSZ);
+
+ // Only set an alternative stack if there isn't already one, or if the current
+ // one is too small.
new file mode 100644
@@ -0,0 +1,291 @@
+From 3fe2a7550a93a74d6d1c35a918229eb4c4dc5cb9 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen@qt.io>
+Date: Mon, 16 Nov 2020 13:16:13 +0100
+Subject: [PATCH] Fix build with system ICU 68
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes: QTBUG-88116
+Change-Id: I935babf51c2670fad7cc7950a2fe07eb2829c4cb
+Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[james.hilliard1@gmail.com: backport from upstream commit
+2918e073086af29bd3e4176cd2403dffa789fdc0]
+---
+ chromium/base/i18n/string_compare.cc | 4 ++--
+ chromium/base/i18n/time_formatting.cc | 2 +-
+ .../autofill/core/common/autofill_regexes.cc | 8 ++++----
+ .../renderer/spellcheck_worditerator.cc | 2 +-
+ .../spoof_checks/idn_spoof_checker.cc | 4 ++--
+ .../spoof_checks/skeleton_generator.cc | 2 +-
+ .../blink/renderer/platform/text/locale_icu.cc | 4 ++--
+ .../platform/text/text_break_iterator_icu.cc | 16 ++++++++--------
+ .../renderer/platform/text/unicode_utilities.cc | 2 +-
+ .../renderer/platform/wtf/text/text_codec_icu.cc | 2 +-
+ chromium/ui/base/l10n/formatter.cc | 6 +++---
+ 11 files changed, 26 insertions(+), 26 deletions(-)
+
+diff --git a/src/3rdparty/chromium/base/i18n/string_compare.cc b/src/3rdparty/chromium/base/i18n/string_compare.cc
+index 6cd59b98f49..a5fa502b53f 100644
+--- a/src/3rdparty/chromium/base/i18n/string_compare.cc
++++ b/src/3rdparty/chromium/base/i18n/string_compare.cc
+@@ -18,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
+ StringPiece16 rhs) {
+ UErrorCode error = U_ZERO_ERROR;
+ UCollationResult result = collator.compare(
+- icu::UnicodeString(FALSE, lhs.data(), static_cast<int>(lhs.length())),
+- icu::UnicodeString(FALSE, rhs.data(), static_cast<int>(rhs.length())),
++ icu::UnicodeString(false, lhs.data(), static_cast<int>(lhs.length())),
++ icu::UnicodeString(false, rhs.data(), static_cast<int>(rhs.length())),
+ error);
+ DCHECK(U_SUCCESS(error));
+ return result;
+diff --git a/src/3rdparty/chromium/base/i18n/time_formatting.cc b/src/3rdparty/chromium/base/i18n/time_formatting.cc
+index 1a6c1389ba0..106dd0e5b47 100644
+--- a/src/3rdparty/chromium/base/i18n/time_formatting.cc
++++ b/src/3rdparty/chromium/base/i18n/time_formatting.cc
+@@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const TimeDelta time,
+ icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
+ measure_format.formatMeasures(measures, 3, formatted, ignore, status);
+ *out = i18n::UnicodeStringToString16(formatted);
+- return U_SUCCESS(status) == TRUE;
++ return U_SUCCESS(status) == true;
+ }
+
+ string16 DateIntervalFormat(const Time& begin_time,
+diff --git a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
+index b141cb2d0f6..a8a688d50c7 100644
+--- a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
++++ b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
+@@ -43,7 +43,7 @@ class AutofillRegexes {
+ icu::RegexMatcher* AutofillRegexes::GetMatcher(const base::string16& pattern) {
+ auto it = matchers_.find(pattern);
+ if (it == matchers_.end()) {
+- const icu::UnicodeString icu_pattern(FALSE, pattern.data(),
++ const icu::UnicodeString icu_pattern(false, pattern.data(),
+ pattern.length());
+
+ UErrorCode status = U_ZERO_ERROR;
+@@ -70,20 +70,20 @@ bool MatchesPattern(const base::string16& input,
+ base::AutoLock lock(*g_lock);
+
+ icu::RegexMatcher* matcher = g_autofill_regexes->GetMatcher(pattern);
+- icu::UnicodeString icu_input(FALSE, input.data(), input.length());
++ icu::UnicodeString icu_input(false, input.data(), input.length());
+ matcher->reset(icu_input);
+
+ UErrorCode status = U_ZERO_ERROR;
+ UBool matched = matcher->find(0, status);
+ DCHECK(U_SUCCESS(status));
+
+- if (matched == TRUE && match) {
++ if (matched == true && match) {
+ icu::UnicodeString match_unicode = matcher->group(0, status);
+ DCHECK(U_SUCCESS(status));
+ *match = base::i18n::UnicodeStringToString16(match_unicode);
+ }
+
+- return matched == TRUE;
++ return matched == true;
+ }
+
+ } // namespace autofill
+diff --git a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
+index 8fe8a6df381..e3a65580c08 100644
+--- a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
++++ b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
+@@ -424,7 +424,7 @@ bool SpellcheckWordIterator::Normalize(size_t input_start,
+ // spellchecker and we need manual normalization as well. The normalized
+ // text does not have to be NUL-terminated since its characters are copied to
+ // string16, which adds a NUL character when we need.
+- icu::UnicodeString input(FALSE, &text_[input_start],
++ icu::UnicodeString input(false, &text_[input_start],
+ base::checked_cast<int32_t>(input_length));
+ UErrorCode status = U_ZERO_ERROR;
+ icu::UnicodeString output;
+diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
+index 1964793fd3e..c4e01026c38 100644
+--- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
++++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
+@@ -347,7 +347,7 @@ bool IDNSpoofChecker::SafeToDisplayAsUnicode(
+ if (U_FAILURE(status) || (result & USPOOF_ALL_CHECKS))
+ return false;
+
+- icu::UnicodeString label_string(FALSE /* isTerminated */, label.data(),
++ icu::UnicodeString label_string(false /* isTerminated */, label.data(),
+ base::checked_cast<int32_t>(label.size()));
+
+ // A punycode label with 'xn--' prefix is not subject to the URL
+@@ -677,7 +677,7 @@ bool IDNSpoofChecker::IsWholeScriptConfusableAllowedForTLD(
+ base::StringPiece tld,
+ base::StringPiece16 tld_unicode) {
+ icu::UnicodeString tld_string(
+- FALSE /* isTerminated */, tld_unicode.data(),
++ false /* isTerminated */, tld_unicode.data(),
+ base::checked_cast<int32_t>(tld_unicode.size()));
+ // Allow if the TLD contains any letter from the script, in which case it's
+ // likely to be a TLD in that script.
+diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
+index 41485914007..b8c1c2f547a 100644
+--- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
++++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
+@@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() = default;
+ Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) {
+ Skeletons skeletons;
+ size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0);
+- icu::UnicodeString host(FALSE, hostname.data(), hostname_length);
++ icu::UnicodeString host(false, hostname.data(), hostname_length);
+ // If input has any characters outside Latin-Greek-Cyrillic and [0-9._-],
+ // there is no point in getting rid of diacritics because combining marks
+ // attached to non-LGC characters are already blocked.
+diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
+index abff1b1d809..57f1286d4e4 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
+@@ -169,12 +169,12 @@ static String GetDateFormatPattern(const UDateFormat* date_format) {
+ return g_empty_string;
+
+ UErrorCode status = U_ZERO_ERROR;
+- int32_t length = udat_toPattern(date_format, TRUE, nullptr, 0, &status);
++ int32_t length = udat_toPattern(date_format, true, nullptr, 0, &status);
+ if (status != U_BUFFER_OVERFLOW_ERROR || !length)
+ return g_empty_string;
+ StringBuffer<UChar> buffer(length);
+ status = U_ZERO_ERROR;
+- udat_toPattern(date_format, TRUE, buffer.Characters(), length, &status);
++ udat_toPattern(date_format, true, buffer.Characters(), length, &status);
+ if (U_FAILURE(status))
+ return g_empty_string;
+ return String::Adopt(buffer);
+diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
+index a257cd75ccf..898d0c47bb1 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
+@@ -311,13 +311,13 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
+ text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
+ ? static_cast<int32_t>(offset)
+ : 0;
+- is_accessible = TRUE;
++ is_accessible = true;
+ return true;
+ }
+ if (native_index >= native_length &&
+ text->chunkNativeLimit == native_length) {
+ text->chunkOffset = text->chunkLength;
+- is_accessible = FALSE;
++ is_accessible = false;
+ return true;
+ }
+ } else {
+@@ -330,12 +330,12 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
+ text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
+ ? static_cast<int32_t>(offset)
+ : 0;
+- is_accessible = TRUE;
++ is_accessible = true;
+ return true;
+ }
+ if (native_index <= 0 && !text->chunkNativeStart) {
+ text->chunkOffset = 0;
+- is_accessible = FALSE;
++ is_accessible = false;
+ return true;
+ }
+ }
+@@ -346,7 +346,7 @@ static UBool TextLatin1Access(UText* text,
+ int64_t native_index,
+ UBool forward) {
+ if (!text->context)
+- return FALSE;
++ return false;
+ int64_t native_length = TextNativeLength(text);
+ UBool is_accessible;
+ if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
+@@ -370,7 +370,7 @@ static UBool TextLatin1Access(UText* text,
+ DCHECK_EQ(new_context, kPriorContext);
+ TextLatin1SwitchToPriorContext(text, native_index, native_length, forward);
+ }
+- return TRUE;
++ return true;
+ }
+
+ static const struct UTextFuncs kTextLatin1Funcs = {
+@@ -510,7 +510,7 @@ static void TextUTF16SwitchToPriorContext(UText* text,
+
+ static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
+ if (!text->context)
+- return FALSE;
++ return false;
+ int64_t native_length = TextNativeLength(text);
+ UBool is_accessible;
+ if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
+@@ -532,7 +532,7 @@ static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
+ DCHECK_EQ(new_context, kPriorContext);
+ TextUTF16SwitchToPriorContext(text, native_index, native_length, forward);
+ }
+- return TRUE;
++ return true;
+ }
+
+ static const struct UTextFuncs kTextUTF16Funcs = {
+diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
+index 2cefd5390b6..b8c4515dc13 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
+@@ -300,7 +300,7 @@ void NormalizeCharactersIntoNFCForm(const UChar* characters,
+ DCHECK(U_SUCCESS(status));
+ int32_t input_length = static_cast<int32_t>(length);
+ // copy-on-write.
+- icu::UnicodeString normalized(FALSE, characters, input_length);
++ icu::UnicodeString normalized(false, characters, input_length);
+ // In the vast majority of cases, input is already NFC. Run a quick check
+ // to avoid normalizing the entire input unnecessarily.
+ int32_t normalized_prefix_length =
+diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
+index 810d1cd9181..9074b640fff 100644
+--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
+@@ -326,7 +326,7 @@ void TextCodecICU::CreateICUConverter() const {
+ DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING)
+ << "ICU ambiguous alias warning for encoding: " << encoding_.GetName();
+ if (converter_icu_)
+- ucnv_setFallback(converter_icu_, TRUE);
++ ucnv_setFallback(converter_icu_, true);
+ }
+
+ int TextCodecICU::DecodeToBuffer(UChar* target,
+diff --git a/src/3rdparty/chromium/ui/base/l10n/formatter.cc b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
+index 486a3a029cb..d7a41724628 100644
+--- a/src/3rdparty/chromium/ui/base/l10n/formatter.cc
++++ b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
+@@ -232,7 +232,7 @@ void Formatter::Format(Unit unit,
+ int value,
+ icu::UnicodeString* formatted_string) const {
+ DCHECK(simple_format_[unit]);
+- DCHECK(formatted_string->isEmpty() == TRUE);
++ DCHECK(formatted_string->isEmpty() == true);
+ UErrorCode error = U_ZERO_ERROR;
+ FormatNumberInPlural(*simple_format_[unit],
+ value, formatted_string, &error);
+@@ -248,7 +248,7 @@ void Formatter::Format(TwoUnits units,
+ << "Detailed() not implemented for your (format, length) combination!";
+ DCHECK(detailed_format_[units][1])
+ << "Detailed() not implemented for your (format, length) combination!";
+- DCHECK(formatted_string->isEmpty() == TRUE);
++ DCHECK(formatted_string->isEmpty() == true);
+ UErrorCode error = U_ZERO_ERROR;
+ FormatNumberInPlural(*detailed_format_[units][0], value_1,
+ formatted_string, &error);
+@@ -281,7 +281,7 @@ std::unique_ptr<icu::MessageFormat> Formatter::InitFormat(
+ base::string16 pattern = l10n_util::GetStringUTF16(pluralities.id);
+ UErrorCode error = U_ZERO_ERROR;
+ std::unique_ptr<icu::MessageFormat> format(new icu::MessageFormat(
+- icu::UnicodeString(FALSE, pattern.data(), pattern.length()), error));
++ icu::UnicodeString(false, pattern.data(), pattern.length()), error));
+ DCHECK(U_SUCCESS(error));
+ if (format.get())
+ return format;
+--
+2.25.1
+
@@ -38,18 +38,24 @@ config BR2_PACKAGE_QT5WEBENGINE
# https://github.com/v8/v8/blob/5.6.326.55/gypfiles/toolchain.gypi#L1036-L1037
select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64 # v8/chromium
select BR2_PACKAGE_FFMPEG
+ select BR2_PACKAGE_LIBEVENT
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBNSS
select BR2_PACKAGE_LIBVPX
select BR2_PACKAGE_LIBXKBCOMMON
+ select BR2_PACKAGE_LIBXML2
+ select BR2_PACKAGE_LIBXSLT
select BR2_PACKAGE_OPUS
select BR2_PACKAGE_WEBP
select BR2_PACKAGE_WEBP_DEMUX
+ select BR2_PACKAGE_WEBP_MUX
select BR2_PACKAGE_QT5BASE_DBUS
select BR2_PACKAGE_QT5BASE_EGLFS
select BR2_PACKAGE_QT5BASE_FONTCONFIG
+ select BR2_PACKAGE_QT5BASE_JPEG
select BR2_PACKAGE_QT5BASE_ICU
select BR2_PACKAGE_QT5BASE_GUI
+ select BR2_PACKAGE_QT5BASE_PNG
select BR2_PACKAGE_QT5BASE_WIDGETS
select BR2_PACKAGE_QT5DECLARATIVE
select BR2_PACKAGE_QT5DECLARATIVE_QUICK
@@ -7,9 +7,8 @@
QT5WEBENGINE_VERSION = $(QT5_VERSION)
QT5WEBENGINE_SITE = $(QT5_SITE)
QT5WEBENGINE_SOURCE = qtwebengine-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5WEBENGINE_VERSION).tar.xz
-QT5WEBENGINE_DEPENDENCIES = ffmpeg libglib2 libvpx libxkbcommon opus webp \
- qt5declarative qt5webchannel host-bison host-flex host-gperf \
- host-pkgconf host-python
+QT5WEBENGINE_DEPENDENCIES = qt5declarative qt5webchannel host-bison host-flex \
+ host-gperf host-icu host-ninja host-pkgconf host-python host-webp host-zlib
QT5WEBENGINE_INSTALL_STAGING = YES
include package/qt5/qt5webengine/chromium-latest.inc
@@ -22,29 +21,61 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
QT5WEBENGINE_DEPENDENCIES += qt5svg
endif
-ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
-QT5WEBENGINE_DEPENDENCIES += xlib_libXScrnSaver xlib_libXcomposite \
- xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst
+QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss
+
+ifeq ($(BR2_PACKAGE_QT5BASE_FONTCONFIG),y)
+QT5WEBENGINE_DEPENDENCIES += host-freetype
+endif
+
+ifeq ($(BR2_PACKAGE_QT5BASE_JPEG),y)
+QT5WEBENGINE_DEPENDENCIES += host-libjpeg
endif
-QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
+QT5WEBENGINE_CONF_OPTS += \
+ -feature-webengine-system-ffmpeg \
+ -feature-webengine-system-glib \
+ -feature-webengine-system-harfbuzz \
+ -feature-webengine-system-libevent \
+ -feature-webengine-system-libvpx \
+ -feature-webengine-system-libwebp \
+ -feature-webengine-system-libxml2 \
+ -feature-webengine-system-ninja \
+ -feature-webengine-system-opus \
+ -feature-webengine-system-png \
+ -feature-webengine-system-zlib
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS += \
+ -no-feature-webengine-system-icu \
+ -no-feature-webengine-system-minizip \
+ -no-feature-webengine-system-gn \
+ -no-feature-webengine-v8-snapshot-support
ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += -feature-webengine-proprietary-codecs
+else
+QT5WEBENGINE_CONF_OPTS += -no-feature-webengine-proprietary-codecs
endif
ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
QT5WEBENGINE_DEPENDENCIES += alsa-lib
+QT5WEBENGINE_CONF_OPTS += -feature-webengine-alsa
+else
+QT5WEBENGINE_CONF_OPTS += -no-feature-webengine-alsa
+endif
+
+ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
+QT5WEBENGINE_DEPENDENCIES += pulseaudio
+QT5WEBENGINE_CONF_OPTS += -feature-webengine-pulseaudio
else
-QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += -no-feature-webengine-pulseaudio
endif
# QtWebengine'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.
-QT5WEBENGINE_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
+QT5WEBENGINE_ENV = \
+ PATH=$(@D)/host-bin:$(BR_PATH) \
+ PKG_CONFIG_SYSROOT_DIR="/"
define QT5WEBENGINE_PYTHON2_SYMLINK
mkdir -p $(@D)/host-bin
ln -sf $(HOST_DIR)/bin/python2 $(@D)/host-bin/python
@@ -58,7 +89,9 @@ define QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
chmod +x $(@D)/host-bin/host-pkg-config
endef
QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
-QT5WEBENGINE_ENV += GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config
+QT5WEBENGINE_ENV += \
+ GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config \
+ GN_HOST_TOOLCHAIN_EXTRA_CPPFLAGS="$(HOST_CPPFLAGS)"
QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)
@@ -19,6 +19,10 @@ WEBP_CONF_OPTS += \
--with-tiffincludedir=$(STAGING_DIR)/usr/include \
--with-tifflibdir=$(STAGING_DIR)/usr/lib
+HOST_WEBP_CONF_OPTS += \
+ --enable-libwebpdemux \
+ --enable-libwebpmux
+
ifeq ($(BR2_PACKAGE_WEBP_DEMUX),y)
WEBP_CONF_OPTS += --enable-libwebpdemux
else
@@ -56,3 +60,4 @@ WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_JPEG),jpeg)
WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff)
$(eval $(autotools-package))
+$(eval $(host-autotools-package))
Currently the qmake gcc sysrootify path logic causes issues with per-package directories, disable automatic gcc sysroot for qt5base install and override all qt.conf paths manually to point to their correct locations. Redirect HostData to STAGING_DIR as mkspecs need to be available there instead of the HOST_DIR for cross compilation to work. Also set qmake target pkg-config path for qt5webengine. Set PKG_CONFIG_SYSROOT_DIR="/" in qt5webengine to prevent target pkg-config path mangling. This fixes some build errors with per-package directories such as: /home/buildroot/buildroot/output/per-package/qt5base/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: cannot find /lib64/libc.so.6 /home/buildroot/buildroot/output/per-package/qt5base/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: cannot find /usr/lib64/libc_nonshared.a /home/buildroot/buildroot/output/per-package/qt5base/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: cannot find /lib/ld-linux-aarch64.so.1 collect2: error: ld returned 1 exit status make[4]: *** [Makefile:122: ../../lib/libQt5Svg.so.5.15.2] Error 1 make[3]: *** [Makefile:48: sub-svg-make_first-ordered] Error 2 make[2]: *** [Makefile:49: sub-src-make_first] Error 2 make[1]: *** [package/pkg-generic.mk:295: /home/buildroot/buildroot/output/build/qt5svg-5.15.2/.stamp_built] Error 2 Also attempt to fix massive amounts of breakage due to use of unsupported config flags in qt5webengine as of 5.10.0: * WebEngine Features are now configured as Qt features and WEBENGINE_CONFIG has been removed. Move target dependencies to qt5base which fixes/works around more per-package issues. More fixes for pkg-config target/host separation. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- Changes v4 -> v5: - rework qt5webengine config to use feature flags - try to fix more random breakage Changes v3 -> v4: - fix target pkg-config path mangling Changes v2 -> v3: - set target pkg-config path Changes v1 -> v2: - add some missing overrides to qt.conf.in --- package/libxml2/libxml2.mk | 13 +- package/pkg-qmake.mk | 2 +- package/qt5/qt5base/qmake.conf.in | 4 + package/qt5/qt5base/qt.conf.in | 21 +- package/qt5/qt5base/qt5base.mk | 19 ++ ...m-breakpad-fix-build-with-glibc-2.34.patch | 76 +++++ .../0003-Fix-build-with-system-ICU-68.patch | 291 ++++++++++++++++++ package/qt5/qt5webengine/Config.in | 6 + package/qt5/qt5webengine/qt5webengine.mk | 57 +++- package/webp/webp.mk | 5 + 10 files changed, 477 insertions(+), 17 deletions(-) create mode 100644 package/qt5/qt5webengine/0002-chromium-breakpad-fix-build-with-glibc-2.34.patch create mode 100644 package/qt5/qt5webengine/0003-Fix-build-with-system-ICU-68.patch