summaryrefslogtreecommitdiff
path: root/dev-qt/qtwebengine
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-05 16:23:54 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-05 16:23:54 +0100
commit44a22ab89258383202cae3037c3a5685aa903251 (patch)
tree76789a8fb67642ae7635df789a9bb83125ec127d /dev-qt/qtwebengine
parent9aa62a2a35904a08cbf2e884d3abd89d893daf91 (diff)
gentoo auto-resync : 05:09:2023 - 16:23:54
Diffstat (limited to 'dev-qt/qtwebengine')
-rw-r--r--dev-qt/qtwebengine/Manifest8
-rw-r--r--dev-qt/qtwebengine/metadata.xml4
-rw-r--r--dev-qt/qtwebengine/qtwebengine-6.5.2-r1.ebuild267
-rw-r--r--dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild139
-rw-r--r--dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild267
-rw-r--r--dev-qt/qtwebengine/qtwebengine-6.9999.ebuild267
6 files changed, 893 insertions, 59 deletions
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest
index b1722d44cf3e..6c5f4bd08f45 100644
--- a/dev-qt/qtwebengine/Manifest
+++ b/dev-qt/qtwebengine/Manifest
@@ -7,8 +7,12 @@ DIST qtwebengine-5.15.10_p20230815-patchset.tar.xz 44880 BLAKE2B 6179ca4ad69f922
DIST qtwebengine-5.15.10_p20230815.tar.xz 299275336 BLAKE2B 9c64f09d982086d51af7d4134f174db9c23162bc3317ea4f19e44d91a52ad63aff56bacc7ae64a2bf693d900ef3ef5231c7333eb56237123799066055fc49450 SHA512 4e6abd825d124fddc63bc8ff92e94940b829289277aa17423403c6ce168c12fff1d52b604ae127c1a0fdbca852e3795482acefbe6e506a3059c0d32bec45a709
DIST qtwebengine-5.15.2-r1-chromium87-ppc64le.tar.xz 28784 BLAKE2B aa101d14446f3282fda8932cc75a249d88b79319f0886d95777292776d94ac5f4fc114c3893b2801fbba6abb14f381172bb14b15b5ffef12413db3a16e4d1ca6 SHA512 3324e0076eb18e2ae2248428d2730cfb3413761514b2bb57e25b8db79248aaaa8098d9f7cebfa08f1a3b39b1d0a382aafed75c5ae8273918909335957921305e
DIST qtwebengine-5.15.8_p20230313-patchset.tar.xz 45904 BLAKE2B 9f58b9808fd445a06e6a2cd6d5f7bc9782bd6de13138fdebc9e81bd9f69e7ae673a71bd3ed6b011a47e84cc64b5b703a7cfc8d5f740eaaa663da1db8ef9ef05b SHA512 21b0b853358260fa1bdc96c97c5b2af7007c744d10abeebf9f0e708a0cd7dece583d86c0554a4e327a0d615bb403b0d328acaa6622b50d7a8059bc0802edbcec
+DIST qtwebengine-6.5-patchset-1.tar.xz 12936 BLAKE2B f44af36689596da0177f0607cf242d9cce3c376f4a5c28d7902a6b44651ce9272d745a824580268e999c2d58b72424d72eb6027d7461184bf7f04e0223e5195f SHA512 f639eb09d18c19c7b0d422d6acdce62404be0fcce905374c5d47266340191f7ca66875680bb09d80e72db718e34b7dc6e7db5f2f16407a0edb892930513ea407
DIST qtwebengine-everywhere-src-6.5.2.tar.xz 412356700 BLAKE2B a48a513cffbf140aab08d748bc7826e841b7e1a87d113abbd0d8e7df5b9eb1ff2a44b89ae341c161eae26fd004699a1392f811252eb25aa13e0ce8e08f6be0a1 SHA512 f5791002495ebfa9912477f39a96d28bd4f4329f636f6b2055f1b811503b3c394c3ddd7baed5643f78f1905b1e8f860b4202b5d8e4afe5791e5450b9f46eac12
EBUILD qtwebengine-5.15.10_p20230623.ebuild 8524 BLAKE2B cce6249550a5574ab7763c042117186201da9c006982eb99efc1da72d1d339e90f9c6e9a60371a25d314f3372234e9d976d2cd292d0abcc08a4442a699a95495 SHA512 95138584a3644d86b9835288446dd2d01997379f894a38f101bbf899e853235600c9c80b571ed8380a15d179cb72fb0b68324e83b1b230847325ff476fa992e3
EBUILD qtwebengine-5.15.10_p20230815.ebuild 8258 BLAKE2B 766d6ad760f73e66d9a7f0ee52c3916e14b7f640e26784abf0866b039aecbf809c9e21a00b13d030311fa1ab91360aacd837e1257474800732a5598c3910c646 SHA512 c2d9534d452db6f53238faa05f6b454c4daeb6fcf683997d5095f4a9b777248e8d7f67ba4203a4b26457782817b887ca0cce36fb8d14f887e1b9772e78173140
-EBUILD qtwebengine-6.5.2.ebuild 7525 BLAKE2B 36efc69a7d3bcb37cb0e1988a8f5181cb60e2df177fc12237b518e1a40a3a29eecb0e2968efa02eb22e066bf22af64a86e23c63eeb63709b9188d2eb3109e0c6 SHA512 1e67b3a05f3ea6f40c5595b00273e1c7d6df9cd65244ed7a47ec0c3e287dfda3b06edf41e2a520d7f1705c0def4f0a1c8fae2d0a0f5e2725cf993d9d01fc37e3
-MISC metadata.xml 1152 BLAKE2B 2975a3fabc6464a6207a6b1a9da943baa16bc9a3b77a987cffeb6ea7c8791c5d09171b74825e6f218612144d862de1f2865c60fb6c4c187a1c5f6940112117e9 SHA512 aa3ed598b19be8adceb5a9b90bbc5d5d2521aa1a742210f536d11cf0466204ac3dc373ccee5a9a6cf523827589d17022ca2b54c8e142e6bb3b2afcfc98fa242d
+EBUILD qtwebengine-6.5.2-r1.ebuild 8043 BLAKE2B 4fe89267684300b6b04e1fa55a39f1b73a7bee0d0334966842d4be77e2b7cd1c6e4d0d4141df99aaa1690c734f514e106aa731c34f60524d917d7c07d3a6f4c1 SHA512 e2b13325d43e50475b8779170b50a061d936154e8b5e58d9491670540eeab8a944b0af8c843a9a6b1a837f4e66a6a24446451b8ecc1d9ff2cd42423e0fca0c7a
+EBUILD qtwebengine-6.5.2.ebuild 8559 BLAKE2B afcca72bb25aab65e617a033bc7b4eb47241c86307184417151522da586fe38e9485151f139fed68b365061dbfd6d19a99ae8296507109e8ab71b8879da2d9de SHA512 4e53155411b17bd1ba2800b2a265a2d117d64d62b20a7c5f275cb08d1a6a3da3aa5646933a386020bfd09b6ef82763e4cae48644db0e6b5123a0314fa904a0ba
+EBUILD qtwebengine-6.5.9999.ebuild 8043 BLAKE2B 4fe89267684300b6b04e1fa55a39f1b73a7bee0d0334966842d4be77e2b7cd1c6e4d0d4141df99aaa1690c734f514e106aa731c34f60524d917d7c07d3a6f4c1 SHA512 e2b13325d43e50475b8779170b50a061d936154e8b5e58d9491670540eeab8a944b0af8c843a9a6b1a837f4e66a6a24446451b8ecc1d9ff2cd42423e0fca0c7a
+EBUILD qtwebengine-6.9999.ebuild 8043 BLAKE2B 4fe89267684300b6b04e1fa55a39f1b73a7bee0d0334966842d4be77e2b7cd1c6e4d0d4141df99aaa1690c734f514e106aa731c34f60524d917d7c07d3a6f4c1 SHA512 e2b13325d43e50475b8779170b50a061d936154e8b5e58d9491670540eeab8a944b0af8c843a9a6b1a837f4e66a6a24446451b8ecc1d9ff2cd42423e0fca0c7a
+MISC metadata.xml 1225 BLAKE2B e98ba2a05a516ebdb11d2b669532ba64d2ec3e517a347a77fc9d15f2e9c0671ff521ce13d3e296149c0cfee6b484fa3cbd6013ef20fdbccdce18d38c96b7aa7c SHA512 3aad326e75587e160340740cf9feadbeffac22b7bb064112e67f9750251587d60fc2fdb8256a98ac0b4156cfaf0cac0e01334628ed76dee31de0c5fd65d9a66f
diff --git a/dev-qt/qtwebengine/metadata.xml b/dev-qt/qtwebengine/metadata.xml
index f447332f270a..ca6040fdb1aa 100644
--- a/dev-qt/qtwebengine/metadata.xml
+++ b/dev-qt/qtwebengine/metadata.xml
@@ -12,14 +12,16 @@
</maintainer>
<use>
<flag name="designer">Install the QWebEngineView plugin used to add widgets in <pkg>dev-qt/designer</pkg> forms that display web pages.</flag>
- <flag name="geolocation">Enable physical position determination via <pkg>dev-qt/qtpositioning</pkg></flag>
<flag name="jumbo-build">Combine source files to speed up build process.</flag>
+ <flag name="qml">Build QML/QtQuick bindings and imports</flag>
<flag name="system-icu">Use the system-wide <pkg>dev-libs/icu</pkg> instead of bundled.</flag>
<flag name="widgets">Enable QtWidgets support</flag>
</use>
<upstream>
<bugs-to>https://bugreports.qt.io/</bugs-to>
<doc>https://doc.qt.io/</doc>
+ <remote-id type="github">qt/qtwebengine</remote-id>
+ <remote-id type="github">qt/qtwebengine-chromium</remote-id>
</upstream>
<slots>
<subslots>
diff --git a/dev-qt/qtwebengine/qtwebengine-6.5.2-r1.ebuild b/dev-qt/qtwebengine/qtwebengine-6.5.2-r1.ebuild
new file mode 100644
index 000000000000..d00c5f329f78
--- /dev/null
+++ b/dev-qt/qtwebengine/qtwebengine-6.5.2-r1.ebuild
@@ -0,0 +1,267 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# py3.12: uses imp and distutils among potentially more issues, refer to
+# www-client/chromium for when adding/backporting support may be viable
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="xml(+)"
+inherit check-reqs flag-o-matic multiprocessing optfeature
+inherit prefix python-any-r1 qt6-build toolchain-funcs
+
+DESCRIPTION="Library for rendering dynamic web content in Qt6 C++ and QML applications"
+SRC_URI+="
+ https://dev.gentoo.org/~ionen/distfiles/${PN}-6.5-patchset-1.tar.xz
+"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64"
+fi
+
+IUSE="
+ +alsa bindist custom-cflags designer geolocation +jumbo-build kerberos
+ opengl pulseaudio qml screencast +system-icu vulkan +widgets
+"
+REQUIRED_USE="
+ designer? ( qml widgets )
+"
+
+# dlopen: krb5, pciutils, udev
+RDEPEND="
+ app-arch/snappy:=
+ dev-libs/expat
+ dev-libs/libevent:=
+ dev-libs/libxml2[icu]
+ dev-libs/libxslt
+ dev-libs/nspr
+ dev-libs/nss
+ ~dev-qt/qtbase-${PV}:6[X,gui,opengl=,vulkan?,widgets?]
+ ~dev-qt/qtwebchannel-${PV}:6[qml?]
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/harfbuzz:=
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:=
+ media-libs/libvpx:=
+ media-libs/libwebp:=
+ media-libs/openjpeg:2=
+ media-libs/opus
+ sys-apps/dbus
+ sys-apps/pciutils
+ sys-libs/zlib:=[minizip]
+ virtual/libudev
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-libs/libxcb:=
+ x11-libs/libxkbcommon
+ x11-libs/libxkbfile
+ alsa? ( media-libs/alsa-lib )
+ designer? ( ~dev-qt/qttools-${PV}:6[designer] )
+ geolocation? ( ~dev-qt/qtpositioning-${PV}:6 )
+ kerberos? ( virtual/krb5 )
+ pulseaudio? ( media-libs/libpulse[glib] )
+ qml? ( ~dev-qt/qtdeclarative-${PV}:6 )
+ screencast? (
+ dev-libs/glib:2
+ media-libs/mesa[gbm(+)]
+ media-video/pipewire:=
+ x11-libs/libdrm
+ )
+ system-icu? ( dev-libs/icu:= )
+ widgets? ( ~dev-qt/qtdeclarative-${PV}:6[widgets] )
+"
+DEPEND="
+ ${RDEPEND}
+ media-libs/libglvnd
+ x11-base/xorg-proto
+ x11-libs/libxshmfence
+ screencast? ( media-libs/libepoxy[egl(+)] )
+ test? (
+ widgets? ( app-text/poppler[cxx(+)] )
+ )
+"
+BDEPEND="
+ $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]')
+ dev-util/gperf
+ net-libs/nodejs[ssl]
+ sys-devel/bison
+ sys-devel/flex
+"
+
+PATCHES=( "${WORKDIR}"/patches/${PN} )
+[[ ${PV} == 6.9999 ]] || # keep for 6.x.9999
+ PATCHES+=( "${WORKDIR}"/patches/chromium )
+
+PATCHES+=(
+ # add extras as needed here, may merge in set if carries across versions
+)
+
+python_check_deps() {
+ python_has_version "dev-python/html5lib[${PYTHON_USEDEP}]"
+}
+
+qtwebengine_check-reqs() {
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if is-flagq '-g?(gdb)?([1-9])'; then #307861
+ ewarn "Used CFLAGS/CXXFLAGS seem to enable debug info (-g or -ggdb),"
+ ewarn "which is non-trivial with ${PN}. May experience extended"
+ ewarn "compilation times and increased disk/memory usage. If run into"
+ ewarn "issues, please disable before reporting a bug."
+ fi
+
+ local CHECKREQS_DISK_BUILD=7G
+ local CHECKREQS_DISK_USR=220M
+
+ if ! has distcc ${FEATURES}; then #830661
+ # assume ~2GB per job or 1.5GB if clang, possible with less
+ # depending on free memory and *FLAGS, but prefer being safe as
+ # users having OOM issues with qtwebengine been rather common
+ tc-is-clang && : 15 || : 20
+ local CHECKREQS_MEMORY=$(($(makeopts_jobs)*_/10))G
+ fi
+
+ check-reqs_${EBUILD_PHASE_FUNC} #570534
+}
+
+pkg_pretend() {
+ qtwebengine_check-reqs
+}
+
+pkg_setup() {
+ qtwebengine_check-reqs
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ qt6-build_src_prepare
+
+ # for www-plugins/chrome-binary-plugins (widevine) search paths on prefix
+ hprefixify -w /Gentoo/ src/core/content_client_qt.cpp
+
+ # store chromium versions, only used in postinst for a warning
+ local chromium
+ mapfile -t chromium < CHROMIUM_VERSION || die
+ [[ ${chromium[1]} =~ ^Based.*:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_VER=${BASH_REMATCH[1]} || die
+ [[ ${chromium[2]} =~ ^Patched.+:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_PATCHES_VER=${BASH_REMATCH[1]} || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DQT_FEATURE_qtpdf_build=OFF # TODO?
+ -DQT_FEATURE_qtpdf_quick_build=OFF
+ -DQT_FEATURE_qtpdf_widgets_build=OFF
+
+ -DQT_FEATURE_qtwebengine_build=ON
+ $(qt_feature qml qtwebengine_quick_build)
+ $(qt_feature widgets qtwebengine_widgets_build)
+
+ $(cmake_use_find_package designer Qt6Designer)
+
+ $(qt_feature alsa webengine_system_alsa)
+ $(qt_feature !bindist webengine_proprietary_codecs)
+ $(qt_feature geolocation webengine_geolocation)
+ $(qt_feature jumbo-build webengine_jumbo_build)
+ $(qt_feature kerberos webengine_kerberos)
+ $(qt_feature pulseaudio webengine_system_pulseaudio)
+ $(qt_feature screencast webengine_webrtc_pipewire)
+ $(qt_feature system-icu webengine_system_icu)
+ $(qt_feature vulkan webengine_vulkan)
+ -DQT_FEATURE_webengine_embedded_build=OFF
+ -DQT_FEATURE_webengine_extensions=ON
+ -DQT_FEATURE_webengine_ozone_x11=ON # needed, cannot do optional X yet
+ -DQT_FEATURE_webengine_pepper_plugins=ON
+ -DQT_FEATURE_webengine_printing_and_pdf=ON
+ -DQT_FEATURE_webengine_spellchecker=ON
+ -DQT_FEATURE_webengine_webchannel=ON
+ -DQT_FEATURE_webengine_webrtc=ON
+
+ # needs a modified ffmpeg to be usable, and even then it may not
+ # cooperate with new major ffmpeg versions (bug #831487)
+ -DQT_FEATURE_webengine_system_ffmpeg=OFF
+
+ # preemptively using bundled to avoid complications, may revisit
+ # (see discussions in https://github.com/gentoo/gentoo/pull/32281)
+ -DQT_FEATURE_webengine_system_re2=OFF
+
+ # not necessary to pass these (default), but in case detection fails
+ $(printf -- '-DQT_FEATURE_webengine_system_%s=ON ' \
+ freetype glib harfbuzz lcms2 libevent libjpeg \
+ libopenjpeg2 libpci libpng libvpx libwebp libxml \
+ minizip opus poppler snappy zlib)
+
+ # TODO: fixup gn cross, or package dev-qt/qtwebengine-gn with =ON
+ -DINSTALL_GN=OFF
+ )
+
+ local mygnargs=(
+ # prefer no dlopen where possible
+ link_pulseaudio=true
+ rtc_link_pipewire=true
+ )
+
+ use custom-cflags || strip-flags # fragile
+
+ export NINJA NINJAFLAGS=$(get_NINJAOPTS)
+ [[ ${NINJA_VERBOSE^^} == OFF ]] || NINJAFLAGS+=" -v"
+
+ local -x EXTRA_GN="${mygnargs[*]} ${EXTRA_GN}"
+ einfo "Extra Gn args: ${EXTRA_GN}"
+
+ qt6-build_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ # almost every tests fail, so skip entirely
+ ewarn "Skipping tests due to running as root (chromium refuses this configuration)."
+ return
+ fi
+
+ local CMAKE_SKIP_TESTS=(
+ # fails with network sandbox
+ tst_loadsignals
+ tst_qquickwebengineview
+ tst_qwebengineview
+ # certs verfication seems flaky and gives expiration warnings
+ tst_qwebengineclientcertificatestore
+ )
+
+ # prevent using the system's qtwebengine
+ # (use glob to avoid unnecessary complications with arch dir)
+ local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* )
+ [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}"
+ local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess
+ local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales
+ local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]}
+
+ # random failures in several tests without -j1
+ qt6-build_src_test -j1
+}
+
+pkg_postinst() {
+ # plugin may also be found in $HOME if provided by chrome or firefox
+ use amd64 &&
+ optfeature "Widevine DRM support (protected media playback)" \
+ www-plugins/chrome-binary-plugins
+
+ elog
+ elog "This version of Qt WebEngine is based on Chromium version ${QT6_CHROMIUM_VER}, with"
+ elog "additional security fixes up to ${QT6_CHROMIUM_PATCHES_VER}. Extensive as it is, the"
+ elog "list of backports is impossible to evaluate, but always bound to be behind"
+ elog "Chromium's release schedule."
+ elog
+ elog "In addition, various online services may deny service based on an outdated"
+ elog "user agent version (and/or other checks). Google is already known to do so."
+ elog
+ elog "tl;dr your web browsing experience will be compromised."
+}
diff --git a/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild b/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild
index 36bdb9c96769..67509126a0c5 100644
--- a/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild
@@ -3,12 +3,10 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="xml(+)"
-CHROMIUM_VER="108.0.5359.181"
-CHROMIUM_PATCHES_VER="114.0.5735.133"
-
-inherit check-reqs estack flag-o-matic multiprocessing python-any-r1 qt6-build
+inherit check-reqs estack flag-o-matic multiprocessing
+inherit prefix python-any-r1 qt6-build toolchain-funcs
DESCRIPTION="Library for rendering dynamic web content in Qt6 C++ and QML applications"
@@ -17,20 +15,11 @@ if [[ ${QT6_BUILD_TYPE} == release ]]; then
fi
IUSE="
- alsa bindist designer geolocation +jumbo-build kerberos pulseaudio screencast
- +system-icu widgets
+ alsa bindist designer geolocation +jumbo-build kerberos
+ pulseaudio screencast +system-icu widgets
"
REQUIRED_USE="designer? ( widgets )"
-BDEPEND="
- $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]')
- dev-util/gperf
- dev-util/ninja
- dev-util/re2c
- net-libs/nodejs[ssl]
- sys-devel/bison
- sys-devel/flex
-"
RDEPEND="
app-arch/snappy:=
dev-libs/glib:2
@@ -41,8 +30,8 @@ RDEPEND="
dev-libs/libxml2[icu]
dev-libs/libxslt
dev-libs/re2:=
- =dev-qt/qtdeclarative-${PV}*
- =dev-qt/qtwebchannel-${PV}*
+ ~dev-qt/qtdeclarative-${PV}:6
+ ~dev-qt/qtwebchannel-${PV}:6
media-libs/fontconfig
media-libs/freetype
media-libs/harfbuzz:=
@@ -74,18 +63,28 @@ RDEPEND="
x11-libs/libxshmfence:=
x11-libs/libXtst
alsa? ( media-libs/alsa-lib )
- geolocation? ( =dev-qt/qtpositioning-${PV}* )
+ geolocation? ( ~dev-qt/qtpositioning-${PV}:6 )
kerberos? ( virtual/krb5 )
pulseaudio? ( media-libs/libpulse:= )
screencast? ( media-video/pipewire:= )
system-icu? ( >=dev-libs/icu-69.1:= )
widgets? (
- =dev-qt/qtbase-${PV}*[widgets]
+ ~dev-qt/qtbase-${PV}:6[widgets]
)
"
-DEPEND="${RDEPEND}
+DEPEND="
+ ${RDEPEND}
media-libs/libglvnd
"
+BDEPEND="
+ $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]')
+ dev-util/gperf
+ dev-util/ninja
+ dev-util/re2c
+ net-libs/nodejs[ssl]
+ sys-devel/bison
+ sys-devel/flex
+"
PATCHES=(
"${FILESDIR}"/${PN}-5.15.10_p20230623-ffmpeg-binutils-2.41.patch
@@ -96,6 +95,8 @@ python_check_deps() {
}
qtwebengine_check-reqs() {
+ [[ ${MERGE_TYPE} == binary ]] && return
+
# bug #307861
eshopts_push -s extglob
if is-flagq '-g?(gdb)?([1-9])'; then
@@ -105,8 +106,6 @@ qtwebengine_check-reqs() {
fi
eshopts_pop
- [[ ${MERGE_TYPE} == binary ]] && return
-
# (check-reqs added for bug #570534)
#
# Estimate the amount of RAM required
@@ -139,36 +138,9 @@ pkg_setup() {
python-any-r1_pkg_setup
}
-pkg_preinst() {
- elog "This version of Qt WebEngine is based on Chromium version ${CHROMIUM_VER}, with"
- elog "additional security fixes up to ${CHROMIUM_PATCHES_VER}. Extensive as it is, the"
- elog "list of backports is impossible to evaluate, but always bound to be behind"
- elog "Chromium's release schedule."
- elog "In addition, various online services may deny service based on an outdated"
- elog "user agent version (and/or other checks). Google is already known to do so."
- elog
- elog "tldr: Your web browsing experience will be compromised."
-}
-
-src_unpack() {
- # bug 307861
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- ewarn
- ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
- ewarn "You may experience really long compilation times and/or increased memory usage."
- ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug."
- ewarn
- fi
- eshopts_pop
-
- case ${QT6_BUILD_TYPE} in
- live) git-r3_src_unpack ;&
- release) default ;;
- esac
-}
-
src_prepare() {
+ qt6-build_src_prepare
+
# bug 620444 - ensure local headers are used
find . -type f -name "*.pr[fio]" -exec \
sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' {} + || die
@@ -183,15 +155,27 @@ src_prepare() {
local file
while read file; do
echo "#error This file should not be used!" > "${file}" || die
- done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null)
+ done < <(
+ find src/3rdparty/chromium/third_party/icu -type f \
+ \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) 2>/dev/null
+ )
fi
- qt6-build_src_prepare
+ # for www-plugins/chrome-binary-plugins (widevine) search paths on prefix
+ hprefixify -w /Gentoo/ src/core/content_client_qt.cpp
+
+ # store chromium versions, only used in postinst for a warning
+ local chromium
+ mapfile -t chromium < CHROMIUM_VERSION || die
+ [[ ${chromium[1]} =~ ^Based.*:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_VER=${BASH_REMATCH[1]} || die
+ [[ ${chromium[2]} =~ ^Patched.+:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_PATCHES_VER=${BASH_REMATCH[1]} || die
}
src_configure() {
- export NINJA_PATH="${BROOT}"/usr/bin/ninja
- export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}"
+ export NINJA_PATH=${BROOT}/usr/bin/ninja
+ export NINJAFLAGS=${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}
local mycmakeargs=(
#-DQT_FEATURE_accessibility=off
@@ -242,7 +226,50 @@ src_configure() {
-DQT_FEATURE_webengine_webrtc=on
-DQT_FEATURE_webengine_webrtc_pipewire=$(usex screencast on off)
#-DQT_FEATURE_xcb=off
+
+ # TODO: fix gn cross build or split + depend on dev-qt/qtwebengine-gn
+ -DINSTALL_GN=off
)
qt6-build_src_configure
}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ # almost every tests fail, so skip entirely
+ ewarn "Skipping tests due to running as root (chromium refuses this configuration)."
+ return
+ fi
+
+ local CMAKE_SKIP_TESTS=(
+ # fails with network sandbox
+ tst_loadsignals
+ tst_qquickwebengineview
+ tst_qwebengineview
+ # certs verfication seems flaky and gives expiration warnings
+ tst_qwebengineclientcertificatestore
+ )
+
+ # prevent using the system's qtwebengine
+ # (use glob to avoid unnecessary complications with arch dir)
+ local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* )
+ [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}"
+ local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess
+ local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales
+ local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]}
+
+ # random failures in several tests without -j1
+ qt6-build_src_test -j1
+}
+
+pkg_postinst() {
+ elog "This version of Qt WebEngine is based on Chromium version ${QT6_CHROMIUM_VER}, with"
+ elog "additional security fixes up to ${QT6_CHROMIUM_PATCHES_VER}. Extensive as it is, the"
+ elog "list of backports is impossible to evaluate, but always bound to be behind"
+ elog "Chromium's release schedule."
+ elog
+ elog "In addition, various online services may deny service based on an outdated"
+ elog "user agent version (and/or other checks). Google is already known to do so."
+ elog
+ elog "tl;dr your web browsing experience will be compromised."
+}
diff --git a/dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild
new file mode 100644
index 000000000000..d00c5f329f78
--- /dev/null
+++ b/dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild
@@ -0,0 +1,267 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# py3.12: uses imp and distutils among potentially more issues, refer to
+# www-client/chromium for when adding/backporting support may be viable
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="xml(+)"
+inherit check-reqs flag-o-matic multiprocessing optfeature
+inherit prefix python-any-r1 qt6-build toolchain-funcs
+
+DESCRIPTION="Library for rendering dynamic web content in Qt6 C++ and QML applications"
+SRC_URI+="
+ https://dev.gentoo.org/~ionen/distfiles/${PN}-6.5-patchset-1.tar.xz
+"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64"
+fi
+
+IUSE="
+ +alsa bindist custom-cflags designer geolocation +jumbo-build kerberos
+ opengl pulseaudio qml screencast +system-icu vulkan +widgets
+"
+REQUIRED_USE="
+ designer? ( qml widgets )
+"
+
+# dlopen: krb5, pciutils, udev
+RDEPEND="
+ app-arch/snappy:=
+ dev-libs/expat
+ dev-libs/libevent:=
+ dev-libs/libxml2[icu]
+ dev-libs/libxslt
+ dev-libs/nspr
+ dev-libs/nss
+ ~dev-qt/qtbase-${PV}:6[X,gui,opengl=,vulkan?,widgets?]
+ ~dev-qt/qtwebchannel-${PV}:6[qml?]
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/harfbuzz:=
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:=
+ media-libs/libvpx:=
+ media-libs/libwebp:=
+ media-libs/openjpeg:2=
+ media-libs/opus
+ sys-apps/dbus
+ sys-apps/pciutils
+ sys-libs/zlib:=[minizip]
+ virtual/libudev
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-libs/libxcb:=
+ x11-libs/libxkbcommon
+ x11-libs/libxkbfile
+ alsa? ( media-libs/alsa-lib )
+ designer? ( ~dev-qt/qttools-${PV}:6[designer] )
+ geolocation? ( ~dev-qt/qtpositioning-${PV}:6 )
+ kerberos? ( virtual/krb5 )
+ pulseaudio? ( media-libs/libpulse[glib] )
+ qml? ( ~dev-qt/qtdeclarative-${PV}:6 )
+ screencast? (
+ dev-libs/glib:2
+ media-libs/mesa[gbm(+)]
+ media-video/pipewire:=
+ x11-libs/libdrm
+ )
+ system-icu? ( dev-libs/icu:= )
+ widgets? ( ~dev-qt/qtdeclarative-${PV}:6[widgets] )
+"
+DEPEND="
+ ${RDEPEND}
+ media-libs/libglvnd
+ x11-base/xorg-proto
+ x11-libs/libxshmfence
+ screencast? ( media-libs/libepoxy[egl(+)] )
+ test? (
+ widgets? ( app-text/poppler[cxx(+)] )
+ )
+"
+BDEPEND="
+ $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]')
+ dev-util/gperf
+ net-libs/nodejs[ssl]
+ sys-devel/bison
+ sys-devel/flex
+"
+
+PATCHES=( "${WORKDIR}"/patches/${PN} )
+[[ ${PV} == 6.9999 ]] || # keep for 6.x.9999
+ PATCHES+=( "${WORKDIR}"/patches/chromium )
+
+PATCHES+=(
+ # add extras as needed here, may merge in set if carries across versions
+)
+
+python_check_deps() {
+ python_has_version "dev-python/html5lib[${PYTHON_USEDEP}]"
+}
+
+qtwebengine_check-reqs() {
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if is-flagq '-g?(gdb)?([1-9])'; then #307861
+ ewarn "Used CFLAGS/CXXFLAGS seem to enable debug info (-g or -ggdb),"
+ ewarn "which is non-trivial with ${PN}. May experience extended"
+ ewarn "compilation times and increased disk/memory usage. If run into"
+ ewarn "issues, please disable before reporting a bug."
+ fi
+
+ local CHECKREQS_DISK_BUILD=7G
+ local CHECKREQS_DISK_USR=220M
+
+ if ! has distcc ${FEATURES}; then #830661
+ # assume ~2GB per job or 1.5GB if clang, possible with less
+ # depending on free memory and *FLAGS, but prefer being safe as
+ # users having OOM issues with qtwebengine been rather common
+ tc-is-clang && : 15 || : 20
+ local CHECKREQS_MEMORY=$(($(makeopts_jobs)*_/10))G
+ fi
+
+ check-reqs_${EBUILD_PHASE_FUNC} #570534
+}
+
+pkg_pretend() {
+ qtwebengine_check-reqs
+}
+
+pkg_setup() {
+ qtwebengine_check-reqs
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ qt6-build_src_prepare
+
+ # for www-plugins/chrome-binary-plugins (widevine) search paths on prefix
+ hprefixify -w /Gentoo/ src/core/content_client_qt.cpp
+
+ # store chromium versions, only used in postinst for a warning
+ local chromium
+ mapfile -t chromium < CHROMIUM_VERSION || die
+ [[ ${chromium[1]} =~ ^Based.*:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_VER=${BASH_REMATCH[1]} || die
+ [[ ${chromium[2]} =~ ^Patched.+:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_PATCHES_VER=${BASH_REMATCH[1]} || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DQT_FEATURE_qtpdf_build=OFF # TODO?
+ -DQT_FEATURE_qtpdf_quick_build=OFF
+ -DQT_FEATURE_qtpdf_widgets_build=OFF
+
+ -DQT_FEATURE_qtwebengine_build=ON
+ $(qt_feature qml qtwebengine_quick_build)
+ $(qt_feature widgets qtwebengine_widgets_build)
+
+ $(cmake_use_find_package designer Qt6Designer)
+
+ $(qt_feature alsa webengine_system_alsa)
+ $(qt_feature !bindist webengine_proprietary_codecs)
+ $(qt_feature geolocation webengine_geolocation)
+ $(qt_feature jumbo-build webengine_jumbo_build)
+ $(qt_feature kerberos webengine_kerberos)
+ $(qt_feature pulseaudio webengine_system_pulseaudio)
+ $(qt_feature screencast webengine_webrtc_pipewire)
+ $(qt_feature system-icu webengine_system_icu)
+ $(qt_feature vulkan webengine_vulkan)
+ -DQT_FEATURE_webengine_embedded_build=OFF
+ -DQT_FEATURE_webengine_extensions=ON
+ -DQT_FEATURE_webengine_ozone_x11=ON # needed, cannot do optional X yet
+ -DQT_FEATURE_webengine_pepper_plugins=ON
+ -DQT_FEATURE_webengine_printing_and_pdf=ON
+ -DQT_FEATURE_webengine_spellchecker=ON
+ -DQT_FEATURE_webengine_webchannel=ON
+ -DQT_FEATURE_webengine_webrtc=ON
+
+ # needs a modified ffmpeg to be usable, and even then it may not
+ # cooperate with new major ffmpeg versions (bug #831487)
+ -DQT_FEATURE_webengine_system_ffmpeg=OFF
+
+ # preemptively using bundled to avoid complications, may revisit
+ # (see discussions in https://github.com/gentoo/gentoo/pull/32281)
+ -DQT_FEATURE_webengine_system_re2=OFF
+
+ # not necessary to pass these (default), but in case detection fails
+ $(printf -- '-DQT_FEATURE_webengine_system_%s=ON ' \
+ freetype glib harfbuzz lcms2 libevent libjpeg \
+ libopenjpeg2 libpci libpng libvpx libwebp libxml \
+ minizip opus poppler snappy zlib)
+
+ # TODO: fixup gn cross, or package dev-qt/qtwebengine-gn with =ON
+ -DINSTALL_GN=OFF
+ )
+
+ local mygnargs=(
+ # prefer no dlopen where possible
+ link_pulseaudio=true
+ rtc_link_pipewire=true
+ )
+
+ use custom-cflags || strip-flags # fragile
+
+ export NINJA NINJAFLAGS=$(get_NINJAOPTS)
+ [[ ${NINJA_VERBOSE^^} == OFF ]] || NINJAFLAGS+=" -v"
+
+ local -x EXTRA_GN="${mygnargs[*]} ${EXTRA_GN}"
+ einfo "Extra Gn args: ${EXTRA_GN}"
+
+ qt6-build_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ # almost every tests fail, so skip entirely
+ ewarn "Skipping tests due to running as root (chromium refuses this configuration)."
+ return
+ fi
+
+ local CMAKE_SKIP_TESTS=(
+ # fails with network sandbox
+ tst_loadsignals
+ tst_qquickwebengineview
+ tst_qwebengineview
+ # certs verfication seems flaky and gives expiration warnings
+ tst_qwebengineclientcertificatestore
+ )
+
+ # prevent using the system's qtwebengine
+ # (use glob to avoid unnecessary complications with arch dir)
+ local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* )
+ [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}"
+ local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess
+ local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales
+ local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]}
+
+ # random failures in several tests without -j1
+ qt6-build_src_test -j1
+}
+
+pkg_postinst() {
+ # plugin may also be found in $HOME if provided by chrome or firefox
+ use amd64 &&
+ optfeature "Widevine DRM support (protected media playback)" \
+ www-plugins/chrome-binary-plugins
+
+ elog
+ elog "This version of Qt WebEngine is based on Chromium version ${QT6_CHROMIUM_VER}, with"
+ elog "additional security fixes up to ${QT6_CHROMIUM_PATCHES_VER}. Extensive as it is, the"
+ elog "list of backports is impossible to evaluate, but always bound to be behind"
+ elog "Chromium's release schedule."
+ elog
+ elog "In addition, various online services may deny service based on an outdated"
+ elog "user agent version (and/or other checks). Google is already known to do so."
+ elog
+ elog "tl;dr your web browsing experience will be compromised."
+}
diff --git a/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild
new file mode 100644
index 000000000000..d00c5f329f78
--- /dev/null
+++ b/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild
@@ -0,0 +1,267 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# py3.12: uses imp and distutils among potentially more issues, refer to
+# www-client/chromium for when adding/backporting support may be viable
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="xml(+)"
+inherit check-reqs flag-o-matic multiprocessing optfeature
+inherit prefix python-any-r1 qt6-build toolchain-funcs
+
+DESCRIPTION="Library for rendering dynamic web content in Qt6 C++ and QML applications"
+SRC_URI+="
+ https://dev.gentoo.org/~ionen/distfiles/${PN}-6.5-patchset-1.tar.xz
+"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64"
+fi
+
+IUSE="
+ +alsa bindist custom-cflags designer geolocation +jumbo-build kerberos
+ opengl pulseaudio qml screencast +system-icu vulkan +widgets
+"
+REQUIRED_USE="
+ designer? ( qml widgets )
+"
+
+# dlopen: krb5, pciutils, udev
+RDEPEND="
+ app-arch/snappy:=
+ dev-libs/expat
+ dev-libs/libevent:=
+ dev-libs/libxml2[icu]
+ dev-libs/libxslt
+ dev-libs/nspr
+ dev-libs/nss
+ ~dev-qt/qtbase-${PV}:6[X,gui,opengl=,vulkan?,widgets?]
+ ~dev-qt/qtwebchannel-${PV}:6[qml?]
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/harfbuzz:=
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng:=
+ media-libs/libvpx:=
+ media-libs/libwebp:=
+ media-libs/openjpeg:2=
+ media-libs/opus
+ sys-apps/dbus
+ sys-apps/pciutils
+ sys-libs/zlib:=[minizip]
+ virtual/libudev
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-libs/libxcb:=
+ x11-libs/libxkbcommon
+ x11-libs/libxkbfile
+ alsa? ( media-libs/alsa-lib )
+ designer? ( ~dev-qt/qttools-${PV}:6[designer] )
+ geolocation? ( ~dev-qt/qtpositioning-${PV}:6 )
+ kerberos? ( virtual/krb5 )
+ pulseaudio? ( media-libs/libpulse[glib] )
+ qml? ( ~dev-qt/qtdeclarative-${PV}:6 )
+ screencast? (
+ dev-libs/glib:2
+ media-libs/mesa[gbm(+)]
+ media-video/pipewire:=
+ x11-libs/libdrm
+ )
+ system-icu? ( dev-libs/icu:= )
+ widgets? ( ~dev-qt/qtdeclarative-${PV}:6[widgets] )
+"
+DEPEND="
+ ${RDEPEND}
+ media-libs/libglvnd
+ x11-base/xorg-proto
+ x11-libs/libxshmfence
+ screencast? ( media-libs/libepoxy[egl(+)] )
+ test? (
+ widgets? ( app-text/poppler[cxx(+)] )
+ )
+"
+BDEPEND="
+ $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]')
+ dev-util/gperf
+ net-libs/nodejs[ssl]
+ sys-devel/bison
+ sys-devel/flex
+"
+
+PATCHES=( "${WORKDIR}"/patches/${PN} )
+[[ ${PV} == 6.9999 ]] || # keep for 6.x.9999
+ PATCHES+=( "${WORKDIR}"/patches/chromium )
+
+PATCHES+=(
+ # add extras as needed here, may merge in set if carries across versions
+)
+
+python_check_deps() {
+ python_has_version "dev-python/html5lib[${PYTHON_USEDEP}]"
+}
+
+qtwebengine_check-reqs() {
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if is-flagq '-g?(gdb)?([1-9])'; then #307861
+ ewarn "Used CFLAGS/CXXFLAGS seem to enable debug info (-g or -ggdb),"
+ ewarn "which is non-trivial with ${PN}. May experience extended"
+ ewarn "compilation times and increased disk/memory usage. If run into"
+ ewarn "issues, please disable before reporting a bug."
+ fi
+
+ local CHECKREQS_DISK_BUILD=7G
+ local CHECKREQS_DISK_USR=220M
+
+ if ! has distcc ${FEATURES}; then #830661
+ # assume ~2GB per job or 1.5GB if clang, possible with less
+ # depending on free memory and *FLAGS, but prefer being safe as
+ # users having OOM issues with qtwebengine been rather common
+ tc-is-clang && : 15 || : 20
+ local CHECKREQS_MEMORY=$(($(makeopts_jobs)*_/10))G
+ fi
+
+ check-reqs_${EBUILD_PHASE_FUNC} #570534
+}
+
+pkg_pretend() {
+ qtwebengine_check-reqs
+}
+
+pkg_setup() {
+ qtwebengine_check-reqs
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ qt6-build_src_prepare
+
+ # for www-plugins/chrome-binary-plugins (widevine) search paths on prefix
+ hprefixify -w /Gentoo/ src/core/content_client_qt.cpp
+
+ # store chromium versions, only used in postinst for a warning
+ local chromium
+ mapfile -t chromium < CHROMIUM_VERSION || die
+ [[ ${chromium[1]} =~ ^Based.*:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_VER=${BASH_REMATCH[1]} || die
+ [[ ${chromium[2]} =~ ^Patched.+:[^0-9]+([0-9.]+$) ]] &&
+ QT6_CHROMIUM_PATCHES_VER=${BASH_REMATCH[1]} || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DQT_FEATURE_qtpdf_build=OFF # TODO?
+ -DQT_FEATURE_qtpdf_quick_build=OFF
+ -DQT_FEATURE_qtpdf_widgets_build=OFF
+
+ -DQT_FEATURE_qtwebengine_build=ON
+ $(qt_feature qml qtwebengine_quick_build)
+ $(qt_feature widgets qtwebengine_widgets_build)
+
+ $(cmake_use_find_package designer Qt6Designer)
+
+ $(qt_feature alsa webengine_system_alsa)
+ $(qt_feature !bindist webengine_proprietary_codecs)
+ $(qt_feature geolocation webengine_geolocation)
+ $(qt_feature jumbo-build webengine_jumbo_build)
+ $(qt_feature kerberos webengine_kerberos)
+ $(qt_feature pulseaudio webengine_system_pulseaudio)
+ $(qt_feature screencast webengine_webrtc_pipewire)
+ $(qt_feature system-icu webengine_system_icu)
+ $(qt_feature vulkan webengine_vulkan)
+ -DQT_FEATURE_webengine_embedded_build=OFF
+ -DQT_FEATURE_webengine_extensions=ON
+ -DQT_FEATURE_webengine_ozone_x11=ON # needed, cannot do optional X yet
+ -DQT_FEATURE_webengine_pepper_plugins=ON
+ -DQT_FEATURE_webengine_printing_and_pdf=ON
+ -DQT_FEATURE_webengine_spellchecker=ON
+ -DQT_FEATURE_webengine_webchannel=ON
+ -DQT_FEATURE_webengine_webrtc=ON
+
+ # needs a modified ffmpeg to be usable, and even then it may not
+ # cooperate with new major ffmpeg versions (bug #831487)
+ -DQT_FEATURE_webengine_system_ffmpeg=OFF
+
+ # preemptively using bundled to avoid complications, may revisit
+ # (see discussions in https://github.com/gentoo/gentoo/pull/32281)
+ -DQT_FEATURE_webengine_system_re2=OFF
+
+ # not necessary to pass these (default), but in case detection fails
+ $(printf -- '-DQT_FEATURE_webengine_system_%s=ON ' \
+ freetype glib harfbuzz lcms2 libevent libjpeg \
+ libopenjpeg2 libpci libpng libvpx libwebp libxml \
+ minizip opus poppler snappy zlib)
+
+ # TODO: fixup gn cross, or package dev-qt/qtwebengine-gn with =ON
+ -DINSTALL_GN=OFF
+ )
+
+ local mygnargs=(
+ # prefer no dlopen where possible
+ link_pulseaudio=true
+ rtc_link_pipewire=true
+ )
+
+ use custom-cflags || strip-flags # fragile
+
+ export NINJA NINJAFLAGS=$(get_NINJAOPTS)
+ [[ ${NINJA_VERBOSE^^} == OFF ]] || NINJAFLAGS+=" -v"
+
+ local -x EXTRA_GN="${mygnargs[*]} ${EXTRA_GN}"
+ einfo "Extra Gn args: ${EXTRA_GN}"
+
+ qt6-build_src_configure
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ # almost every tests fail, so skip entirely
+ ewarn "Skipping tests due to running as root (chromium refuses this configuration)."
+ return
+ fi
+
+ local CMAKE_SKIP_TESTS=(
+ # fails with network sandbox
+ tst_loadsignals
+ tst_qquickwebengineview
+ tst_qwebengineview
+ # certs verfication seems flaky and gives expiration warnings
+ tst_qwebengineclientcertificatestore
+ )
+
+ # prevent using the system's qtwebengine
+ # (use glob to avoid unnecessary complications with arch dir)
+ local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* )
+ [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}"
+ local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess
+ local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales
+ local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]}
+
+ # random failures in several tests without -j1
+ qt6-build_src_test -j1
+}
+
+pkg_postinst() {
+ # plugin may also be found in $HOME if provided by chrome or firefox
+ use amd64 &&
+ optfeature "Widevine DRM support (protected media playback)" \
+ www-plugins/chrome-binary-plugins
+
+ elog
+ elog "This version of Qt WebEngine is based on Chromium version ${QT6_CHROMIUM_VER}, with"
+ elog "additional security fixes up to ${QT6_CHROMIUM_PATCHES_VER}. Extensive as it is, the"
+ elog "list of backports is impossible to evaluate, but always bound to be behind"
+ elog "Chromium's release schedule."
+ elog
+ elog "In addition, various online services may deny service based on an outdated"
+ elog "user agent version (and/or other checks). Google is already known to do so."
+ elog
+ elog "tl;dr your web browsing experience will be compromised."
+}