diff options
author | Daniel Egeberg | 2018-08-26 17:02:58 +0200 |
---|---|---|
committer | Daniel Egeberg | 2018-08-26 17:06:30 +0200 |
commit | 31b9e38d7927b1e982a2fd2b51220b40ff3c96dc (patch) | |
tree | 58ca8dd6f97d22b2958754fbc20caf8e81296baf | |
download | aur-qt5-pmp-webengine.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 42 | ||||
-rw-r--r-- | 0001-Fix-no_sanitize-attribute-placement.patch | 46 | ||||
-rw-r--r-- | PKGBUILD | 60 | ||||
-rw-r--r-- | harmony-fix.diff | 69 |
4 files changed, 217 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..81101d472776 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,42 @@ +# Generated by mksrcinfo v8 +# Sun Aug 26 15:02:28 UTC 2018 +pkgbase = qt5-pmp-webengine + pkgdesc = Provides support for web applications using the Chromium browser project (for plex-media-player) + pkgver = 5.9.5 + pkgrel = 1 + url = http://qt-project.org/ + arch = x86_64 + groups = qt5-pmp + license = LGPL3 + license = LGPL2.1 + license = BSD + makedepends = python2 + makedepends = git + makedepends = gperf + makedepends = jsoncpp + makedepends = ninja + depends = qt5-pmp-webchannel + depends = qt5-pmp-location + depends = libxcomposite + depends = libxrandr + depends = pciutils + depends = libxss + depends = libvpx + depends = libevent + depends = libsrtp + depends = snappy + depends = nss + depends = protobuf + depends = libxslt + depends = libxdamage + depends = minizip + depends = ffmpeg + source = http://download.qt.io/official_releases/qt/5.9/5.9.5/submodules/qtwebengine-opensource-src-5.9.5.tar.xz + source = harmony-fix.diff + source = 0001-Fix-no_sanitize-attribute-placement.patch + sha256sums = 70d26db4e7944291c5f843b875916fb95ceec0f0a8fea3daea8004990199fc07 + sha256sums = 2c309c0f6978e6a399422319b5034b01881d5526cf48b2ee5fcc7f418029a344 + sha256sums = 8b0a8a36f2d6ac3c3be28233767655a8ef58fe354b7fa6cbd1f806d3aad3e883 + +pkgname = qt5-pmp-webengine + diff --git a/0001-Fix-no_sanitize-attribute-placement.patch b/0001-Fix-no_sanitize-attribute-placement.patch new file mode 100644 index 000000000000..6e0776d22dc3 --- /dev/null +++ b/0001-Fix-no_sanitize-attribute-placement.patch @@ -0,0 +1,46 @@ +From 47b53f700ffd25b8d3c492d0395011fbb7fc7f52 Mon Sep 17 00:00:00 2001 +From: marxin <mliska@suse.cz> +Date: Wed, 21 Jun 2017 15:13:17 +0200 +Subject: [PATCH] Fix no_sanitize attribute placement. + +In order to enable building with GCC 8+, no_sanitize attribute must +be placed before a function declarator. +--- + webrtc/common_audio/vad/vad_core.c | 4 ++-- + .../audio_coding/codecs/isac/fix/source/entropy_coding.c | 12 ++++++------ + webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c | 4 ++-- + 3 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/webrtc/common_audio/vad/vad_core.c b/webrtc/common_audio/vad/vad_core.c +index 0340165eb..1a3889c36 100644 +--- a/webrtc/common_audio/vad/vad_core.c ++++ b/webrtc/common_audio/vad/vad_core.c +@@ -115,8 +115,8 @@ static int32_t WeightedAverage(int16_t* data, int16_t offset, + // undefined behavior, so not a good idea; this just makes UBSan ignore the + // violation, so that our old code can continue to do what it's always been + // doing.) +-static inline int32_t OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) +- RTC_NO_SANITIZE("signed-integer-overflow") { ++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") ++ OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) { + return a * b; + } + +diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +index 2b92acb64..b69a885f3 100644 +--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c ++++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +@@ -209,8 +209,8 @@ void WebRtcIsacfix_NormLatticeFilterMa(size_t orderCoef, + // Left shift of an int32_t that's allowed to overflow. (It's still undefined + // behavior, so not a good idea; this just makes UBSan ignore the violation, so + // that our old code can continue to do what it's always been doing.) +-static inline int32_t OverflowingLShiftS32(int32_t x, int shift) +- RTC_NO_SANITIZE("shift") { ++static inline int32_t RTC_NO_SANITIZE("shift") ++ OverflowingLShiftS32(int32_t x, int shift) { + return x << shift; + } + +-- +2.13.1 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7e1be6288171 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Daniel Egeberg <daniel.egeberg@gmail.com> +# Contributor:: Felix Yan <felixonmars@archlinux.org> +# Contributor: Andrea Scarpino <andrea@archlinux.org> + +pkgname=qt5-pmp-webengine +_qtver=5.9.5 +pkgver=${_qtver/-/} +pkgrel=1 +arch=('x86_64') +url='http://qt-project.org/' +license=('LGPL3' 'LGPL2.1' 'BSD') +pkgdesc='Provides support for web applications using the Chromium browser project (for plex-media-player)' +depends=('qt5-pmp-webchannel' 'qt5-pmp-location' 'libxcomposite' 'libxrandr' 'pciutils' 'libxss' 'libvpx' + 'libevent' 'libsrtp' 'snappy' 'nss' 'protobuf' 'libxslt' 'libxdamage' 'minizip' 'ffmpeg') + # namcap note: libxdamage is needed for nvidia users +makedepends=('python2' 'git' 'gperf' 'jsoncpp' 'ninja') +groups=('qt5-pmp') +_pkgfqn="${pkgname/5-pmp-/}-opensource-src-${_qtver}" +source=("http://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz" + harmony-fix.diff + '0001-Fix-no_sanitize-attribute-placement.patch') +sha256sums=('70d26db4e7944291c5f843b875916fb95ceec0f0a8fea3daea8004990199fc07' + '2c309c0f6978e6a399422319b5034b01881d5526cf48b2ee5fcc7f418029a344' + '8b0a8a36f2d6ac3c3be28233767655a8ef58fe354b7fa6cbd1f806d3aad3e883') + +prepare() { + mkdir -p build + + # Hack to force using python2 + mkdir -p bin + ln -sf /usr/bin/python2 bin/python + + cd ${_pkgfqn} + + # FreeType 2.8.1 + patch -Np1 -i ../harmony-fix.diff + + # Based on https://bugs.chromium.org/p/webrtc/issues/detail?id=7857 + cd src/3rdparty/chromium/third_party + patch -Np1 -i "${srcdir}/0001-Fix-no_sanitize-attribute-placement.patch" +} + +build() { + cd build + + export PATH="$srcdir/bin:$PATH" + /opt/qt5-pmp/usr/bin/qmake CONFIG+="proprietary-codecs" WEBENGINE_CONFIG+="use_proprietary_codecs" ../${_pkgfqn} + make +} + +package() { + cd build + make INSTALL_ROOT="$pkgdir" install + + # Drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "$pkgdir/opt/qt5-pmp/usr/lib" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + install -Dm644 "$srcdir"/${_pkgfqn}/src/3rdparty/chromium/LICENSE "$pkgdir"opt/qt5-pmp/usr/share/licenses/${pkgname}/LICENSE.chromium +} diff --git a/harmony-fix.diff b/harmony-fix.diff new file mode 100644 index 000000000000..803730f0d110 --- /dev/null +++ b/harmony-fix.diff @@ -0,0 +1,69 @@ +diff -u -r qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp qtwebengine-opensource-src-5.9.1-ftfixes/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp 2017-09-19 17:38:43.659642835 +0200 ++++ qtwebengine-opensource-src-5.9.1-ftfixes/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp 2017-09-19 17:38:50.492991631 +0200 +@@ -80,7 +80,7 @@ + + class FreeTypeLibrary : SkNoncopyable { + public: +- FreeTypeLibrary() : fLibrary(nullptr), fIsLCDSupported(false), fLCDExtra(0) { ++ FreeTypeLibrary() : fLibrary(nullptr) { + if (FT_New_Library(&gFTMemory, &fLibrary)) { + return; + } +@@ -90,8 +90,6 @@ + // Default { 0x10, 0x40, 0x70, 0x40, 0x10 } adds up to 0x110, simulating ink spread. + // SetLcdFilter must be called before SetLcdFilterWeights. + if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) { +- fIsLCDSupported = true; +- fLCDExtra = 2; //Using a filter adds one full pixel to each side. + + #ifdef SK_FONTHOST_FREETYPE_USE_NORMAL_LCD_FILTER + // Adds to 0x110 simulating ink spread, but provides better results than default. +@@ -124,13 +122,9 @@ + } + + FT_Library library() { return fLibrary; } +- bool isLCDSupported() { return fIsLCDSupported; } +- int lcdExtra() { return fLCDExtra; } + + 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. +@@ -633,17 +627,6 @@ + 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 +@@ -1046,11 +1029,11 @@ + 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; + } + } + } |