Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QtWebEngine: new recipe #3040

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
117 changes: 117 additions & 0 deletions dev-qt/qtwebengine/patches/qtwebengine-5.11.1.patchset
@@ -0,0 +1,117 @@
Date: Sun Sept 9 2018 08:10:16 +0000
From: Ken Mays <kmays2000@gmail.com>
Subject: Qt WebEngine 5.11 patchset

From a568ded46a678eac8139cb06595819c5ae874177 Mon Sep 17 00:00:00 2001
From: Xiaohan Wang <xhwang@chromium.org>
Date: Mon, 29 Jan 2018 21:28:28 +0000
Subject: [PATCH] media: Increase DecoderBuffer::kPaddingSize to 64

AV_INPUT_BUFFER_PADDING_SIZE has been increased to 64 in FFmpeg:
https://github.com/FFmpeg/FFmpeg/commit/6e80079a2840ee407c5d126030eb1066bcbfdfc5

BUG=777484

Change-Id: I1bd68d1c1b0c3131f28d6e07e1444b89800c09db
Reviewed-on: https://chromium-review.googlesource.com/889686
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532593}
---
src/3rdparty/chromium/media/base/decoder_buffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/3rdparty/chromium/media/base/decoder_buffer.h b/src/3rdparty/chromium/media/base/decoder_buffer.h
index 0341e5784f725..60ffba708b0e5 100644
--- a/src/3rdparty/chromium/media/base/decoder_buffer.h
+++ b/src/3rdparty/chromium/media/base/decoder_buffer.h
@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer
: public base::RefCountedThreadSafe<DecoderBuffer> {
public:
enum {
- kPaddingSize = 32,
+ kPaddingSize = 64,
#if defined(ARCH_CPU_ARM_FAMILY)
kAlignmentSize = 16
#else

From: Jan Steffens <heftig@archlinux.org>
Date: 2017-09-19 23:30:08 -0700
Subject: This is required for QtWebEngine to show the patent-free LCD rendering. Without this patch, only grayscale rendering is used.
References: boo#1061344
Upstream: submitted
Index: qtwebengine-everywhere-src-5.11.0/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp
===================================================================
--- qtwebengine-everywhere-src-5.11.0.orig/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp
+++ qtwebengine-everywhere-src-5.11.0/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp
@@ -99,8 +99,6 @@ public:
FreeTypeLibrary()
: fGetVarDesignCoordinates(nullptr)
, fLibrary(nullptr)
- , fIsLCDSupported(false)
- , fLCDExtra(0)
{
if (FT_New_Library(&gFTMemory, &fLibrary)) {
return;
@@ -150,8 +148,6 @@ public:
// Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs.
// The default has changed over time, so this doesn't mean the same thing to all users.
if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
- fIsLCDSupported = true;
- fLCDExtra = 2; //Using a filter adds one full pixel to each side.
}
}
~FreeTypeLibrary() {
@@ -161,8 +157,6 @@ public:
}

FT_Library library() { return fLibrary; }
- bool isLCDSupported() { return fIsLCDSupported; }
- int lcdExtra() { return fLCDExtra; }

// FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1.
// Prior to this there was no way to get the coordinates out of the FT_Face.
@@ -173,8 +167,6 @@ public:

private:
FT_Library fLibrary;
- bool fIsLCDSupported;
- int fLCDExtra;

// FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0.
// The following platforms provide FreeType of at least 2.4.0.
@@ -659,17 +651,6 @@ void SkTypeface_FreeType::onFilterRec(Sk
rec->fTextSize = SkIntToScalar(1 << 14);
}

- if (isLCD(*rec)) {
- // TODO: re-work so that FreeType is set-up and selected by the SkFontMgr.
- SkAutoMutexAcquire ama(gFTMutex);
- ref_ft_library();
- if (!gFTLibrary->isLCDSupported()) {
- // If the runtime Freetype library doesn't support LCD, disable it here.
- rec->fMaskFormat = SkMask::kA8_Format;
- }
- unref_ft_library();
- }
-
SkPaint::Hinting h = rec->getHinting();
if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) {
// collapse full->normal hinting if we're not doing LCD
@@ -1062,11 +1043,11 @@ bool SkScalerContext_FreeType::getCBoxFo
void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) {
if (isLCD(fRec)) {
if (fLCDIsVert) {
- glyph->fHeight += gFTLibrary->lcdExtra();
- glyph->fTop -= gFTLibrary->lcdExtra() >> 1;
+ glyph->fHeight += 2;
+ glyph->fTop -= 1;
} else {
- glyph->fWidth += gFTLibrary->lcdExtra();
- glyph->fLeft -= gFTLibrary->lcdExtra() >> 1;
+ glyph->fWidth += 2;
+ glyph->fLeft -= 1;
}
}
}

207 changes: 207 additions & 0 deletions dev-qt/qtwebengine/qtwebengine-5.11.1.recipe
@@ -0,0 +1,207 @@
SUMMARY="Qt WebEngine rendering library for dynamic web content"
DESCRIPTION="Qt WebEngine provides functionality for rendering regions of dynamic web content. \
The functionality in Qt WebEngine is divided into the following modules: \
* QtWebEngineCore: Provides public API shared by both QtWebEngine and QtWebEngineWidgets \
* QtWebEngine: Provides QML types for rendering web content within a QML application \
* QtWebEngineWidgets: Provides a web browser engine as well as C++ classes to render \
and interact with web content"

kenmays marked this conversation as resolved.
Show resolved Hide resolved
HOMEPAGE="https://www.qt.io"
COPYRIGHT="2015-2018 The Qt Company Ltd."
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://download.qt.io/official_releases/qt/5.11/5.11.1/submodules/qtwebengine-everywhere-src-5.11.1.tar.xz"
kenmays marked this conversation as resolved.
Show resolved Hide resolved
CHECKSUM_SHA256="389d9f42ca393ac11ec8932ce9771766dec91a4c761ffb685cc429c2a760d48c"
SOURCE_DIR="qtwebengine-everywhere-src-5.11.1"
PATCHES="qtwebengine-5.11.1.patchset"
kenmays marked this conversation as resolved.
Show resolved Hide resolved

ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
qtwebengine$secondaryArchSuffix = $portVersion compat >= 5
lib:libQt5WebEngine$secondaryArchSuffix = $portVersion compat >= 5
lib:libQt5WebEngineCore$secondaryArchSuffix = $portVersion compat >= 5
lib:libQt5WebEngineWidgets$secondaryArchSuffix = $portVersion compat >= 5
cmd:qwebengine_convert_dict$secondaryArchSuffix = $portVersion compat >= 5
kenmays marked this conversation as resolved.
Show resolved Hide resolved

kenmays marked this conversation as resolved.
Show resolved Hide resolved
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libdbus_1$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libfontconfig$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libEGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libharfbuzz$secondaryArchSuffix
lib:libharfbuzz_icu$secondaryArchSuffix
lib:libhunspell$secondaryArchSuffix
lib:libhyphen$secondaryArchSuffix
lib:libicudata$secondaryArchSuffix
lib:libicui18n$secondaryArchSuffix
lib:libicuuc$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libjsoncpp$secondaryArchSuffix
lib:libnss3$secondaryArchSuffix
lib:libopus$secondaryArchSuffix
lib:liborc_0.4$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libprotobuf$secondaryArchSuffix
lib:libre2$secondaryArchSuffix
lib:libvpx$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Multimedia$secondaryArchSuffix
lib:libQt5MultimediaWidgets$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Positioning$secondaryArchSuffix
lib:libQt5PrintSupport$secondaryArchSuffix
lib:libQt5Qml$secondaryArchSuffix
lib:libQt5Quick$secondaryArchSuffix
lib:libQt5Sensors$secondaryArchSuffix
lib:libQt5WebChannel$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libsnappy$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libsrtp$secondaryArchSuffix
lib:libwebp$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libxslt$secondaryArchSuffix
lib:libyasm$secondaryArchSuffix
lib:libxcomposite$secondaryArchSuffix
lib:libxcursor$secondaryArchSuffix
lib:libxi$secondaryArchSuffix
lib:libXrandr$secondaryArchSuffix
lib:libxtst$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"

PROVIDES_devel="
qtwebengine${secondaryArchSuffix}_devel = $portVersion compat >= 5
devel:libQt5WebEngine$secondaryArchSuffix = $portVersion compat >= 5
devel:libQt5WebEngineCore$secondaryArchSuffix = $portVersion compat >= 5
devel:libQt5WebEngineWidgets$secondaryArchSuffix = $portVersion compat >= 5
"

REQUIRES_devel="
haiku$secondaryArchSuffix
qtwebengine$secondaryArchSuffix == $portVersion base
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libavcodec$secondaryArchSuffix
devel:libgcc$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libdbus_1$secondaryArchSuffix
devel:libegl$secondaryArchSuffix
devel:libfontconfig$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:libEGL$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libharfbuzz$secondaryArchSuffix
devel:libharfbuzz_icu$secondaryArchSuffix
devel:libhunspell$secondaryArchSuffix
devel:libhyphen$secondaryArchSuffix
devel:libicuuc$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:liblcms2$secondaryArchSuffix
devel:libjsoncpp$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libnss3$secondaryArchSuffix
devel:libopus$secondaryArchSuffix
devel:liborc_0.4$secondaryArchSuffix
devel:libpcre2_16$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libprotobuf$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libQt5Quick$secondaryArchSuffix
devel:libQt5Qml$secondaryArchSuffix
devel:libQt5Multimedia$secondaryArchSuffix
devel:libQt5Positioning$secondaryArchSuffix
devel:libQt5Sensors$secondaryArchSuffix
devel:libQt5WebChannel$secondaryArchSuffix
devel:libQt5PrintSupport$secondaryArchSuffix
devel:libQt5MultimediaWidgets$secondaryArchSuffix
devel:libre2$secondaryArchSuffix
devel:libsnappy$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libsrtp$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libvpx$secondaryArchSuffix
devel:libwebp$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libxslt$secondaryArchSuffix
devel:libyasm$secondaryArchSuffix
devel:libxcomposite$secondaryArchSuffix
devel:libxcursor$secondaryArchSuffix
devel:libxi$secondaryArchSuffix
devel:libXrandr$secondaryArchSuffix
devel:libxtst$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:bison
cmd:clang
cmd:find
cmd:flex
cmd:as$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:g++$secondaryArchSuffix
cmd:gperf
cmd:ld$secondaryArchSuffix
cmd:make
cmd:ninja
kenmays marked this conversation as resolved.
Show resolved Hide resolved
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:python2
cmd:sed
"

BUILD()
{
cd $sourceDir
mkdir -p build && cd build

qmake ..

make $jobArgs
}


INSTALL()
{
cd build
make install

mkdir -p $dataDir/Qt5
mv -f $libDir/qml $dataDir/Qt5
mv -f $prefix/mkspecs $dataDir/Qt5

fixPkgconfig

prepareInstalledDevelLibs libQt5WebEngine libQt5WebEngineCore libQt5WebEngineWidgets

cd $libDir
for i in lib*.so.5.*;do
ln -fs $i $(echo $i | cut -f1,2 -d.)
done
kenmays marked this conversation as resolved.
Show resolved Hide resolved

packageEntries devel \
$developDir \
$libDir/cmake \
$dataDir/Qt5/mkspecs
}