PKGBUILDs/extra/qt5-webengine/PKGBUILD

110 lines
4.6 KiB
Bash
Raw Normal View History

2016-07-10 03:16:51 +00:00
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2017-06-09 12:23:17 +00:00
# - patch for chromium GN
2019-07-01 14:16:10 +00:00
# - patch for chromium skia
2021-03-07 23:21:58 +00:00
# - patch for chromium to run blink bindings generation single threaded
2022-06-19 17:43:20 +00:00
# - build v7 with -j4
2016-07-10 03:16:51 +00:00
2017-04-30 02:14:10 +00:00
highmem=1
2016-07-10 03:16:51 +00:00
pkgname=qt5-webengine
2024-03-16 17:41:04 +00:00
_basever=5.15.13
2023-12-23 16:47:09 +00:00
pkgver=5.15.16
2024-04-03 18:20:19 +00:00
pkgrel=6
2017-11-17 23:31:13 +00:00
arch=('x86_64')
2019-02-04 13:38:28 +00:00
url='https://www.qt.io'
2017-04-26 19:59:05 +00:00
license=('LGPL3' 'LGPL2.1' 'BSD')
2016-07-10 03:16:51 +00:00
pkgdesc='Provides support for web applications using the Chromium browser project'
2024-04-03 18:20:19 +00:00
depends=('qt5-webchannel' 'qt5-location' 'libxcomposite' 'libxrandr' 'pciutils' 'libxss' 'libxkbfile' 'libxdamage'
2023-08-15 23:47:06 +00:00
'libevent' 'snappy' 'nss' 'libxslt' 'minizip' 'ffmpeg' 'libvpx' 'libxtst' 'ttf-font')
2022-02-20 14:50:17 +00:00
makedepends=('git' 'python' 'gperf' 'jsoncpp' 'ninja' 'qt5-tools' 'poppler' 'pipewire' 'nodejs')
optdepends=('pipewire: WebRTC desktop sharing under Wayland')
2023-10-08 15:17:31 +00:00
groups=('qt5')
2022-03-06 17:32:08 +00:00
_pkgfqn=${pkgname/5-/}
2021-06-02 16:16:10 +00:00
source=(git+https://code.qt.io/qt/qtwebengine.git#tag=v${pkgver}-lts
2021-03-06 23:34:32 +00:00
git+https://code.qt.io/qt/qtwebengine-chromium.git
2021-10-17 18:25:12 +00:00
qt5-webengine-python3.patch
qt5-webengine-chromium-python3.patch
2022-01-30 00:52:13 +00:00
qt5-webengine-ffmpeg5.patch
2022-02-20 14:50:17 +00:00
qt5-webengine-pipewire-0.3.patch
2023-12-18 16:54:32 +00:00
qt5-webengine-libxml-2.12.patch
qt5-webengine-icu-74.patch
2019-07-10 12:39:49 +00:00
0001-ARM-toolchain-fixes.patch
2021-03-07 23:21:58 +00:00
0002-Fix-ARM-skia-ICE.patch
2021-03-08 00:34:25 +00:00
0003-bind-gen-Support-single_process-flag-in-generate_bin.patch
2023-12-23 18:18:43 +00:00
0004-Run-blink-bindings-generation-single-threaded.patch)
2021-03-06 23:34:32 +00:00
sha256sums=('SKIP'
2021-10-17 18:38:46 +00:00
'SKIP'
2023-06-03 19:04:42 +00:00
'0ad5d1660886f7bbf5108b071bf5d7bbbabf1cd1258ce9d4587a01dec4a1aa89'
'd8beb3d65a1aaf927285e6f055a9d1facd0f9c3fd851f91ba568389fb3137399'
2022-01-30 00:52:13 +00:00
'c50d3019626183e753c53a997dc8a55938847543aa3178d4c51f377be741c693'
2022-02-20 14:50:17 +00:00
'5e3a3c4711d964d5152a04059a2b5c1d14bb13dd29bce370120f60e85b476b6f'
2023-12-18 16:54:32 +00:00
'bfae9e773edfd0ddbc617777fdd4c0609cba2b048be7afe40f97768e4eb6117e'
'547e092f6a20ebd15e486b31111145bc94b8709ec230da89c591963001378845'
2023-12-23 18:18:43 +00:00
'abccb5349ec341fd912be93d055f0cdf6becfdb5fa3312769777f750cfd4351a'
'cad41451dffb5cc67c57882526c6c19795e6e49e7b704f92ec76dd3499486654'
2023-12-23 18:54:58 +00:00
'4e58aca7f71037f154bbdfd03deb671462da433c241fd6429ca6adf2c7738f75'
'e24537ac22f84daa5ff067abf9c3421897df9cd60d2bcd0809ff8c10e4ab0efa')
2016-07-10 03:16:51 +00:00
prepare() {
mkdir -p build
2021-03-06 23:34:32 +00:00
cd ${_pkgfqn}
git submodule init
git submodule set-url src/3rdparty "$srcdir"/qtwebengine-chromium
git submodule set-branch --branch 87-based src/3rdparty
2022-10-22 14:35:02 +00:00
git -c protocol.file.allow=always submodule update
2020-11-22 17:36:55 +00:00
2021-10-17 18:25:12 +00:00
patch -p1 -i "$srcdir"/qt5-webengine-python3.patch # Fix build with Python 3
patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-chromium-python3.patch
2022-02-17 19:16:19 +00:00
patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-ffmpeg5.patch # Fix build with ffmpeg 5
2022-02-20 14:50:17 +00:00
patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-pipewire-0.3.patch # Port to pipewire 0.3
2023-12-18 16:54:32 +00:00
patch -p1 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-libxml-2.12.patch # Fix build with libxml 2.12
patch -p1 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-icu-74.patch # Fix build with ICU 74 - patch from Alpine
2020-09-29 18:19:59 +00:00
2023-03-01 01:12:44 +00:00
[[ $CARCH == "armv7h" ]] && export NINJAJOBS="-j1"
2020-06-03 19:55:23 +00:00
cd "$srcdir/$_pkgfqn/src/3rdparty"
2017-06-09 12:23:17 +00:00
patch -p1 -i ${srcdir}/0001-ARM-toolchain-fixes.patch
2019-07-01 14:16:10 +00:00
patch -p1 -i ${srcdir}/0002-Fix-ARM-skia-ICE.patch
2021-03-08 00:34:25 +00:00
patch -p1 -i ${srcdir}/0003-bind-gen-Support-single_process-flag-in-generate_bin.patch
patch -p1 -i ${srcdir}/0004-Run-blink-bindings-generation-single-threaded.patch
2016-07-10 03:16:51 +00:00
}
build() {
2024-03-16 17:41:04 +00:00
# this uses malloc_usable_size, which is incompatible with fortification level 3
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
2016-07-10 03:16:51 +00:00
cd build
2023-03-01 01:12:44 +00:00
qmake ../${_pkgfqn} -- \
2017-12-13 21:19:26 +00:00
-proprietary-codecs \
-system-ffmpeg \
-webp \
2018-05-25 18:58:10 +00:00
-spellchecker \
2020-01-30 01:05:38 +00:00
-webengine-icu \
2020-07-09 00:40:09 +00:00
-webengine-kerberos \
-webengine-webrtc-pipewire
2016-07-10 03:16:51 +00:00
make
}
package() {
2024-03-16 17:41:04 +00:00
# this uses malloc_usable_size, which is incompatible with fortification level 3
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
2016-07-10 03:16:51 +00:00
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' {} \;
2017-04-26 19:59:05 +00:00
install -Dm644 "$srcdir"/${_pkgfqn}/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium
2021-03-06 23:34:32 +00:00
# Fix cmake dependency versions
2022-03-06 17:32:08 +00:00
sed -e "s|$pkgver\ |$_basever |" -i "$pkgdir"/usr/lib/cmake/*/*Config.cmake
2016-07-10 03:16:51 +00:00
}