archrelease: copy trunk to extra-x86_64
[arch-packages.git] / qt5-webengine / repos / extra-x86_64 / PKGBUILD
blobf9e47b8a52b77baf54afb6bee169ab2d9e87569f
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 pkgname=qt5-webengine
5 _basever=5.15.6
6 pkgver=5.15.11
7 pkgrel=1
8 arch=('x86_64')
9 url='https://www.qt.io'
10 license=('LGPL3' 'LGPL2.1' 'BSD')
11 pkgdesc='Provides support for web applications using the Chromium browser project'
12 depends=('qt5-webchannel' 'qt5-location' 'libxcomposite' 'libxrandr' 'pciutils' 'libxss' 'libxkbfile' 
13          'libevent' 'snappy' 'nss' 'libxslt' 'minizip' 'ffmpeg' 're2' 'libvpx' 'libxtst' 'ttf-font')
14 makedepends=('git' 'python' 'gperf' 'jsoncpp' 'ninja' 'qt5-tools' 'poppler' 'pipewire' 'nodejs')
15 optdepends=('pipewire: WebRTC desktop sharing under Wayland')
16 groups=('qt' 'qt5')
17 _pkgfqn=${pkgname/5-/}
18 source=(git+https://code.qt.io/qt/qtwebengine.git#tag=v${pkgver}-lts
19         git+https://code.qt.io/qt/qtwebengine-chromium.git
20         git+https://chromium.googlesource.com/catapult#commit=5eedfe23148a234211ba477f76fc2ea2e8529189
21         qt5-webengine-python3.patch
22         qt5-webengine-chromium-python3.patch
23         qt5-webengine-ffmpeg5.patch
24         qt5-webengine-pipewire-0.3.patch
25         qt5-webengine-gcc12.patch)
26 sha256sums=('SKIP'
27             'SKIP'
28             'SKIP'
29             '398c996cb5b606695ac93645143df39e23fa67e768b09e0da6dbd37342a43f32'
30             'fda4ff16790799fb285847918a677f4f3f7c0f513d4751f846ffc5aa5d873932'
31             'c50d3019626183e753c53a997dc8a55938847543aa3178d4c51f377be741c693'
32             '5e3a3c4711d964d5152a04059a2b5c1d14bb13dd29bce370120f60e85b476b6f'
33             'cf9be3ffcc3b3cd9450b1ff13535ff7d76284f73173412d097a6ab487463a379')
34 options=(debug)
36 prepare() {
37   mkdir -p build
39   cd ${_pkgfqn}
40   git submodule init
41   git submodule set-url src/3rdparty "$srcdir"/qtwebengine-chromium
42   git submodule set-branch --branch 87-based src/3rdparty
43   git -c protocol.file.allow=always submodule update
45   patch -p1 -i "$srcdir"/qt5-webengine-python3.patch # Fix build with Python 3
46   patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-chromium-python3.patch
48   patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-ffmpeg5.patch # Fix build with ffmpeg 5
49   patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-pipewire-0.3.patch # Port to pipewire 0.3
50   patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-gcc12.patch # Fix build with GCC 12
52 # Update catapult for python3 compatibility
53   rm -r src/3rdparty/chromium/third_party/catapult
54   mv "$srcdir"/catapult src/3rdparty/chromium/third_party
57 build() {
58   cd build
59   qmake ../${_pkgfqn} CONFIG+=force_debug_info -- \
60     -proprietary-codecs \
61     -system-ffmpeg \
62     -webp \
63     -spellchecker \
64     -webengine-icu \
65     -webengine-kerberos \
66     -webengine-webrtc-pipewire
67   make
70 package() {
71   cd build
72   make INSTALL_ROOT="$pkgdir" install
74   # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
75   find "$pkgdir/usr/lib" -type f -name '*.prl' \
76     -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
78   install -Dm644 "$srcdir"/${_pkgfqn}/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium
80   # Fix cmake dependency versions
81   sed -e "s|$pkgver\ |$_basever |" -i "$pkgdir"/usr/lib/cmake/*/*Config.cmake