PKGBUILDs/extra/qt5-webengine/PKGBUILD

114 lines
5 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-09-04 16:38:21 +00:00
_basever=5.15.15
2024-05-21 23:10:58 +00:00
pkgver=5.15.17
2024-09-04 16:38:21 +00:00
pkgrel=7
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')
2024-05-21 23:10:58 +00:00
makedepends=('git' 'python' 'gperf' 'jsoncpp' 'ninja' 'qt5-tools' 'poppler' 'pipewire' 'nodejs' 'python-html5lib')
2022-02-20 14:50:17 +00:00
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-/}
2024-05-19 19:30:22 +00:00
source=(kde-$_pkgfqn::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
2022-01-30 00:52:13 +00:00
qt5-webengine-ffmpeg5.patch
2024-05-29 18:21:25 +00:00
qt5-webengine-ffmpeg7.patch
2022-02-20 14:50:17 +00:00
qt5-webengine-pipewire-0.3.patch
2024-05-19 19:30:22 +00:00
qt5-webengine-icu-75.patch
2024-05-21 23:10:58 +00:00
qt5-webengine-ninja-1.12.patch
2024-05-19 19:30:22 +00:00
python3.12-imp.patch
python3.12-six.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)
2024-05-21 23:10:58 +00:00
sha256sums=('c2488e6d6778cf9954fcc45e94acb762376581a99df7f889f13a93cefd356940'
2021-10-17 18:38:46 +00:00
'SKIP'
2022-01-30 00:52:13 +00:00
'c50d3019626183e753c53a997dc8a55938847543aa3178d4c51f377be741c693'
2024-07-26 17:51:43 +00:00
'82a56cfc3e278617e11093078abe672a73c6fdaad98a2c8604ad8f22bc879ce5'
2022-02-20 14:50:17 +00:00
'5e3a3c4711d964d5152a04059a2b5c1d14bb13dd29bce370120f60e85b476b6f'
2024-05-19 19:30:22 +00:00
'7cac28ba784d24b4abf6414079548ada165343af507ecd8e23cbe7e4f63ae52f'
'6672741b64d896dc555c8ee42ca2329c4f20d5f406095a69fe72da44b3a142f4'
2024-05-21 23:10:58 +00:00
'1f4357708e985bb5aca61a7e5dc4c0c1285d2af00994bb49ff89ede78198e0d2'
'ac87ec55ee5cbcf2d520e1ea433d041c0bf754271a17f859edbb9976f192ce3f'
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
2024-05-19 19:30:22 +00:00
cd kde-$_pkgfqn
2021-03-06 23:34:32 +00:00
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
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
2024-05-19 19:30:22 +00:00
patch -p2 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-icu-75.patch # Fix build with ICU 75
2024-05-21 23:10:58 +00:00
patch -p2 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-ninja-1.12.patch # Fix build with ninja 1.12
2024-05-19 19:30:22 +00:00
patch -p1 -d src/3rdparty/chromium -i "$srcdir"/python3.12-imp.patch # Fix build with python 3.12 - patch from Debian
patch -p1 -d src/3rdparty/chromium -i "$srcdir"/python3.12-six.patch # Fix build with python 3.12 - patch from Debian
2024-07-26 17:51:43 +00:00
# Fix build with ffmpeg 7 - Chromium patches
2024-05-29 18:21:25 +00:00
patch -p1 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-ffmpeg7.patch
2020-09-29 18:19:59 +00:00
2023-03-01 01:12:44 +00:00
[[ $CARCH == "armv7h" ]] && export NINJAJOBS="-j1"
2024-05-20 19:31:08 +00:00
cd "$srcdir/kde-$_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
2024-05-21 23:10:58 +00:00
qmake ../kde-$_pkgfqn -- \
2017-12-13 21:19:26 +00:00
-proprietary-codecs \
-system-ffmpeg \
-webp \
2020-01-30 01:05:38 +00:00
-webengine-icu \
2024-05-19 19:30:22 +00:00
-spellchecker \
2020-07-09 00:40:09 +00:00
-webengine-kerberos \
2024-05-21 23:10:58 +00:00
-webengine-webrtc-pipewire \
-webengine-python-version python3
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' {} \;
2024-05-19 19:30:22 +00:00
install -Dm644 "$srcdir"/kde-$_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
}