Created
March 5, 2021 16:52
-
-
Save rien333/9fe86fa91f0c36b46c00e3ebafd55ea6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Felix Yan <[email protected]> | |
# Contributor: Andrea Scarpino <[email protected]> | |
pkgname=qt5-webengine | |
_qtver=5.15.3 | |
pkgver=${_qtver/-/} | |
pkgrel=1 | |
arch=('x86_64') | |
url='https://www.qt.io' | |
license=('LGPL3' 'LGPL2.1' 'BSD') | |
pkgdesc='Provides support for web applications using the Chromium browser project' | |
depends=('qt5-webchannel' 'qt5-location' 'libxcomposite' 'libxrandr' 'pciutils' 'libxss' | |
'libevent' 'snappy' 'nss' 'libxslt' 'minizip' 'ffmpeg' 're2' 'libvpx' 'krb5' 'ttf-font') | |
makedepends=('python2' 'gperf' 'jsoncpp' 'ninja' 'qt5-tools' 'poppler' 'libpipewire02' 'nodejs' 'libxtst') | |
optdepends=('libpipewire02: WebRTC desktop sharing under Wayland') | |
groups=('qt' 'qt5') | |
_pkgfqn="qtwebengine-5.15.2_p20210224" | |
source=("https://dev.gentoo.org/~asturm/distfiles/qtwebengine-5.15.2_p20210224.tar.xz" | |
qt5-webengine-icu-68.patch::"https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=9236b21c" | |
qtwebengine-5.15.3-chromium-87-v8-icu68.patch::https://raw.githubusercontent.com/gentoo/gentoo/master/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch | |
# highlight.patch | |
# background-color.patch | |
) | |
md5sums=('16cc8593975f0008cf4c1cf97fa66fd3' | |
'b7696c34a11d409ef95f7a038056b25b' | |
'5db4a68ff0ef0bcb209e6d704c11e19f') | |
prepare() { | |
mkdir -p build | |
mkdir -p .git src/3rdparty/chromium/.git | |
# Disable jumbo build https://bugreports.qt.io/browse/QTBUG-88657 | |
sed -i 's|use_jumbo_build=true|use_jumbo_build=false|' -i ${_pkgfqn}/src/buildtools/config/common.pri | |
# patch -d $_pkgfqn/src/3rdparty/ -p1 -i "$srcdir"/qt5-webengine-icu-68.patch # Fix build with ICU 68 | |
patch -d $_pkgfqn -p1 -i "$srcdir"/qtwebengine-5.15.3-chromium-87-v8-icu68.patch #Fix build with ICU 68 | |
# cd $_pkgfqn # some of my personal patches | |
# patch --reverse -p1 < ../background-color.patch | |
# patch -p1 < ../highlight.patch | |
} | |
build() { | |
cd build | |
export QMAKE_CXXFLAGS_RELEASE="-march=native" | |
export QMAKE_CFLAGS_RELEASE="-march=native" | |
# should be ninja, see gentoo ebuild | |
qmake ../${_pkgfqn} QMAKE_CFLAGS="-march=native" QMAKE_CXXFLAGS="-march=native" -- \ | |
-proprietary-codecs \ | |
-system-ffmpeg \ | |
-no-build-qtpdf \ | |
-printing-and-pdf \ | |
-webengine-geolocation \ | |
-webp \ | |
-spellchecker \ | |
-webengine-icu \ | |
-webengine-kerberos \ | |
-webengine-webrtc-pipewire | |
make | |
} | |
package() { | |
cd build | |
make INSTALL_ROOT="$pkgdir" install | |
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir | |
find "$pkgdir/usr/lib" -type f -name '*.prl' \ | |
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; | |
install -Dm644 "$srcdir"/${_pkgfqn}/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment