commit: feea681af8f400fca9cfa3e600cfb585c6aa845b Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> AuthorDate: Tue Dec 6 07:37:50 2016 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Tue Dec 6 08:21:45 2016 +0000 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=feea681a
dev-qt/qtwebengine: Add patches. qtwebengine-5.7.0-fix-system-ffmpeg.patch undefines FF_API_CONVERGENCE_DURATION, which should only be defined when not using the system ffmpeg. This causes segmentation faults at runtime with FFMPEG 3.x qtwebengine-5.7.0-icu58.patch is adapted from www-client/chromium/files/chromium-icu-58.patch qtwebengine-5.7.0-undef-madv_free.patch is adapted from http://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=fa8cdb3a32c377b6290d0a92d2522186bcd48293 Gentoo-Bug: 599094 Package-Manager: portage-2.3.2 .../qtwebengine-5.7.0-fix-system-ffmpeg.patch | 13 ++++++ .../files/qtwebengine-5.7.0-icu58.patch | 51 ++++++++++++++++++++++ .../files/qtwebengine-5.7.0-undef-madv_free.patch | 33 ++++++++++++++ dev-qt/qtwebengine/qtwebengine-5.7.9999.ebuild | 6 +++ dev-qt/qtwebengine/qtwebengine-5.8.9999.ebuild | 5 +++ dev-qt/qtwebengine/qtwebengine-5.9999.ebuild | 5 +++ 6 files changed, 113 insertions(+) diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.7.0-fix-system-ffmpeg.patch b/dev-qt/qtwebengine/files/qtwebengine-5.7.0-fix-system-ffmpeg.patch new file mode 100644 index 0000000..71881e0 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.7.0-fix-system-ffmpeg.patch @@ -0,0 +1,13 @@ +diff -Naur qtwebengine-opensource-src-5.7.0.orig/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h +--- qtwebengine-opensource-src-5.7.0.orig/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h 2016-11-23 13:01:20.929772871 -0800 ++++ qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h 2016-11-23 13:02:18.879462854 -0800 +@@ -24,7 +24,9 @@ + // Disable deprecated features which result in spammy compile warnings. This + // list of defines must mirror those in the 'defines' section of BUILD.gn file & + // ffmpeg.gyp file or the headers below will generate different structures! ++#if !defined(USE_SYSTEM_FFMPEG) + #define FF_API_CONVERGENCE_DURATION 0 ++#endif + // Upstream libavcodec/utils.c still uses the deprecated + // av_dup_packet(), causing deprecation warnings. + // The normal fix for such things is to disable the feature as below, diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.7.0-icu58.patch b/dev-qt/qtwebengine/files/qtwebengine-5.7.0-icu58.patch new file mode 100644 index 0000000..ced5367 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.7.0-icu58.patch @@ -0,0 +1,51 @@ +diff -Naur qtwebengine-opensource-src-5.7.0.orig/src/3rdparty/chromium/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp +--- qtwebengine-opensource-src-5.7.0.orig/src/3rdparty/chromium/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp 2016-11-15 17:07:38.680665385 -0800 ++++ qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp 2016-11-15 17:12:17.564001354 -0800 +@@ -26,6 +26,9 @@ + #include "wtf/StdLibExtras.h" + #include "wtf/text/CharacterNames.h" + ++#include <unicode/uchar.h> ++#include <unicode/uvernum.h> ++ + namespace blink { + + unsigned numGraphemeClusters(const String& string) +@@ -122,13 +125,18 @@ + { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), 0, B(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 0, 0) }, // DEL + }; + ++#if U_ICU_VERSION_MAJOR_NUM >= 58 ++#define BA_LB_COUNT (U_LB_COUNT - 3) ++#else ++#define BA_LB_COUNT U_LB_COUNT ++#endif + // Line breaking table for CSS word-break: break-all. This table differs from + // asciiLineBreakTable in: + // - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking + // Algorithm: http://unicode.org/reports/tr14/#DescriptionOfProperties + // - 1 indicates additional break opportunities. 0 indicates to fallback to + // normal line break, not "prohibit break." +-static const unsigned char breakAllLineBreakClassTable[][U_LB_COUNT / 8 + 1] = { ++static const unsigned char breakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] = { + // XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI + { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX + { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AI +@@ -178,7 +186,7 @@ + #undef AL + + static_assert(WTF_ARRAY_LENGTH(asciiLineBreakTable) == asciiLineBreakTableLastChar - asciiLineBreakTableFirstChar + 1, "asciiLineBreakTable should be consistent"); +-static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == U_LB_COUNT, "breakAllLineBreakClassTable should be consistent"); ++static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == BA_LB_COUNT, "breakAllLineBreakClassTable should be consistent"); + + static inline bool shouldBreakAfter(UChar lastCh, UChar ch, UChar nextCh) + { +@@ -209,7 +217,7 @@ + + static inline bool shouldBreakAfterBreakAll(ULineBreak lastLineBreak, ULineBreak lineBreak) + { +- if (lineBreak >= 0 && lineBreak < U_LB_COUNT && lastLineBreak >= 0 && lastLineBreak < U_LB_COUNT) { ++ if (lineBreak >= 0 && lineBreak < BA_LB_COUNT && lastLineBreak >= 0 && lastLineBreak < BA_LB_COUNT) { + const unsigned char* tableRow = breakAllLineBreakClassTable[lastLineBreak]; + return tableRow[lineBreak / 8] & (1 << (lineBreak % 8)); + } diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.7.0-undef-madv_free.patch b/dev-qt/qtwebengine/files/qtwebengine-5.7.0-undef-madv_free.patch new file mode 100644 index 0000000..193e713 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.7.0-undef-madv_free.patch @@ -0,0 +1,33 @@ +From fa8cdb3a32c377b6290d0a92d2522186bcd48293 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen <[email protected]> +Date: Tue, 9 Aug 2016 16:21:29 +0200 +Subject: Do not depend on Linux 4.5 + +Avoid using MADV_FREE that was only recently added to Linux. It will fail when +run on older Linux kernels. + +Change-Id: I9b0369fb31402f088b2327c12f70dd39f5e4c8c0 +Reviewed-by: Peter Varga <[email protected]> +--- + chromium/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp +index 12c9a7b..1639013 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp +@@ -39,6 +39,11 @@ + + #include <sys/mman.h> + ++#if OS(LINUX) && defined(MADV_FREE) ++// Added in Linux 4.5, but we don't want to depend on 4.5 at runtime ++#undef MADV_FREE ++#endif ++ + #ifndef MADV_FREE + #define MADV_FREE MADV_DONTNEED + #endif +-- +cgit v1.0-4-g1e03 + diff --git a/dev-qt/qtwebengine/qtwebengine-5.7.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-5.7.9999.ebuild index 475ef9e..62b4112 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.7.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.7.9999.ebuild @@ -71,6 +71,12 @@ DEPEND="${RDEPEND} pax_kernel? ( sys-apps/elfix ) " +PATCHES=( + "${FILESDIR}/${PN}-5.7.0-fix-system-ffmpeg.patch" + "${FILESDIR}/${PN}-5.7.0-icu58.patch" + "${FILESDIR}/${PN}-5.7.0-undef-madv_free.patch" +) + src_prepare() { use pax_kernel && PATCHES+=( "${FILESDIR}/${PN}-paxmark-mksnapshot.patch" ) diff --git a/dev-qt/qtwebengine/qtwebengine-5.8.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-5.8.9999.ebuild index 475ef9e..bcc8e36 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.8.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.8.9999.ebuild @@ -71,6 +71,11 @@ DEPEND="${RDEPEND} pax_kernel? ( sys-apps/elfix ) " +PATCHES=( + "${FILESDIR}/${PN}-5.7.0-fix-system-ffmpeg.patch" + "${FILESDIR}/${PN}-5.7.0-icu58.patch" +) + src_prepare() { use pax_kernel && PATCHES+=( "${FILESDIR}/${PN}-paxmark-mksnapshot.patch" ) diff --git a/dev-qt/qtwebengine/qtwebengine-5.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-5.9999.ebuild index 475ef9e..bcc8e36 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.9999.ebuild @@ -71,6 +71,11 @@ DEPEND="${RDEPEND} pax_kernel? ( sys-apps/elfix ) " +PATCHES=( + "${FILESDIR}/${PN}-5.7.0-fix-system-ffmpeg.patch" + "${FILESDIR}/${PN}-5.7.0-icu58.patch" +) + src_prepare() { use pax_kernel && PATCHES+=( "${FILESDIR}/${PN}-paxmark-mksnapshot.patch" )
